espressopp / espressopp

Main ESPResSo++ repository

Home Page:http://www.espresso-pp.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Error: Linking CXX executable RealNDTest

JessLJY opened this issue · comments

Hi there, I used git clone and followed the Quick Install instructions on the ReadMe page and there were no errors during the cmake command. However, during the make command, I keep running into the following error and am hence perplexed as to how to approach this. I am a bit apprehensive to be changing file paths etc since this concerns cmake built files. I would really appreciate some advice on how I may resolve this, thank you!

[ 84%] Linking CXX shared library ../_espressopp.so
[ 84%] Built target _espressopp
[ 85%] Building CXX object testsuite/CMakeFiles/RealNDTest.dir/RealNDTest/RealNDTest.cpp.o
[ 85%] Linking CXX executable RealNDTest
/usr/bin/ld: cannot open output file RealNDTest: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [testsuite/CMakeFiles/RealNDTest.dir/build.make:108: testsuite/RealNDTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:697: testsuite/CMakeFiles/RealNDTest.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Can you do a make VERBOSE=1 and post the complete error message?

Sure thing, I have pasted the relevant (I hope so) section below. The full terminal output is quite long so I have included it as a text file in case it helps. Do let me know if you prefer me to make it from scratch i.e. 0%. Thank you for your time!
terminal output.txt

Consolidate compiler generated dependencies of target _espressopp
make[2]: Leaving directory '/home/jess/espressopp-3.1.0'
make  -f src/CMakeFiles/_espressopp.dir/build.make src/CMakeFiles/_espressopp.dir/build
make[2]: Entering directory '/home/jess/espressopp-3.1.0'
make[2]: Nothing to be done for 'src/CMakeFiles/_espressopp.dir/build'.
make[2]: Leaving directory '/home/jess/espressopp-3.1.0'
[ 84%] Built target _espressopp
make  -f testsuite/CMakeFiles/RealNDTest.dir/build.make testsuite/CMakeFiles/RealNDTest.dir/depend
make[2]: Entering directory '/home/jess/espressopp-3.1.0'
cd /home/jess/espressopp-3.1.0 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jess/espressopp-3.1.0 /home/jess/espressopp-3.1.0/testsuite /home/jess/espressopp-3.1.0 /home/jess/espressopp-3.1.0/testsuite /home/jess/espressopp-3.1.0/testsuite/CMakeFiles/RealNDTest.dir/DependInfo.cmake --color=
Dependencies file "testsuite/CMakeFiles/RealNDTest.dir/RealNDTest/RealNDTest.cpp.o.d" is newer than depends file "/home/jess/espressopp-3.1.0/testsuite/CMakeFiles/RealNDTest.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target RealNDTest
make[2]: Leaving directory '/home/jess/espressopp-3.1.0'
make  -f testsuite/CMakeFiles/RealNDTest.dir/build.make testsuite/CMakeFiles/RealNDTest.dir/build
make[2]: Entering directory '/home/jess/espressopp-3.1.0'
[ 84%] Linking CXX executable RealNDTest
cd /home/jess/espressopp-3.1.0/testsuite && /usr/bin/cmake -E cmake_link_script CMakeFiles/RealNDTest.dir/link.txt --verbose=1
/usr/bin/c++ -O3 -DNDEBUG CMakeFiles/RealNDTest.dir/RealNDTest/RealNDTest.cpp.o -o RealNDTest  -Wl,-rpath,/home/jess/espressopp-3.1.0:/usr/lib/x86_64-linux-gnu/openmpi/lib ../_espressopp.so /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_mpi.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_numpy310.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_python310.so.1.74.0 /usr/lib/x86_64-linux-gnu/libpython3.10.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so 
/usr/bin/ld: cannot open output file RealNDTest: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [testsuite/CMakeFiles/RealNDTest.dir/build.make:108: testsuite/RealNDTest] Error 1
make[2]: Leaving directory '/home/jess/espressopp-3.1.0'
make[1]: *** [CMakeFiles/Makefile2:697: testsuite/CMakeFiles/RealNDTest.dir/all] Error 2
make[1]: Leaving directory '/home/jess/espressopp-3.1.0'
make: *** [Makefile:146: all] Error 2

See my fix in #498 for now just do an out-of-source build:

cmake -B builddir .
cmake --build builddir

Thanks so much for the fix, really appreciate it!