Closed jpuigcerver closed 11 years ago
Looks like there's a problem with your installation of libboost-filesystem-dev and libboost-test-dev, but I'm not sure if they're simply missing or if there's a version conflict. Which libboost packages/versions are installed on your system? Can you please paste the output of:
dpkg --get-selections | grep libboost
Hi Joan,
I might know exactly (as exact as it can get) what the problem is...
are you trying to compile moses in the prhltcl machine? ;)
If so, the problem is that the version of libboost installed on
prhltcl is a quite out-dated version, and it was very difficult for me
to install a newer version. I've already managed to work it around
this problem, so we can take the discussion of how to solve this
particular issue off the list ;)
Cheers,
Germán
Quoting Joan Puigcerver notifications@github.com:
Hello,
I'm trying to compile the source code but I'm getting two compilation errors:
- ScoreFeatureTest.cpp:(.text.startup+0xb): undefined reference to
`boost::unit_test::unit_testmain(bool ()(), int, char_*)'- moses-cmd/Main.cpp:200:53: error: no match for ‘operator=’ in
‘hypergraphDir = boost::filesystem3::path::filename() const()’Compiler: GCC 4.6.3 OS: Ubuntu Linux 12.10 (64bits) Last commit: 3a4e63c558a5d5beaefbb2e45497b66e4d9ae72f
Any help to solve this problem will be really appreciated, Thanks!
PS: Here I post the full output of bjam:
$ bjam --with-srilm=/home/joapuipe/upv/miarfid/ta/tools/srilm
--with-giza=/home/joapuipe/upv/miarfid/ta/tools/bin -j4
debug-symbols=off warning: No toolsets are configured. warning: Configuring default toolset "gcc". warning: If the default is wrong, your build may not work correctly. warning: Use the "toolset=xxxxx" option to override our guess. warning: For more configuration options, please consult warning:
http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html ...patience... ...found 3374 targets... ...updating 6 targets... gcc.link
phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ScoreFeatureTestphrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ScoreFeatureTest.o: In function
main': ScoreFeatureTest.cpp:(.text.startup+0xb): undefined reference to
boost::unit_test::unit_testmain(bool ()(), int, char_*)' collect2: ld returned 1 exit status"g++" -o
"phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ScoreFeatureTest" -Wl,--start-group "phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ScoreFeatureTest.o" "phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/PhraseAlignment.o" "phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ThreadPool.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/HoleCollection.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/SyntaxTree.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/ExtractedRule.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/SentenceAlignmentWithSyntax.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/SentenceAlignment.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/domain.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/InputFileStream.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/OutputFileStream.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/XmlTree.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/AlignmentPhrase.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/tables-core.o" "phrase-extract/bin/gcc-4.6/release/link-static/threading-multi/ScoreFeature.o" "util/bin/gcc-4.6/release/link-static/threading-multi/read_compressed.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/diy-fp.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/double-conversion.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/fixed-dtoa.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/fast-dtoa.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/strtod.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/bignum.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/cached-powers.o" "util/double-conversion/bin/gcc-4.6/release/link-static/threading-multi/bignum-dtoa.o" "util/bin/gcc-4.6/release/link-static/threading-multi/bit_packing.o" "util/bin/gcc-4.6/release/link-static/threading-multi/ersatz_progress.o" "util/bin/gcc-4.6/release/link-static/threading-multi/exception.o" "util/bin/gcc-4.6/release/link-static/threading-multi/file.o" "util/bin/gcc-4.6/release/link-static/threading-multi/file_piece.o" "util/bin/gcc-4.6/release/link-static/threading-multi/mmap.o" "util/bin/gcc-4.6/release/link-static/threading-multi/murmur_hash.o" "util/bin/gcc-4.6/release/link-static/threading-multi/pool.o" "util/bin/gcc-4.6/release/link-static/threading-multi/scoped.o" "util/bin/gcc-4.6/release/link-static/threading-multi/string_piece.o" "util/bin/gcc-4.6/release/link-static/threading-multi/usage.o" -Wl,-Bstatic -lboost_unit_test_framework-mt -llzma -lbz2 -ltcmalloc_minimal -lboost_system-mt -lboost_thread-mt -lz -lboost_iostreams-mt -Wl,-Bdynamic -lSegFault -lrt -Wl,--end-group
-pthread...failed gcc.link
phrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi/ScoreFeatureTest... ...skipped
<pphrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi>ScoreFeatureTest.run for lack of
<pphrase-extract/bin/ScoreFeatureTest.test/gcc-4.6/release/link-static/threading-multi>ScoreFeatureTest... gcc.compile.c++
moses-cmd/bin/gcc-4.6/release/link-static/threading-multi/Main.o moses-cmd/Main.cpp: In member function ‘virtual void
MosesCmd::TranslationTask::Run()’: moses-cmd/Main.cpp:200:53: error: no match for ‘operator=’ in
‘hypergraphDir = boost::filesystem3::path::filename() const()’ moses-cmd/Main.cpp:200:53: note: candidates are: /usr/include/c++/4.6/bits/basic_string.h:541:7: note:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::operator=(const
std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char,
_Traits = std::char_traits, _Alloc = std::allocator ,
std::basic_string<_CharT, _Traits, _Alloc> = std::basic_string] /usr/include/c++/4.6/bits/basic_string.h:541:7: note: no known
conversion for argument 1 from ‘boost::filesystem3::path’ to ‘const
std::basic_string&’ /usr/include/c++/4.6/bits/basic_string.h:549:7: note:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::operator=(const CharT)
[with _CharT = char, _Traits = std::char_traits, _Alloc =
std::allocator, std::basic_string<_CharT, _Traits, _Alloc> =
std::basic_string] /usr/include/c++/4.6/bits/basicstring.h:549:7: note: no known
conversion for argument 1 from ‘boost::filesystem3::path’ to ‘const
char’ /usr/include/c++/4.6/bits/basic_string.h:560:7: note:
std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with
_CharT = char, _Traits = std::char_traits, _Alloc =
std::allocator, std::basic_string<_CharT, _Traits, _Alloc> =
std::basic_string] /usr/include/c++/4.6/bits/basic_string.h:560:7: note: no known
conversion for argument 1 from ‘boost::filesystem3::path’ to ‘char’"g++" -ftemplate-depth-128 -O3 -finline-functions
-Wno-inline -Wall -pthread -DKENLM_MAX_ORDER=6 -DLM_SRI
-DMAX_NUM_FACTORS=4 -DNDEBUG -DTRACE_ENABLE=1 -DWITH_THREADS
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I"."
-I"moses/TranslationModel/DynSAInclude" -I"util/double-conversion"
-c -o
"moses-cmd/bin/gcc-4.6/release/link-static/threading-multi/Main.o"
"moses-cmd/Main.cpp"...failed gcc.compile.c++
moses-cmd/bin/gcc-4.6/release/link-static/threading-multi/Main.o... ...skipped
<pmoses-cmd/bin/gcc-4.6/release/link-static/threading-multi>moses
for lack of
<pmoses-cmd/bin/gcc-4.6/release/link-static/threading-multi>Main.o... ...skipped <p/home/joapuipe/upv/miarfid/ta/tools/moses/bin>moses
for lack of
<pmoses-cmd/bin/gcc-4.6/release/link-static/threading-multi>Main.o... ...failed updating 2 targets... ...skipped 4 targets...
Reply to this email directly or view it on GitHub: https://github.com/moses-smt/mosesdecoder/issues/32
This message was sent using IMP, the Internet Messaging Program.
@rsennrich Thanks for your reply. I previously had installed the version 1.49 of libboost, I updated to 1.50 and now I only get 1 error (the second one that I posted before). The list of installed packages is attached at the end of this message. @GSanchis Nops... I'm installing Moses on my personal machine (at home), but anyway, we can discuss the reasons next week.
Thanks!
List of libboost* packages:
libboost-chrono1.49.0 deinstall
libboost-chrono1.50-dev install
libboost-chrono1.50.0 install
libboost-date-time1.49.0 install
libboost-date-time1.50-dev install
libboost-date-time1.50.0 install
libboost-exception1.50-dev install
libboost-exception1.50.0 install
libboost-filesystem1.49.0 deinstall
libboost-filesystem1.50-dev install
libboost-filesystem1.50.0 install
libboost-graph-parallel1.49.0 deinstall
libboost-graph-parallel1.50-dev install
libboost-graph-parallel1.50.0 install
libboost-graph1.49.0 deinstall
libboost-graph1.50-dev install
libboost-graph1.50.0 install
libboost-iostreams1.49.0 install
libboost-iostreams1.50-dev install
libboost-iostreams1.50.0 install
libboost-locale1.49.0 deinstall
libboost-locale1.50-dev install
libboost-locale1.50.0 install
libboost-math1.49.0 deinstall
libboost-math1.50-dev install
libboost-math1.50.0 install
libboost-mpi-python1.49.0 deinstall
libboost-mpi-python1.50-dev install
libboost-mpi-python1.50.0 install
libboost-mpi1.49.0 deinstall
libboost-mpi1.50-dev install
libboost-mpi1.50.0 install
libboost-program-options1.49.0 deinstall
libboost-program-options1.50-dev install
libboost-program-options1.50.0 install
libboost-python1.49.0 deinstall
libboost-python1.50-dev install
libboost-python1.50.0 install
libboost-random1.49.0 deinstall
libboost-random1.50-dev install
libboost-random1.50.0 install
libboost-regex1.49.0 install
libboost-regex1.50-dev install
libboost-regex1.50.0 install
libboost-serialization1.49.0 deinstall
libboost-serialization1.50-dev install
libboost-serialization1.50.0 install
libboost-signals1.49.0 deinstall
libboost-signals1.50-dev install
libboost-signals1.50.0 install
libboost-system1.49.0 deinstall
libboost-system1.50-dev install
libboost-system1.50.0 install
libboost-test1.49.0 deinstall
libboost-test1.50-dev install
libboost-test1.50.0 install
libboost-thread1.49.0 deinstall
libboost-thread1.50-dev install
libboost-thread1.50.0 install
libboost-timer1.49.0 deinstall
libboost-timer1.50-dev install
libboost-timer1.50.0 install
libboost-wave1.49.0 deinstall
libboost-wave1.50-dev install
libboost-wave1.50.0 install
libboost1.50-all-dev install
libboost1.50-dev install
Can you try with boost 1.52 or 1.53? You can download it from http://www.boost.org/ BUILD-INSTRUCTIONS.txt in Moses has instructions on how to compile boost so that it is compatible with Moses.
If you don't want to install boost in the systems directory, you can with --with-boost=... eg. ./bjam --with-irstlm=/home/s0565741/workspace/irstlm/trunk/ --with-cmph=/home/s0565741/workspace/cmph-2.0 --with-boost=/home/s0565741/workspace/boost/boost_1_52_0/ -j22
I'll try and look at the boost 1.50 next week
Looked at it briefly. It seems there is a compile error caused by different versions of boost.
I've fixed it by commenting out the offending line https://github.com/moses-smt/mosesdecoder/commit/db005f6503a5179e0427b460d8039e8920c8d65b let me know if it works for you
this breaks Lane's lattice search graph output
On 23/03/2013 12:59, Joan Puigcerver wrote:
@rsennrich https://github.com/rsennrich Thanks for your reply. I previously had installed the version 1.49 of libboost, I updated to 1.50 and now I only get 1 error (the second one that I posted before). The list of installed packages is attached at the end of this message. @GSanchis https://github.com/GSanchis Nops... I'm installing Moses on my personal machine (at home), but anyway, we can discuss the reasons next week.
Thanks!
List of libboost* packages:
libboost-chrono1.49.0 deinstall libboost-chrono1.50-dev install libboost-chrono1.50.0 install libboost-date-time1.49.0 install libboost-date-time1.50-dev install libboost-date-time1.50.0 install libboost-exception1.50-dev install libboost-exception1.50.0 install libboost-filesystem1.49.0 deinstall libboost-filesystem1.50-dev install libboost-filesystem1.50.0 install libboost-graph-parallel1.49.0 deinstall libboost-graph-parallel1.50-dev install libboost-graph-parallel1.50.0 install libboost-graph1.49.0 deinstall libboost-graph1.50-dev install libboost-graph1.50.0 install libboost-iostreams1.49.0 install libboost-iostreams1.50-dev install libboost-iostreams1.50.0 install libboost-locale1.49.0 deinstall libboost-locale1.50-dev install libboost-locale1.50.0 install libboost-math1.49.0 deinstall libboost-math1.50-dev install libboost-math1.50.0 install libboost-mpi-python1.49.0 deinstall libboost-mpi-python1.50-dev install libboost-mpi-python1.50.0 install libboost-mpi1.49.0 deinstall libboost-mpi1.50-dev install libboost-mpi1.50.0 install libboost-program-options1.49.0 deinstall libboost-program-options1.50-dev install libboost-program-options1.50.0 install libboost-python1.49.0 deinstall libboost-python1.50-dev install libboost-python1.50.0 install libboost-random1.49.0 deinstall libboost-random1.50-dev install libboost-random1.50.0 install libboost-regex1.49.0 install libboost-regex1.50-dev install libboost-regex1.50.0 install libboost-serialization1.49.0 deinstall libboost-serialization1.50-dev install libboost-serialization1.50.0 install libboost-signals1.49.0 deinstall libboost-signals1.50-dev install libboost-signals1.50.0 install libboost-system1.49.0 deinstall libboost-system1.50-dev install libboost-system1.50.0 install libboost-test1.49.0 deinstall libboost-test1.50-dev install libboost-test1.50.0 install libboost-thread1.49.0 deinstall libboost-thread1.50-dev install libboost-thread1.50.0 install libboost-timer1.49.0 deinstall libboost-timer1.50-dev install libboost-timer1.50.0 install libboost-wave1.49.0 deinstall libboost-wave1.50-dev install libboost-wave1.50.0 install libboost1.50-all-dev install libboost1.50-dev install — Reply to this email directly or view it on GitHub https://github.com/moses-smt/mosesdecoder/issues/32#issuecomment-15336696.
This commit commented out line 200 in moses-cmd/Main.cpp:
hypergraphDir = nbestPath.parent_path().filename();
Was this line causing your problem? If so, I'm surprised that commenting it out fixed it, because I'm doing the same thing on line 608.
On Sat, Mar 23, 2013 at 12:01 PM, Hieu Hoang hieuhoang@gmail.com wrote:
Looked at it briefly. It seems there is a compile error caused by different versions of boost.
I've fixed it by commenting out the offending line https://github.com/moses-smt/mosesdecoder/commit/db005f6503a5179e0427b460d8039e8920c8d65b let me know if it works for you
this breaks Lane's lattice search graph output
On 23/03/2013 12:59, Joan Puigcerver wrote:
@rsennrich Thanks for your reply. I previously had installed the version 1.49 of libboost, I updated to 1.50 and now I only get 1 error (the second one that I posted before). The list of installed packages is attached at the end of this message. @GSanchis Nops... I'm installing Moses on my personal machine (at home), but anyway, we can discuss the reasons next week.
Thanks!
List of libboost* packages:
libboost-chrono1.49.0 deinstall libboost-chrono1.50-dev install libboost-chrono1.50.0 install libboost-date-time1.49.0 install libboost-date-time1.50-dev install libboost-date-time1.50.0 install libboost-exception1.50-dev install libboost-exception1.50.0 install libboost-filesystem1.49.0 deinstall libboost-filesystem1.50-dev install libboost-filesystem1.50.0 install libboost-graph-parallel1.49.0 deinstall libboost-graph-parallel1.50-dev install libboost-graph-parallel1.50.0 install libboost-graph1.49.0 deinstall libboost-graph1.50-dev install libboost-graph1.50.0 install libboost-iostreams1.49.0 install libboost-iostreams1.50-dev install libboost-iostreams1.50.0 install libboost-locale1.49.0 deinstall libboost-locale1.50-dev install libboost-locale1.50.0 install libboost-math1.49.0 deinstall libboost-math1.50-dev install libboost-math1.50.0 install libboost-mpi-python1.49.0 deinstall libboost-mpi-python1.50-dev install libboost-mpi-python1.50.0 install libboost-mpi1.49.0 deinstall libboost-mpi1.50-dev install libboost-mpi1.50.0 install libboost-program-options1.49.0 deinstall libboost-program-options1.50-dev install libboost-program-options1.50.0 install libboost-python1.49.0 deinstall libboost-python1.50-dev install libboost-python1.50.0 install libboost-random1.49.0 deinstall libboost-random1.50-dev install libboost-random1.50.0 install libboost-regex1.49.0 install libboost-regex1.50-dev install libboost-regex1.50.0 install libboost-serialization1.49.0 deinstall libboost-serialization1.50-dev install libboost-serialization1.50.0 install libboost-signals1.49.0 deinstall libboost-signals1.50-dev install libboost-signals1.50.0 install libboost-system1.49.0 deinstall libboost-system1.50-dev install libboost-system1.50.0 install libboost-test1.49.0 deinstall libboost-test1.50-dev install libboost-test1.50.0 install libboost-thread1.49.0 deinstall libboost-thread1.50-dev install libboost-thread1.50.0 install libboost-timer1.49.0 deinstall libboost-timer1.50-dev install libboost-timer1.50.0 install libboost-wave1.49.0 deinstall libboost-wave1.50-dev install libboost-wave1.50.0 install libboost1.50-all-dev install libboost1.50-dev install
— Reply to this email directly or view it on GitHub.
When a place gets crowded enough to require ID's, social collapse is not far away. It is time to go elsewhere. The best thing about space travel is that it made it possible to go elsewhere. -- R.A. Heinlein, "Time Enough For Love"
@hieuhoang Yes, commenting line 200 works. I also tried to build Moses with a newer version of Boost (1_53_0), and compilation still fails at the same line. I fixed the problem changing the line for:
hypergraphDir = nbestPath.parent_path().filename().native();
According to the Boost doc, nbestPath.parent_path().filename() returns a path object, to get the correspondent std::string representation, one must call one of the methods listed in: http://www.boost.org/doc/libs/1_53_0/libs/filesystem/doc/reference.html#path-native-format-observers
native() is supposed to return the path in the specific OS path format (using backslashes for Windows). Anyway, since we are considering only the filename here, the result is the same.
I sent a pull request.
merged. mucho gracias
Hello,
I'm trying to compile the source code but I'm getting two compilation errors:
Compiler: GCC 4.6.3 OS: Ubuntu Linux 12.10 (64bits) Last commit: 3a4e63c558a5d5beaefbb2e45497b66e4d9ae72f
Any help to solve this problem will be really appreciated, Thanks!
PS: Here I post the full output of bjam: