Hello, Guys, Finally, get moses compiling and linking successfully in centos 6 . Thank a lot for the help from all of you!
Here is some update. I changed to use boost1461 rather latest boost150. The main change I make was in Jamroot as follows. I added the <include> and <library> === project : requirements <threading>multi:<define>WITH_THREADS <threading>multi:<library>boost_thread <define>_FILE_OFFSET_BITS=64 <define>_LARGE_FILES <include>/home/moses/boost1461 <library-path>/home/moses/boost1461 <library>/home/moses/boost1461/libboost_system.a <library>/home/moses/boost1461/libboost_filesystem.a <library>/home/moses/boost1461/libboost_program_options.a $(requirements) ; === The I use the following command: sudo ./bjam --with-boost=/home/moses/boost1461 -j22 -a -q It works now. Thanks a lot. Best regards, Ben On Tue, Jul 17, 2012 at 9:46 AM, Ben Ma <[email protected]> wrote: > Dear Nicola, > > I am using centos 6(linux). > Is it ok to use dll-path? > > After get the latest code, I got another error message: > > common.copy /home/moses/m2/mosesdecoder/bin/extract-lex > gcc.link > phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/pcfg-extract > phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/pcfg_extract.o: > In function > `boost::program_options::basic_command_line_parser<char>::run()': > pcfg_extract.cc:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[boost::program_options::basic_command_line_parser<char>::run()]+0x22): > undefined reference to > `boost::program_options::detail::cmdline::get_canonical_option_prefix()' > > collect2: ld returned 1 exit status > > "g++" -L"/home/moses/boost1461/lib" -L"/home/moses/boost1461/lib64" > -Wl,-R -Wl,"/home/moses/boost1461/lib" -Wl,-R > -Wl,"/home/moses/boost1461/lib64" -Wl,-rpath-link > -Wl,"/home/moses/boost1461/lib" -Wl,-rpath-link > -Wl,"/home/moses/boost1461/lib64" -o > "phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/pcfg-extract" > -Wl,--start-group > "phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/main.o" > "phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/pcfg_extract.o" > "phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/rule_collection.o" > "phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/rule_extractor.o" > "phrase-extract/pcfg-common/bin/gcc-4.4.6/release/link-static/libpcfg_common.a" > -Wl,-Bstatic -Wl,-Bdynamic -lboost_program_options -lSegFault > -Wl,--end-group > > > ...failed gcc.link > phrase-extract/pcfg-extract/bin/gcc-4.4.6/release/link-static/pcfg-extract... > gcc.compile.c++ > phrase-extract/bin/gcc-4.4.6/release/link-static/relax-parse.o > > Does any one have a idea about this? > > > Appreciate it a lot. > Best regards, > Ben > > On Tue, Jul 17, 2012 at 9:38 AM, Nicola Bertoldi <[email protected]> wrote: > >> Dear Ben >> >> have you tried with the following? >> >> >> bjam dll-path=/custom/path >> >> >> Nicola >> On Jul 17, 2012, at 6:20 PM, Ben Ma wrote: >> >> Hello, Hieu and Kenneth , >> >> Thanks a lot for the help. >> I used "git pull" to download the latest code. >> Still have the same error message. >> >> Yes, I guess Hieu make a point. >> >> It seems that there is no -L arg to gcc. >> Is there a way to add -L arg to gcc? >> >> Appreciate it a lot. >> Best regards, >> Ben >> >> >> On Tue, Jul 17, 2012 at 6:02 AM, Hieu Hoang <[email protected] >> <mailto:[email protected]>> wrote: >> >> >> Hieu >> Sent from my flying horse >> >> Begin forwarded message: >> >> From: Hieu Hoang <[email protected]<mailto: >> [email protected]>> >> Date: 17 July 2012 01:59:45 PM GMT+01:00 >> To: Kenneth Heafield <[email protected]<mailto:[email protected]>> >> Subject: Re: [Moses-support] Moses Compiling Error Message "undefined >> reference to `boost::system::generic_category()'". >> >> From the looks of it, there no -L arg to gcc >> >> Hieu >> Sent from my flying horse >> >> On 17 Jul 2012, at 09:44 AM, Kenneth Heafield <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi, >> >> I've updated my Linux box to 1.50 and am unable to reproduce this >> issue. However, I just checked in a shot-in-the-dark attempted fix. If >> that doesn't work, try the attached Jamroot. Put it in the root of your >> Moses checkout. In both cases, use -a to force a recompile. >> >> Kenneth >> >> On 07/16/12 21:51, Ben Ma wrote: >> Hello, Guys, >> I had problem for compiling the moses. >> >> First, I tried to use boost1_50_0. It did not work. >> Then, I tried to use boost1_46_1. It still did not work. >> Basically they had the same error message "undefined reference to >> `boost::system::generic_category()'". >> Detailed messages are list as follows. >> The command I used was: >> sudo ./bjam threading=single variant=release debug-symbols=off >> --with-boost=/home/moses/boost1461 -j22 -a -q >> The error message is as follows: >> Does anyone can help to solve this problem? >> >> gcc.link moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/moses_chart >> >> moses/src/bin/gcc-4.4.6/release/link-static/libmoses_internal.a(FactorCollection.o): >> In function `global constructors keyed to >> _ZN5Moses16FactorCollection10s_instanceE': >> FactorCollection.cpp:(.text+0x55): undefined reference to >> `boost::system::generic_category()' >> FactorCollection.cpp:(.text+0x61): undefined reference to >> `boost::system::generic_category()' >> FactorCollection.cpp:(.text+0x6d): undefined reference to >> `boost::system::system_category()' >> collect2: ld returned 1 exit status >> >> "g++" -o >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/moses_chart" >> -Wl,--start-group >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/Main.o" >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/mbr.o" >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/IOWrapper.o" >> >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/TranslationAnalysis.o" >> "moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/PhraseDictionary.o" >> "moses/src/bin/gcc-4.4.6/release/link-static/libmoses_internal.a" >> "util/bin/gcc-4.4.6/release/link-static/libkenutil.a" >> >> "moses/src/Scope3Parser/bin/gcc-4.4.6/release/link-static/libScope3Parser.a" >> >> "moses/src/CYKPlusParser/bin/gcc-4.4.6/release/link-static/libCYKPlusParser.a" >> "OnDiskPt/bin/gcc-4.4.6/release/link-static/libOnDiskPt.a" >> "moses/src/RuleTable/bin/gcc-4.4.6/release/link-static/libRuleTable.a" >> >> "moses/src/Scope3Parser/bin/gcc-4.4.6/release/link-static/libScope3Parser.a" >> "moses/src/LM/bin/gcc-4.4.6/release/link-static/libLM.a" >> "lm/bin/gcc-4.4.6/release/link-static/libkenlm.a" >> >> "moses/src/CYKPlusParser/bin/gcc-4.4.6/release/link-static/libCYKPlusParser.a" >> "moses/src/bin/gcc-4.4.6/release/link-static/libmoses_internal.a" >> "util/bin/gcc-4.4.6/release/link-static/libkenutil.a" -Wl,-Bstatic >> -Wl,-Bdynamic -lz -lSegFault -lz -Wl,--end-group >> >> >> ...failed gcc.link >> moses-chart-cmd/src/bin/gcc-4.4.6/release/link-static/moses_chart... >> gcc.compile.c++ mert/bin/gcc-4.4.6/release/link-static/TER/tools.o >> >> Thanks a lot. >> Best regards, >> Ben >> >> >> _______________________________________________ >> Moses-support mailing list >> [email protected]<mailto:[email protected]> >> http://mailman.mit.edu/mailman/listinfo/moses-support >> <Jamroot> >> _______________________________________________ >> Moses-support mailing list >> [email protected]<mailto:[email protected]> >> http://mailman.mit.edu/mailman/listinfo/moses-support >> >> _______________________________________________ >> Moses-support mailing list >> [email protected]<mailto:[email protected]> >> http://mailman.mit.edu/mailman/listinfo/moses-support >> >> >
_______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
