Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmke error #25

Open
CK-IMUT-501 opened this issue Dec 3, 2021 · 3 comments
Open

cmke error #25

CK-IMUT-501 opened this issue Dec 3, 2021 · 3 comments

Comments

@CK-IMUT-501
Copy link

When I try to cmake the mgiza, it appears

'Performing Test TR1_SHARED_PTR_USE_MEMORY - Failed'

'Performing Test TR1_UNORDERED_MAP_USE_UNORDERED_MAP - Failed'

Could you please tell me what maybe the reason?

export BOOST_ROOT=/home/user1/moses/boost
cmake .

-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- You have not set the install dir, default to './inst', if
you want to set it, use cmake -DCMAKE_INSTALL_PREFIX to do so
-- Performing Test TR1_SHARED_PTR_USE_TR1_MEMORY
-- Performing Test TR1_SHARED_PTR_USE_TR1_MEMORY - Success

-- Performing Test TR1_SHARED_PTR_USE_MEMORY

-- Performing Test TR1_SHARED_PTR_USE_MEMORY - Failed

-- Performing Test TR1_UNORDERED_MAP_USE_TR1_UNORDERED_MAP
-- Performing Test TR1_UNORDERED_MAP_USE_TR1_UNORDERED_MAP - Success

-- Performing Test TR1_UNORDERED_MAP_USE_UNORDERED_MAP

-- Performing Test TR1_UNORDERED_MAP_USE_UNORDERED_MAP - Failed

Boost 1.41 found.
Found Boost components:
thread;system
Boost found
-- Boost_INCLUDE_DIR :
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user1/Word_Alignment/a/mgiza/mgizapp

make

