OS X 10.12, GCC 5 '-rdynamic' Installation Error

Hi–

I’m having trouble compiling Root v6.08.06 on Mac OS X 10.12 when using GCC v4.9 and GCC v5. I have GCC installed using Homebrew.

The input command is

./configure macosx64 --with-cc=/usr/local/bin/gcc-5 --with-cxx=/usr/local/bin/g+±5 --with-f77=/usr/local/bin/gfortran-5 --with-ld=/usr/local/bin/g+±5 --disable-cocoa --disable-vc --enable-x11 --enable-builtin-freetype --enable-builtin-pcre --enable-builtin-lzma

then

make

It gets about 90% of the way through and then

[ 89%] Linking CXX executable …/…/bin/bugpoint
g+±5: error: unrecognized command line option ‘-rdynamic’
make[3]: *** [bin/bugpoint] Error 1
make[2]: *** [tools/bugpoint/CMakeFiles/bugpoint.dir/all] Error 2

I get this same “-rdynamic” error using gcc 4.9 as well (also at about 90%).

Note: The only luck I’ve add installing Root v5 or v6 so far has been using Apple Clang 8.0. If anyone knows any particular combination of Root version and GCC version that worked for them, that would be a big help.

Thanks,
Andrew

Can you try building with cmake (instead of configure/make)?

Cheers,
Philippe.

Hi–

I have tried with GCC 4.9

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ -DCMAKE_C_COMPILER=/usr/local/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/local/bin/g+±4.9 -DCMAKE_Fortran_COMPILER=/usr/local/bin/gfortran-4.9 -Dcocoa=OFF -Dvc=OFF -Dx11=ON -Dbuiltin_freetype=ON -Dbuiltin_pcre=ON -Dbuiltin_lzma=ON …/root-6.08.06/

make -j2

and get

Scanning dependencies of target llvm-tblgen
[ 28%] Linking CXX executable …/…/bin/llvm-tblgen
0 0x10e779608 __assert_rtn + 144
1 0x10e78ca1b mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3195
2 0x10e784572 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 342
3 0x10e7c5a9c ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 824
4 0x10e7c82fb ld::tool::InputFiles::parseWorkerThread() + 495
5 0x7fffcc595aab _pthread_body + 180
6 0x7fffcc5959f7 _pthread_body + 0
A linker snapshot was created at:
/tmp/clang-tblgen-2017-02-13-142459.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp, line 1893.
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm/src/bin/clang-tblgen] Error 1
make[1]: *** [interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
0 0x10967c608 __assert_rtn + 144
1 0x10968fa1b mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3195
2 0x109687572 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 342
3 0x1096b2c19 archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 783
4 0x1096b2401 archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 103
5 0x1096cbf42 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 262
6 0x1096d4028 ld::tool::Resolver::resolveUndefines() + 156
7 0x1096d7227 ld::tool::Resolver::resolve() + 75
8 0x10967d567 main + 1050
9 0x7fffcc37e255 start + 1
A linker snapshot was created at:
/tmp/llvm-tblgen-2017-02-13-142459.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp, line 1893.
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm/src/bin/llvm-tblgen] Error 1
make[1]: *** [interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2

and trying with GCC 5–

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ -DCMAKE_C_COMPILER=/usr/local/bin/gcc-5 -DCMAKE_CXX_COMPILER=/usr/local/bin/g+±5 -DCMAKE_Fortran_COMPILER=/usr/local/bin/gfortran-5 -Dcocoa=OFF -Dvc=OFF -Dx11=ON -Dbuiltin_freetype=ON -Dbuiltin_pcre=ON -Dbuiltin_lzma=ON …/root-6.08.06/

make -j2

yields

Scanning dependencies of target llvm-tblgen
0 0x10590e608 __assert_rtn + 144
1 0x105921a1b mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3195
2 0x105919572 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 342
3 0x10595aa9c ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 824
4 0x10595d2fb ld::tool::InputFiles::parseWorkerThread() + 495
5 0x7fffcc595aab _pthread_body + 180
6 0x7fffcc5959f7 _pthread_body + 0
A linker snapshot was created at:
/tmp/clang-tblgen-2017-02-13-143715.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp, line 1893.
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm/src/bin/clang-tblgen] Error 1
make[1]: *** [interpreter/llvm/src/tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 31%] Linking CXX executable …/…/bin/llvm-tblgen
0 0x105aa4608 __assert_rtn + 144
1 0x105ab7a1b mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3195
2 0x105aaf572 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 342
3 0x105adac19 archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 783
4 0x105ada401 archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 103
5 0x105af3f42 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 262
6 0x105afc028 ld::tool::Resolver::resolveUndefines() + 156
7 0x105aff227 ld::tool::Resolver::resolve() + 75
8 0x105aa5567 main + 1050
A linker snapshot was created at:
/tmp/llvm-tblgen-2017-02-13-143716.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-274.2/src/ld/parsers/macho_relocatable_file.cpp, line 1893.
collect2: error: ld returned 1 exit status
make[2]: *** [interpreter/llvm/src/bin/llvm-tblgen] Error 1
make[1]: *** [interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make: *** [all] Error 2

Sorry for the large output, I don’t exactly know how to read this.

Is this a linker/compiler problem? In the configure method, there is a way to specify the linker, but I do not see this here for cmake.

Best,
Andrew

Hi,

Yes, looks familiar - that’s a GCC bug triggered by building llvm.

Please move to clang (recommended) or a more recent GCC.

Cheers, Axel.

Install went through with GCC 6.3.0!

Thanks so much,
Andrew

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.