Closed jstrube closed 6 years ago
Yes, since libcxxwrap-julia also calls into libjulia from within header files, you also need to link to libjulia. I download these in my build script, so you could also use the same method. This is only for Julia 0.7 for now, when https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/320 is resolved the URL should be changed and point to official binaries.
CC @staticfloat
The new binaries are now up at https://github.com/JuliaPackaging/JuliaBuilder/releases and I have updated the build script to use them for both Julia 0.7 and 1.0. See the CxxWrap.jl build.jl file for and example of how to download the correct binary based on the Julia version.
OK, thank you for the hints.
I have the build working, but all my tests fail, for some reason I don't really understand.
I get null pointers when calling into my functions now. Will investigate separately. At least julia and libcxxwrap are found now. (Needed to add Libdl as a dependency and needed to add using CxxWrap
to my wrapper module build script -- otherwise the lib is missing the dependency and dlopen, and hence the build, fails. The latter part is something you might want to add to the docs.
I'm trying to move my builds over to BinaryBuilder. My idea is to follow your example and split the C++ code and the Julia code into two different repositories. For the C++ part, I was thinking I can just use libcxxwrap-julia as a dependency, and pass BinaryBuilder the path of the build.jl file. Unfortunately, when I specify the project as a dependency, it looks like the CMake file tries to find julia again to build the libraries. But it doesn't find julia in the BinaryBuilder environment.
The other dependency I specify seems to find the cmake file, and recognizes that the libs are already built.
Is this search for the julia dirs necessary if I want to build my package against the existing libcxxwrap libraries and headers? I'm really not a cmake expert. Is this something I should address in my CMakeLists.txt, or is there a check you could add to this project to check for the libs before searching for julia?