我正在尝试在OS X Yosemite上构建构建HPX。我在运行命令'make'时遇到以下链接器错误。
我正在使用gcc作为我的编译器。
Linking CXX shared library ../lib/libhpx.dylib
0 0x1056e66a0 __assert_rtn + 144
1 0x105791989 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3169
2 0x105775331 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375
3 0x1056e9344 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 784
4 0x1056eb1fc ld::tool::InputFiles::parseWorkerThread() + 484
5 0x7fff945d9268 _pthread_body + 131
6 0x7fff945d91e5 _pthread_body + 0
A linker snapshot was created at:
/tmp/libhpx.0.9.11.dylib-2015-06-18-214035.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file src/ld/parsers/macho_relocatable_file.cpp, line 1741.
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libhpx.0.9.11.dylib] Error 1
make[1]: *** [src/CMakeFiles/hpx.dir/all] Error 2
make: *** [all] Error 2
答案 0 :(得分:0)
尝试按如下方式配置hpx;
/Users/hpx > ./configure --with-hwloc=contrib --prefix=/Users/hpx/install CC=clang
/Users/hpx > make
您发布的错误与Yosemite中的gcc和链接器有关。 仍然不确定如何准确地解决错误。 但是,在编译HPX时,可以使用clang编译器。