Oolite Bulletins
http://bb.aegidian.org/

Compiling on recent (2017) distros - GCC 6.x issues
http://bb.aegidian.org/viewtopic.php?f=9&t=18796
Page 2 of 2

Author:  zevans [ Wed May 17, 2017 5:45 pm ]
Post subject:  Re: Compiling on recent (2017) distros - GCC 6.x issues

I saw the latest commit included the "null" fixes so I started again with a fresh clone, just to make sure it does build now.

Success! Thanks for all your help.

I had to add -Ideps/mozilla/js/src/to the compile command as I suspected. Need to figure out why "make" isn't doing that automatically so we can put a long-term fix in the codebase.

Author:  Getafix [ Thu May 18, 2017 1:45 pm ]
Post subject:  Re: Compiling on recent (2017) distros - GCC 6.x issues

What if you do the following:
Code:
$ make -f Makefile distclean
$ make -f Makefile release-snapshot
Does it compile the whole thing?

Author:  zevans [ Fri May 19, 2017 3:52 pm ]
Post subject:  Re: Compiling on recent (2017) distros - GCC 6.x issues

Quote:
What if you do the following:
Code:
$ make -f Makefile distclean
$ make -f Makefile release-snapshot
Does it compile the whole thing?
Nope. Here is the minimum needed for the make command, and I've included an example error of what happens when the flags are omitted.
Code:
make -f Makefile release-snapshot \
OBJCFLAGS+="-Wno-format-security"  \
CXXFLAGS+="-Wno-narrowing" \
CXXFLAGS+="-DENABLE_ASSEMBLER"
Examples...
Code:
CFLAGS+="-Wno-narrowing"

../nanojit/NativeX64.cpp:1902:81: error: narrowing conversion of ‘9223372036854775808ull’ from ‘long long unsigned int’ to ‘int64_t {aka long int}’ inside { } [-Wnarrowing]
     static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {0x8000000000000000LL,0};
In this next one it looks like something in the makefile (or configure) is changing this warning TO an error, and these buffer overruns are in the core code, not SpiderMonkey...
Code:
OBJCFLAGS+="-Wno-format-security"

Compiling file src/Core/Debug/OODebugMonitor.m ...
src/Core/Debug/OODebugMonitor.m: In function ‘-[OODebugMonitor dumpMemoryStatistics]’:
src/Core/Debug/OODebugMonitor.m:511:2: error: format not a string literal and no format arguments [-Werror=format-security]
  OOLog(@"debug.memStats", @"Memory statistics:");
  ^
cc1obj: some warnings being treated as errors
And the linking problem discussed earlier in this thread.
Code:
CXXFLAGS+="-DENABLE_ASSEMBLER"

c++ -o js -Wno-narrowing  js.o jsworkers.o   -lpthread   -Wl,-rpath-link,/bin -Wl,-rpath-link,/usr/local/lib  -L../dist/bin -L../dist/lib -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../editline/libeditline.a ../libjs_static.a -ldl
../libjs_static.a(jsapi.o): In function `js::RegExp::compileHelper(JSContext*, JSLinearString&)':
jsapi.cpp:(.text._ZN2js6RegExp13compileHelperEP9JSContextR14JSLinearString[_ZN2js6RegExp13compileHelperEP9JSContextR14JSLinearString]+0x7d): undefined reference to `JSC::Yarr::jitCompileRegex(JSC::ExecutableAllocator&, JSC::Yarr::RegexCodeBlock&, JSLinearString const&, unsigned int&, int&, bool&, bool, bool)'
/usr/bin/ld: js: hidden symbol `_ZN3JSC4Yarr15jitCompileRegexERNS_19ExecutableAllocatorERNS0_14RegexCodeBlockERK14JSLinearStringRjRiRbbb' isn't defined
/usr/bin/ld: final link failed: Bad value

Author:  another_commander [ Fri May 19, 2017 4:35 pm ]
Post subject:  Re: Compiling on recent (2017) distros - GCC 6.x issues

The format security error should be fixed in trunk; please check. There seems to be something odd with your build setup, because ENABLE_ASSEMBLER (as well as a few other macros needed for Spidermonkey JIT) should be already defined - at least they seem to be in the dev evnironments that build the Linux packages and maybe Getafix can help here by confirming or denying this.

Author:  Getafix [ Tue May 23, 2017 2:45 pm ]
Post subject:  Re: Compiling on recent (2017) distros - GCC 6.x issues

Code:
deps/mozilla/js/src/Makefile.in:917:CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1
Image

Page 2 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/