Scanning dependencies of target snt2coocrmp
[ 1%] Building CXX object src/CMakeFiles/snt2coocrmp.dir/snt2cooc-reduce-mem-preprocess.cpp.o
[ 2%] Linking CXX executable ../bin/snt2coocrmp
[ 2%] Built target snt2coocrmp
Scanning dependencies of target snt2plain
[ 4%] Building CXX object src/CMakeFiles/snt2plain.dir/snt2plain.cpp.o
[ 5%] Linking CXX executable ../bin/snt2plain
[ 5%] Built target snt2plain
Scanning dependencies of target snt2cooc
[ 7%] Building CXX object src/CMakeFiles/snt2cooc.dir/snt2cooc.cpp.o
[ 8%] Linking CXX executable ../bin/snt2cooc
[ 8%] Built target snt2cooc
Scanning dependencies of target mgiza_lib
[ 10%] Building CXX object src/CMakeFiles/mgiza_lib.dir/alignment.cpp.o
[ 11%] Building CXX object src/CMakeFiles/mgiza_lib.dir/AlignTables.cpp.o
[ 13%] Building CXX object src/CMakeFiles/mgiza_lib.dir/ATables.cpp.o
[ 14%] Building C object src/CMakeFiles/mgiza_lib.dir/cmd.c.o
[ 16%] Building CXX object src/CMakeFiles/mgiza_lib.dir/collCounts.cpp.o
[ 17%] Building CXX object src/CMakeFiles/mgiza_lib.dir/Dictionary.cpp.o
[ 19%] Building CXX object src/CMakeFiles/mgiza_lib.dir/ForwardBackward.cpp.o
[ 20%] Building CXX object src/CMakeFiles/mgiza_lib.dir/getSentence.cpp.o
[ 22%] Building CXX object src/CMakeFiles/mgiza_lib.dir/hmm.cpp.o
[ 23%] Building CXX object src/CMakeFiles/mgiza_lib.dir/HMMTables.cpp.o
[ 25%] Building CXX object src/CMakeFiles/mgiza_lib.dir/logprob.cpp.o
[ 26%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model1.cpp.o
[ 27%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model2.cpp.o
[ 29%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model2to3.cpp.o
[ 30%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model345-peg.cpp.o
[ 32%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model3.cpp.o
/home/user1/Word_Alignment/a/mgiza/mgizapp/src/model3.cpp:735:0: warning: "TRAIN_ARGS" redefined
#define TRAIN_ARGS perp, trainViterbiPerp, sHandler1, true, alignfile.c_str(), true, modelName,is_final
^
/home/user1/Word_Alignment/a/mgiza/mgizapp/src/model3.cpp:481:0: note: this is the location of the previous definition
#define TRAIN_ARGS perp, trainViterbiPerp, sHandler1, dump_files, alignfile.c_str(), true, modelName,is_final
^
[ 33%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model3_viterbi.cpp.o
[ 35%] Building CXX object src/CMakeFiles/mgiza_lib.dir/model3_viterbi_with_tricks.cpp.o
[ 36%] Building CXX object src/CMakeFiles/mgiza_lib.dir/MoveSwapMatrix.cpp.o
[ 38%] Building CXX object src/CMakeFiles/mgiza_lib.dir/myassert.cpp.o
[ 39%] Building CXX object src/CMakeFiles/mgiza_lib.dir/NTables.cpp.o
[ 41%] Building CXX object src/CMakeFiles/mgiza_lib.dir/Parameter.cpp.o
[ 42%] Building CXX object src/CMakeFiles/mgiza_lib.dir/parse.cpp.o
[ 44%] Building CXX object src/CMakeFiles/mgiza_lib.dir/Perplexity.cpp.o
[ 45%] Building CXX object src/CMakeFiles/mgiza_lib.dir/reports.cpp.o
[ 47%] Building CXX object src/CMakeFiles/mgiza_lib.dir/SetArray.cpp.o
[ 48%] Building CXX object src/CMakeFiles/mgiza_lib.dir/transpair_model3.cpp.o
[ 50%] Building CXX object src/CMakeFiles/mgiza_lib.dir/transpair_model4.cpp.o
[ 51%] Building CXX object src/CMakeFiles/mgiza_lib.dir/transpair_model5.cpp.o
[ 52%] Building CXX object src/CMakeFiles/mgiza_lib.dir/TTables.cpp.o
[ 54%] Building CXX object src/CMakeFiles/mgiza_lib.dir/utility.cpp.o
[ 55%] Building CXX object src/CMakeFiles/mgiza_lib.dir/vocab.cpp.o
[ 57%] Linking CXX static library ../lib/libmgiza.a
[ 57%] Built target mgiza_lib
Scanning dependencies of target mgiza
[ 58%] Building CXX object src/CMakeFiles/mgiza.dir/main.cpp.o
[ 60%] Linking CXX executable ../bin/mgiza
[ 60%] Built target mgiza
Scanning dependencies of target hmmnorm
[ 61%] Building CXX object src/CMakeFiles/hmmnorm.dir/hmmnorm.cxx.o
[ 63%] Linking CXX executable ../bin/hmmnorm
[ 63%] Built target hmmnorm
Scanning dependencies of target plain2snt
[ 64%] Building CXX object src/CMakeFiles/plain2snt.dir/plain2snt.cpp.o
[ 66%] Linking CXX executable ../bin/plain2snt
[ 66%] Built target plain2snt
Scanning dependencies of target symal
[ 67%] Building CXX object src/CMakeFiles/symal.dir/symal.cpp.o
[ 69%] Building C object src/CMakeFiles/symal.dir/cmd.c.o
[ 70%] Linking CXX executable ../bin/symal
[ 70%] Built target symal
Scanning dependencies of target d4norm
[ 72%] Building CXX object src/CMakeFiles/d4norm.dir/d4norm.cxx.o
[ 73%] Linking CXX executable ../bin/d4norm
[ 73%] Built target d4norm
Scanning dependencies of target mkcls
[ 75%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/GDAOptimization.cpp.o
[ 76%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/general.cpp.o
[ 77%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/HCOptimization.cpp.o
[ 79%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/IterOptimization.cpp.o
[ 80%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/KategProblem.cpp.o
[ 82%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/KategProblemKBC.cpp.o
[ 83%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/KategProblemTest.cpp.o
[ 85%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/KategProblemWBC.cpp.o
[ 86%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/mkcls.cpp.o
[ 88%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/MYOptimization.cpp.o
[ 89%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/Optimization.cpp.o
[ 91%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/Problem.cpp.o
[ 92%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/ProblemTest.cpp.o
[ 94%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/RRTOptimization.cpp.o
[ 95%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/SAOptimization.cpp.o
[ 97%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/StatVar.cpp.o
[ 98%] Building CXX object src/mkcls/CMakeFiles/mkcls.dir/TAOptimization.cpp.o
[100%] Linking CXX executable ../../bin/mkcls
[100%] Built target mkcls

make install

[ 2%] Built target snt2coocrmp
[ 5%] Built target snt2plain
[ 8%] Built target snt2cooc
[ 57%] Built target mgiza_lib
[ 60%] Built target mgiza
[ 63%] Built target hmmnorm
[ 66%] Built target plain2snt
[ 70%] Built target symal
[ 73%] Built target d4norm
[100%] Built target mkcls
Install the project...
-- Install configuration: ""
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/lib/libmgiza.a
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./mgiza
-- Set runtime path of "inst/./mgiza" to ""
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./snt2cooc
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./snt2plain
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./plain2snt
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./symal
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./hmmnorm
-- Set runtime path of "inst/./hmmnorm" to ""
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./d4norm
-- Set runtime path of "inst/./d4norm" to ""
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./snt2coocrmp
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./mkcls
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./force-align-moses.sh
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./giza2bal.pl
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./merge_alignment.py
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./plain2snt-hasvcb.py
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./sntpostproc.py
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./force-align-moses-old.sh
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./run.sh
-- Installing: /home/user1/Word_Alignment/a/mgiza/mgizapp/inst/./snt2cooc.pl

@hieuhoang
Copy link
Contributor

gcc 4.9.3 and boost 1.41 is probably too old for anyone to help you with. Perhaps update your system to Ubuntu 20.04 and try with updated compiler and boost

@CK-IMUT-501
Copy link
Author

gcc 4.9.3 and boost 1.41 is probably too old for anyone to help you with. Perhaps update your system to Ubuntu 20.04 and try with updated compiler and boost

Thank you for your reply. I will recompile mgiza with gcc-7 and boost_1_72_0.

By the way, I installed moses according to the following tutorial, which mentioned "Downgrading GCC and G++ compilers in Ubuntu is mandatory to build some packages (like IRSTLM, Giza++, Moses, etc.). In this tutorial, I will present an easy way to install gcc-4.4, gcc-4.6, gcc-4.9, g++-4.4, g++-4.6, and, g++-4.9.".

https://achrafothman.net/site/how-to-install-moses-statistical-machine-translation-in-ubuntu/
https://achrafothman.net/site/how-to-downgrade-gcc-and-g-in-ubuntu/

@hieuhoang
Copy link
Contributor

hieuhoang commented Dec 5, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants