Closed TyBalduf closed 4 years ago
Hi,
Thank you for pointing this issue out!
I just took a look at the deps/CMakeLists.txt file, and it does not explicitly search for a Julia directory - at all. I think this works for me because I typically define a number of environment variables on the side, but yeah, this wouldn't work normally. And those env. variables shouldn't have to be defined for JuliaChem.jl to work.
I just added an update branch in response to this issue, davpoole/build-issue. It explicitly searches for Julia (and Libint) directories during the CMake process. You can define JULIA_ROOT as an environment variable to designate the Julia directory if you wish, but it shouldn't be necessary. Let me know if the new branch works.
I was able to compile, but it required some small changes.
In deps/CMakeLists.txt, I changed line 44 from ${JULIA_PATH}/include/julia
to ${JULIA_PATH}/../include/julia
. For my installation, JULIA_PATH directs to the julia executable in bin
, so I have to move up a directory to find include/julia
.
I had to include export CXXFLAGS="$CXXFLAGS -fPIC"
in my rc file before compiling libint, otherwise I got an error that certain parts of the library weren't shareable objects:
/usr/bin/ld: /usr/local/lib/libint2.a(libint2_static_init.cc.o): relocation R_X86_64_PC32 against symbol 'libint2_build_overlap' can not be used when making a shared object; recompile with -fPIC
I installed julia from the precompiled binary. This seems like it can create issues with GLIBCXX not being up to date. In this case, JuliaChem would build, but would fail with:
using JuliaChem`: `ERROR: LoadError: LoadError: could not load library "/home/ty/JuliaChem/JuliaChem.jl/deps/src/../libjeri.so"
/home/ty/julia-1.5.2/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/ty/JuliaChem/JuliaChem.jl/deps/src/../libjeri.so)
To fix this, I used the workaround discussed here of copying the up to date system version of libstdc++.so.6
into the julia libraries.
I'm trying to build JuliaChem using julia1.5.2 in Ubuntu 20.04 (WSL). When I follow the instructions from the README, I get the following error:
It seems that it can't find the
julia.h
, but I have seen that this in my installed at/opt/julia-1.5.2/include/julia/julia.h
. Is there somewhere else where it looks for this file? Or are there version restrictions for which Julia this will work for?