我正在用Xcode 6.1在我的MacOSX10.9.5上安装摩西翻译软件。我需要安装说明书上说和Boost。一旦我这样做,我就把"cd“克隆到目录中,然后输入./bjam -j8。首先,我证实了我有先决条件。首先,g++ (我刚刚单击TAB查看可用的是什么):
$ g++
g++ g++-4.9 然后提振:
$ brew install boost
Warning: boost-1.56.0 already installed然后我试着安装:
$ ./bjam -j8
Tip: install tcmalloc for faster threading. See BUILD-INSTRUCTIONS.txt for more information.
mkdir: bin: File exists
...patience...
...patience...
...found 4469 targets...
...updating 155 targets...
darwin.link lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query
ld: library not found for -lboost_thread
clang: error: linker command failed with exit code 1 (use -v to see invocation)
// Additional error messages...
...failed darwin.link mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/util_test...
...skipped <pmert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi>util_test.passed for lack of <pmert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi>util_test...
darwin.link mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocabulary_test
ld: library not found for -lboost_thread
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"g++" -o "mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocabulary_test" "mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/VocabularyTest.o" "mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/libmert_lib.a" -lboost_unit_test_framework -llzma -lbz2 -ldl -lboost_system -lz -lboost_thread -lm -liconv -g -Wl,-dead_strip -no_dead_strip_inits_and_terms
...failed darwin.link mert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocabulary_test...
...skipped <pmert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi>vocabulary_test.passed for lack of <pmert/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi>vocabulary_test...
...failed updating 72 targets...
...skipped 83 targets...
The build failed. If you need support, run:
./jam-files/bjam -j8 --debug-configuration -d2 |gzip >build.log.gz
then attach build.log.gz to your e-mail.
You MUST do 3 things before sending to the mailing list:
1. Subscribe to the mailing list at http://mailman.mit.edu/mailman/listinfo/moses-support
2. Attach build.log.gz to your e-mail
3. Say what is the EXACT command you executed when you got the error
ERROR有大量错误消息没有显示(浓缩为"//附加错误消息“),它们都是"ld:-lboost_thread未找到的库”的形式。很明显,有些东西找不到与boost相关的库,但我不知道如何修复它。有人有什么建议吗?我从字面上抄袭了安装说明中的几行,而摩西很受欢迎,以至于很久以前就发现了安装指令中的一个明显错误。
附加注释:在安装说明页面上,它们列出了一个命令,可以在其中强制安装程序找到boost库:
./bjam --with-boost=~/workspace/temp/boost_1_55_0 -j8我的助力在
/usr/local/Cellar/boost/1.56.0/我尝试用上面的文件路径替换--with-boost=参数,但这也不起作用(我得到了相同的错误)。
我将把它张贴在摩西的邮件列表中,但我也想在这里询问,因为我得到了与其他软件相同的错误(“库未找到. clang: error: linker命令在退出代码1中失败”),这将有助于我学习确保clang能够找到我的库的一般策略。
发布于 2014-11-15 21:09:24
这个包需要一个非标准的boost布局(或者这可能是许多系统上安装的boost的标准布局,但它肯定不是我工作目录中boost的默认布局):
bjam --help说:
--with-boost=/path/to/boost如果Boost在一个非标准位置,请在这里指定它。这个目录应该包含包含和库或lib64。
当我的Boost构建树在
/home/sehe/custom/boost/boost // headeers
/home/sehe/custom/boost/stage
/home/sehe/custom/boost/stage/lib // libraries我创建了一个“转发”目录--因此不需要安装boost:
mkdir /tmp/boost-moses
cd /tmp/boost-moses/
ln -sfv /home/sehe/custom/boost/stage/lib lib
ln -sfv /home/sehe/custom/boost include现在,我可以在mosesdecoder目录中触发一个生成,
./bjam --with-boost=/tmp/boost-moses发布于 2015-03-17 23:26:08
这里没有说摩西版本的ComputerScientist编译,但他的最后一条评论击中了钉子。当我准备编译2.1.1版本时,我需要重写Jamroot文件和jam-files/boost-build/tools/mpi.jam,并将所有boost_mpi提到的内容更改为boost_mpi-mt。在我看来,boost-1.55使用了不同的库风格,然后使用了boost-1.56,而摩西在那个版本中被改编为1.55。
然而,我无法编译摩西3.0或boost-1.55或boost-1.56现在,因为undefined reference to boost::filesystem::path::stem()。不幸的是,我不能将此作为对先前答复的评论.
https://stackoverflow.com/questions/26950201
复制相似问题