基于 Mac 构建的 HPX 出现链接器错误
HPX build on Mac gives linker errors
我正在尝试在 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
尝试如下配置 hpx;
/Users/hpx > ./configure --with-hwloc=contrib --prefix=/Users/hpx/install CC=clang
/Users/hpx > make
您发布的错误与 Yosemite 中的 gcc 和链接器有关。
仍然不确定如何准确解决错误。
但作为变通方法,您可以在编译 HPX 时使用 clang 编译器。
我正在尝试在 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
尝试如下配置 hpx;
/Users/hpx > ./configure --with-hwloc=contrib --prefix=/Users/hpx/install CC=clang
/Users/hpx > make
您发布的错误与 Yosemite 中的 gcc 和链接器有关。 仍然不确定如何准确解决错误。 但作为变通方法,您可以在编译 HPX 时使用 clang 编译器。