computations / root_digger

A tool to root phylogenies
MIT License
19 stars 7 forks source link

trouble building (both source and docker) #22

Closed iaindhay closed 1 month ago

iaindhay commented 2 months ago

trying to get this installed on Ubuntu 22. running in the this error:

...
[ 92%] Linking CXX static library ../../../../../lib/coraxlib/bin/libcorax.a
[ 92%] Built target corax
[ 93%] Building CXX object src/CMakeFiles/rd.dir/main.cpp.o
[ 94%] Building CXX object src/CMakeFiles/rd.dir/checkpoint.cpp.o
[ 95%] Building CXX object src/CMakeFiles/rd.dir/model.cpp.o
[ 96%] Building CXX object src/CMakeFiles/rd.dir/msa.cpp.o
[ 97%] Building CXX object src/CMakeFiles/rd.dir/tree.cpp.o
[ 98%] Building CXX object src/CMakeFiles/rd.dir/util.cpp.o
[100%] Linking CXX executable ../../bin/rd
/usr/bin/ld: ../../lib/coraxlib/bin/libcorax.a(core_pmatrix.c.o): in function `corax_core_update_pmatrix_nonrev_ss':
core_pmatrix.c:(.text+0x82): undefined reference to `LAPACKE_dlange'
/usr/bin/ld: core_pmatrix.c:(.text+0x2f4): undefined reference to `LAPACKE_dgesv'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/rd.dir/build.make:181: ../bin/rd] Error 1
make[1]: *** [CMakeFiles/Makefile2:418: src/CMakeFiles/rd.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Have installed libopenblas-dev and liblapacke-dev via apt (also tried the intel MKL in apt). I get the same (or very similar error) when i try to install with Docker

process: git clone --recursivehttps://github.com/computations/root_digger cd root_digger/ mkdir build cmake .. make`

Any hints appreciated.

Edit/ Docker error:

...
22.24 [ 96%] Building CXX object src/CMakeFiles/rd.dir/msa.cpp.o
22.97 [ 97%] Building CXX object src/CMakeFiles/rd.dir/tree.cpp.o
24.11 [ 98%] Building CXX object src/CMakeFiles/rd.dir/util.cpp.o
24.49 [100%] Linking CXX executable ../../bin/rd
24.55 /usr/bin/ld: ../../lib/coraxlib/bin/libcorax.a(core_pmatrix.c.o): in function `corax_core_update_pmatrix_nonrev_ss':
24.55 core_pmatrix.c:(.text+0x82): undefined reference to `LAPACKE_dlange'
24.55 /usr/bin/ld: core_pmatrix.c:(.text+0x2f4): undefined reference to `LAPACKE_dgesv'
24.56 collect2: error: ld returned 1 exit status
24.56 make[3]: *** [src/CMakeFiles/rd.dir/build.make:181: ../bin/rd] Error 1
24.56 make[3]: Leaving directory '/root_digger/build'
24.56 make[2]: Leaving directory '/root_digger/build'
24.56 make[2]: *** [CMakeFiles/Makefile2:418: src/CMakeFiles/rd.dir/all] Error 2
24.56 make[1]: *** [Makefile:91: all] Error 2
24.56 make[1]: Leaving directory '/root_digger/build'
24.56 make: *** [makefile:4: release] Error 2
------
Dockerfile:7
--------------------
   5 |     apt-get install --assume-yes build-essential git cmake libopenblas-dev liblapacke-dev pkgconf && mkdir root_digger
   6 |     RUN git clone https://github.com/computations/root_digger/ --depth=1 --recursive
   7 | >>> RUN cd root_digger && make && cp bin/rd /usr/local/bin/
   8 |     CMD ["--help"]
   9 |     ENTRYPOINT ["rd"]
--------------------
ERROR: failed to solve: process "/bin/sh -c cd root_digger && make && cp bin/rd /usr/local/bin/" did not complete successfully: exit code: 2
computations commented 2 months ago

There are a few things that can be going wrong, but it's a bit hard to tell with the abridged log that you provided. Could you give me the entire output of cmake -LAH -Bbuild?

For things you can try right away (in no particular order):

In the meantime, I'll try to fix the docker image. Thanks for reporting the issue, I will fix it as soon as possible.

computations commented 2 months ago

It seems there was an issue in the build configuration that was missing the lapacke linking flag. This has been fixed now, and it definitely works for the docker file now. Please let me know that this solved your issue

computations commented 1 month ago

Given that there has been no update, I am closing this issue