therealglazou / bluegriffon

BlueGriffon, the Web editor
Mozilla Public License 2.0
303 stars 71 forks source link

Building on Fedora31 fails. #75

Open unitedstar-tech opened 4 years ago

unitedstar-tech commented 4 years ago

Hi developers,

During building BlueGriffon3.1 on Fedora31 in order to the procedure on README.md, I encountered following error and failed in building.

 0:23.58 In function 'void CheckSelfTime(js::gcstats::Phase, js::gcstats::Phase, const PhaseTimeTable&, mozilla::TimeDuration*, mozilla::TimeDuration)',
 0:23.58     inlined from 'js::gcstats::Phase LongestPhaseSelfTime(const PhaseTimeTable&)' at /root/bluegriffon-source/js/src/gc/Statistics.cpp:999:34:
 0:23.58 /root/bluegriffon-source/js/src/gc/Statistics.cpp:970:16: error: '%s' directive argument is null [-Werror=format-overflow=]
 0:23.59   970 |         fprintf(stderr,
 0:23.59       |         ~~~~~~~^~~~~~~~
 0:23.59   971 |                 "Parent %s time = %.3fms"
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59   972 |                 " with %.3fms remaining, "
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59   973 |                 "child %s time %.3fms\n",
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59   974 |                 phases[parent].name, SumPhase(parent, times).ToMilliseconds(),
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59   975 |                 selfTimes[parent].ToMilliseconds(),
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59   976 |                 phases[child].name, childTime.ToMilliseconds());
 0:23.59       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:23.59 /root/bluegriffon-source/js/src/gc/Statistics.cpp:970:16: error: '%s' directive argument is null [-Werror=format-overflow=]
 0:23.59 /root/bluegriffon-source/js/src/gc/Statistics.cpp:970:16: error: '%s' directive argument is null [-Werror=format-overflow=]
 0:23.59 /root/bluegriffon-source/js/src/gc/Statistics.cpp:970:16: error: '%s' directive argument is null [-Werror=format-overflow=]
 0:23.59 /root/bluegriffon-source/js/src/gc/Statistics.cpp:970:16: error: '%s' directive argument is null [-Werror=format-overflow=]

How can I fix this error?

Additionally there are some other errors during build on Fedora31 and I applied following fixes to avoid them.

1, ./python/mozbuild/mozbuild/action/dump_env.py

9,11d8
< import sys
< sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
< from shellutil import quote
13c10
<     print('%s=%s' % (key, quote(value)))
---
>     print('%s=%s' % (key, value))
  1. ./tools/profiler/core/platform.h
    51c51
    < inline pid_t gettid()
    ---
    > static inline pid_t gettid()

3, .mozconfig You must NOT add ac_add_options --enable-stdcxx-compat

Does anybody succeed in building on Fedora31 or other Redhat based systems? Any advice welcomed.

Thank you.