Closed chrisreidy closed 2 years ago
What were the last lines of CMake console output? Did it generate raxml-ng executable?
Chances are, what you see in CMakeError.log might not be an error at all: https://stackoverflow.com/questions/63985373/cmake-error-undefined-reference-to-pthread-create
These are the final lines: collect2: error: ld returned 1 exit status make[2]: [../test/bin/raxml_test] Error 1 make[1]: [test/src/CMakeFiles/raxml_test_module.dir/all] Error 2 make: *** [all] Error 2 Build FAILED (exit status 2)!!
There is nothing in this directory ../test/bin
In ../bin there is raxml-ng-mpi
OK so apparently raxml-ng was compiled successfully, but unit test compilation failed.
Unfortunately, I cannot the actual error, could you please run
VERBOSE=1 CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=${InstallRoot} -DUSE_MPI=ON
and post full output?
Here is the output file as requested. Thank you raxml.output.pdf
Thank you, looks like your GTest lib cannot be linked, probably incompatible version (built with a different compiler etc.)
Could you please try to comment out this line:
https://github.com/amkozlov/raxml-ng/blob/master/CMakeLists.txt#L154
and re-run build with
CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=${InstallRoot} -DUSE_MPI=ON
make
I have the same result from commenting out that line, deleting the build directory and re-running the build. Since the executable was created I set up the module for the customer. I installed gtest from yum. I could compile it and create a module to ensure compatibility. Thanks
Yes, this should help. I think the problem is that you are using system gtest but non-system gcc to build raxml-ng.
Hi Alexey My researcher is testing it out. If it works fine I will use it as is. I made a note for future builds to compile a separate gtest. So I will close this
Hi - at about 100% build I get a fatal error. I do this: git clone --recursive https://github.com/amkozlov/raxml-ng cd raxml-ng mkdir build && cd build CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=${InstallRoot} -DUSE_MPI=ON .. -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 ..
And get (CMakeError.log) this:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /opt/ohpc/admin/UAbuild/raxml/raxml-ng/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_4963d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4963d.dir/build.make CMakeFiles/cmTC_4963d.dir/build gmake[1]: Entering directory
/opt/ohpc/admin/UAbuild/raxml/raxml-ng/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_4963d.dir/src.c.o /opt/ohpc/pub/compiler/gcc/8.3.0/bin/gcc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_4963d.dir/src.c.o -c /opt/ohpc/admin/UAbuild/raxml/raxml-ng/build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_4963d /opt/ohpc/pub/utils/cmake/3.15.4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4963d.dir/link.txt --verbose=1 /opt/ohpc/pub/compiler/gcc/8.3.0/bin/gcc -DCMAKE_HAVE_LIBC_PTHREAD -L/opt/ohpc/pub/apps/bison/3.7.4/lib -rdynamic CMakeFiles/cmTC_4963d.dir/src.c.o -o cmTC_4963d CMakeFiles/cmTC_4963d.dir/src.c.o: In function
main': src.c:(.text+0x2d): undefined reference topthread_create' src.c:(.text+0x39): undefined reference to
pthread_detach' src.c:(.text+0x4a): undefined reference topthread_join' src.c:(.text+0x5e): undefined reference to
pthread_atfork' collect2: error: ld returned 1 exit status gmake[1]: [cmTC_4963d] Error 1 gmake[1]: Leaving directory `/opt/ohpc/admin/UAbuild/raxml/raxml-ng/build/CMakeFiles/CMakeTmp' gmake: [cmTC_4963d/fast] Error 2