unable to compile root digger using cmake
Niv94 opened this issue · 44 comments
Dear team member,
This is the same issue I posted last month. Sorry I could not reopen it. I downloaded the source code and built it using the 'cmake' command. But I am not sure what went wrong . I don't see rd file inside the 'bin'. Could you please help? Attached is the log after running cmake. Thanks in advance.
MacBook-Pro:root_digger nivi$ cmake /Users/nivi/root_digger/
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.32.0 (Apple Git-132)")
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found GSL: /usr/local/include (found version "2.6")
CMake Deprecation Warning at lib/pll-modules/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- pll-modules static build enabled
CMake Deprecation Warning at lib/pll-modules/libs/libpll/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Disable sse simd, because not supported
-- Disable avx simd, because not supported
-- Disable avx2 simd, because not supported
-- Libpll static build enabled
-- pll_static
CMake Deprecation Warning at lib/pll-modules/src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Will compile pll-module optimize
-- Will compile pll-module algorithm
-- Will compile pll-module binary
-- Will compile pll-module msa
-- Will compile pll-module tree
-- Will compile pll-module util
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nivi/root_digger
Hey, thanks for following up.
This is just the configure step. You still need to run make
wherever these files are stored. So in this case you should run
cd /Users/nivi/root_digger
make
Let me know if that works!
Can you try removing the directory, using git to download it again, and then just running make
again? I think there are some conflicts with what CMake did and some existing flies. Try this and see if it works.
I guess this is a bit odd, because the cmake
command worked earlier. Did something change? Possibly you need to either install it, or if you have it installed already then add it to your path.
hmmm, maybe the submodules aren't checked out? Try
git submodule update --init --recursive
and then make again.
Thank you so much for sticking with it. I have one more thing that I need then. Can you run
VERBOSE=1 make
and let me know the output? Thanks!
Thank you so much for your efforts! There was an error in the build configuration, where if OpenMP was not installed, the build would fail. I have pushed a change which makes OpenMP optional. Please try again with the new git version.
I sent a reply through email, but I am not sure if it actually made it. Sorry for the delay. Regardless, I just pushed a change that will (hopefully) truly fix this. However, if it doesn't work, I would suggest just installing openmp, as it will make the program run faster anyways.
Hmm, thats odd. The build process should download and install gsl. You can try make static-gsl
and it should force the build script to download and build gsl.
I pushed a change which should fix this. Thanks again for your efforts!
@Niv94 Are you still having trouble building RootDigger?
I'm sorry that you have had such trouble building RootDigger. I am still happy to help. What was the most recent error that you got?
I'm not sure the attachment made it through github. I am using the github issue tracker, and it appears that the image you attached didn't make it onto the issue. Would it be possible to upload the image, or even just paste the text of the terminal into an email?
Ah, I see a problem. You ran cmake
which only sets up the build. After that you can run make
, which will actually build the software. I'm sorry, I know its dumb, but without running make
the bin
directory should be empty.
Hello, I received same error as above. I cloned the repo and then used 'make'. I attached the result below. I am excited to RootDigger and would greatly appreciate your advice here. Best, Tyler
(base) [tyler@linux root_digger]$ make
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /home/tyler/.linuxbrew/bin/cc
-- Check for working C compiler: /home/tyler/.linuxbrew/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: /home/tyler/.linuxbrew/bin/c++
-- Check for working CXX compiler: /home/tyler/.linuxbrew/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /home/tyler/.linuxbrew/bin/git (found version "2.23.0")
-- Found PkgConfig: /home/tyler/.linuxbrew/bin/pkg-config (found version "0.29.2")
-- Found GSL: /usr/include (found version "1.15")
-- pll-modules static build enabled
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.5.37")
-- SSE enabled. To disable it, run cmake with -DENABLE_SSE=false
-- AVX enabled. To disable it, run cmake with -DENABLE_AVX=false
-- AVX2 enabled. To disable it, run cmake with -DENABLE_AVX2=false
-- Libpll static build enabled
-- pll_static
-- Will compile pll-module optimize
-- Will compile pll-module algorithm
-- Will compile pll-module binary
-- Will compile pll-module msa
-- Will compile pll-module tree
-- Will compile pll-module util
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BENCHMARK_ENABLE_LTO
-- Build files have been written to: /home/tyler/applications/root_digger/build
make[1]: Entering directory /home/tyler/applications/root_digger/build' make[2]: Entering directory
/home/tyler/applications/root_digger/build'
make[3]: Entering directory /home/tyler/applications/root_digger/build' [ 1%] [FLEX][lex_rtree_t] Building scanner with flex 2.5.37 [ 2%] [BISON][parse_utree_t] Building parser with bison 3.0.4 [ 3%] [FLEX][lex_utree_t] Building scanner with flex 2.5.37 [ 4%] [BISON][parse_rtree_t] Building parser with bison 3.0.4 Scanning dependencies of target pll_obj make[3]: Leaving directory
/home/tyler/applications/root_digger/build'
make[3]: Entering directory /home/tyler/applications/root_digger/build' [ 5%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/compress.c.o [ 6%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/parse_utree.c.o [ 7%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/lex_utree.c.o [ 8%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/parse_rtree.c.o [ 9%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/lex_rtree.c.o [ 10%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/core_derivatives.c.o [ 11%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/core_likelihood.c.o [ 12%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/core_partials.c.o [ 13%] Building C object lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/core_pmatrix.c.o /home/tyler/applications/root_digger/lib/pll-modules/libs/libpll/src/core_pmatrix.c:23:28: fatal error: gsl/gsl_linalg.h: No such file or directory compilation terminated. make[3]: *** [lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/core_pmatrix.c.o] Error 1 make[3]: Leaving directory
/home/tyler/applications/root_digger/build'
make[2]: *** [lib/pll-modules/libs/libpll/src/CMakeFiles/pll_obj.dir/all] Error 2
make[2]: Leaving directory /home/tyler/applications/root_digger/build' make[1]: *** [all] Error 2 make[1]: Leaving directory
/home/tyler/applications/root_digger/build'
make: *** [release] Error 2
Thanks for the report! I think I have a good handle of what is going on here, but I can't reproduce the issue on my machine. This means I am probably going to have to borrow a computer to solve this issue. The unfortunate upshot is that it will be some time before I will be able to fix this, sorry :(. I will post in in this issue when I think it is fixed.
I just updated RootDigger to v1.8.0
, which changes the libraries used for building. Specifically, RootDigger no longer requires GSL. Maybe this fixes the problems that people in this thread have been having?
I'm closing this issue due to inactivity
Could you please send me the terminal output from the command make
? It is a little hard to tell what is going wrong without that information.
Hello
How are you?
I have the same mistake. Could you help me?
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro Rootdigger % cd root_digger
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % ls
CMakeLists.txt benchmark lib src
LICENSE docs makefile test
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % make makefile
make: Nothing to be done for `makefile'.
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % make
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.30.1 (Apple Git-130)")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Disable SSE simd, because not supported
-- Disable AVX simd, because not supported
-- Disable AVX2 simd, because not supported
Non-rev enabled
-- coraxlib libraries: corax_static
-- Configuring done (1.1s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
BENCHMARK_ENABLE_LTO
-- Build files have been written to: /Users/katherin_otalora/Documents/Rootdigger/root_digger/build
[ 1%] Building C object lib/lbfgsb/CMakeFiles/lbfgs_lib.dir/lbfgsb.c.o
[ 2%] Building C object lib/lbfgsb/CMakeFiles/lbfgs_lib.dir/linesearch.c.o
[ 3%] Building C object lib/lbfgsb/CMakeFiles/lbfgs_lib.dir/linpack.c.o
[ 5%] Building C object lib/lbfgsb/CMakeFiles/lbfgs_lib.dir/miniCBLAS.c.o
[ 6%] Building C object lib/lbfgsb/CMakeFiles/lbfgs_lib.dir/subalgorithms.c.o
[ 7%] Linking C static library liblbfgs_lib.a
[ 7%] Built target lbfgs_lib
[ 7%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/core/common.c.o
[ 9%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/core/parsimony.c.o
[ 10%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/core/partition.c.o
[ 11%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/core/repeats.c.o
[ 13%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/binary.c.o
[ 14%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/binary_io_operations.c.o
[ 15%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/fasta.c.o
[ 17%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/maps.c.o
[ 18%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/output.c.o
[ 19%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/phylip.c.o
[ 21%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/utree_ascii.c.o
[ 22%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/utree_newick.c.o
[ 23%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/utree_svg.c.o
[ 25%] Building CXX object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/io/newick.cpp.o
[ 26%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_derivatives.c.o
/Users/katherin_otalora/Documents/Rootdigger/root_digger/lib/coraxlib/src/corax/kernel/generic/core_derivatives.c:61:16: warning: unused variable 'use_bclv' [-Wunused-variable]
unsigned int use_bclv = (bclv_buffer && (parent_sites < (sites * 2) / 3));
^
1 warning generated.
[ 27%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_likelihood.c.o
/Users/katherin_otalora/Documents/Rootdigger/root_digger/lib/coraxlib/src/corax/kernel/generic/core_likelihood.c:956:16: warning: unused variable 'use_bclv' [-Wunused-variable]
unsigned int use_bclv = bclv && (child_sites < (sites * 2) / 3);
^
1 warning generated.
[ 28%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_clv.c.o
[ 30%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_pmatrix.c.o
/Users/katherin_otalora/Documents/Rootdigger/root_digger/lib/coraxlib/src/corax/kernel/generic/core_pmatrix.c:25:10: fatal error: 'cblas.h' file not found
#include <cblas.h>
^~~~~~~~~
1 error generated.
make[3]: *** [lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_pmatrix.c.o] Error 1
make[2]: *** [lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger %
Thanks,
It looks like you are missing the cblas dependency. You should be able to install it via brew, if you have that set up already. Also, if you are missing the cblas library, you are probably missing the lapacke library too, so make sure to install that as well.
Let me know if that fixes your problem.
Thank you
I have performed what you said but it still doesn`t work.
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % brew install lapack
Warning: lapack 3.11 is already installed and up-to-date.
To reinstall 3.11, run:
brew reinstall lapack
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % brew install openblas
Warning: openblas 0.3.21 is already installed and up-to-date.
To reinstall 0.3.21, run:
brew reinstall openblas
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % brew install clblas
Warning: clblas 2.12_1 is already installed and up-to-date.
To reinstall 2.12_1, run:
brew reinstall clblas
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % make
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Disable SSE simd, because not supported
-- Disable AVX simd, because not supported
-- Disable AVX2 simd, because not supported
Non-rev enabled
-- coraxlib libraries: corax_static
-- Configuring done (0.5s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/katherin_otalora/Documents/Rootdigger/root_digger/build
[ 7%] Built target lbfgs_lib
[ 9%] Building C object lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_pmatrix.c.o
/Users/katherin_otalora/Documents/Rootdigger/root_digger/lib/coraxlib/src/corax/kernel/generic/core_pmatrix.c:25:10: fatal error: 'cblas.h' file not found
#include <cblas.h>
^~~~~~~~~
1 error generated.
make[3]: *** [lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/kernel/generic/core_pmatrix.c.o] Error 1
make[2]: *** [lib/coraxlib/src/corax/CMakeFiles/corax_obj.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2
Thank you very much for your help
Hmm, that is curious. I want to spend some time fixing the dependency checks in CMake. But in the meantime there are some things to point out:
clblas
is different thancblas
.clblas
is a GPU based version ofblas
, wherecblas
is the a BLAS implementation in C.lapack
is different thanlapacke
. The former is a FORTRAN implementation, and the latter is a C implementation.- OpenBLAS doesn't provide either
cblas
orlapacke
.
The naming around linear algebra libraries is a disaster, I'm super sorry for the confusion. Maybe try cblas
and lapacke
and check if those work?
Yes, from the beginning I was trying those two options, but I share with you the results:
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % brew install cblas
Warning: No available formula with the name "cblas". Did you mean clblas, clash, blast or clblast?
==> Searching for similarly named formulae and casks...
==> Formulae
clblas ✔ clash blast ✔ clblast ✔
To install clblas ✔, run:
brew install clblas ✔
==> Casks
clashx
To install clashx, run:
brew install --cask clashx
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % brew install lapacke
Warning: No available formula with the name "lapacke". Did you mean lapack?
==> Searching for similarly named formulae and casks...
==> Formulae
lapack ✔
To install lapack ✔, run:
brew install lapack ✔
==> Casks
lapce
To install lapce, run:
brew install --cask lapce
Thank you very much for your help
Ok, thanks for trying that out. Sorry it didn't work, I know this library stuff can be frustrating (at least, I find it annoying). I have updated RootDigger and the library that it depends on to do better dependency management, but I don't really expect that to help in this case. Additionally, there is a bit of extra documentation now at the coraxlib repository on what is actually required.
As for your specific problem, I'm at a bit of a loss. I can't seem to find a way to install lapacke or cblas on MacOS. OpenBLAS sometimes has lapacke and cblas, depending on the package manager.
If you want to try again with the updated changes, you will need to run git submodule update --recursive
after git pull
. Again, I don't expect it to fix the problem, so I am going to try to prepare a docker container, which hopefully will work better.
Alright, there is now a docker file as part of the repository. It works for me, but I haven't tested it extensively.
Thank you very much for your support.
I did it all over again and I get the error about the packages.
(base) katherin_otalora@Katherin-Otaloras-MacBook-Pro root_digger % make
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- SSE SIMD not supported -> disabling
-- AVX SIMD not supported -> disabling
-- AVX2 SIMD not supported -> disabling
-- Build type: Release
-- Building coraxlib as a static library.
-- Building documentation: OFF
-- Building tests: OFF
-- Building benchmarks: OFF
-- Building difficutly prediction: OFF
-- Enable SSE SIMD kernels: Off
-- Enable AVX SIMD kernels: Off
-- Enable AVX2 SIMD kernels: Off
Non-rev enabled
-- A cache variable, namely LAPACKE_DIR, has been set to specify the install directory of LAPACKE
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - not found
-- Looking for lapacke : test with lapack fails
-- Looking for lapacke -- lapacke.h not found
-- Looking for lapacke -- lib lapacke not found
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find LAPACKE (missing: LAPACKE_LIBRARIES LAPACKE_WORKS)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
lib/coraxlib/cmake/FindLAPACKE.cmake:410 (find_package_handle_standard_args)
lib/coraxlib/src/corax/CMakeLists.txt:57 (find_package)
-- Configuring incomplete, errors occurred!
I will try OpenBLAS to see if there is a solution.
Thank you very much for your help
Just checking in and seeing if there is an update with your issue. Did you manage to get it working?
No, I tried again with Openblas installed but unfortunately it didnt work.
Thank you very much for your help
I'm sorry that is hasn't worked so far. At this point I can only suggest that you try to build the docker version. Alternatively, you can wait until I remove the lapacke dependency. I plan to get this done sometime in the next couple of months, but I am a bit busy for it at the moment. Sorry
Closing this issue as there has been no traffic for some time