JuliaInterop / libcxxwrap-julia

C++ library for backing CxxWrap.jl
Other
84 stars 43 forks source link

Julia_VERSION_INCLUDE-NOTFOUND #45

Closed timholy closed 4 years ago

timholy commented 4 years ago

I have a source build of Julia. I'm trying this:

tim@diva:~/src/libcxxwrap-julia-build$ cmake -DJulia_PREFIX=/home/tim/src/julia-1/julia ../libcxxwrap-julia
-- Adding path /home/tim/src/julia-1/julia to search path
-- THIS BRANCH
CMake Error at FindJulia.cmake:32 (file):
  file failed to open for reading (No such file or directory):

    /home/tim/src/libcxxwrap-julia/Julia_VERSION_INCLUDE-NOTFOUND
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)

CMake Error at FindJulia.cmake:33 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)

-- Julia_VERSION_STRING: 
CMake Error at FindJulia.cmake:48 (if):
  if given arguments:

    "VERSION_LESS" "0.7.0"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/tim/src/libcxxwrap-julia-build/CMakeFiles/CMakeOutput.log".

It may be worth noting that /home/tim/src/julia-1/julia launches Julia successfully.

archit120 commented 4 years ago

For me '/home/archit/Downloads/julia-1.3.1/bin/julia' launches Julia and '/home/archit/Downloads/julia-1.3.1' was the correct directory to use. With the wrong directory for '-DJulia_PREFIX' I had the same error.

timholy commented 4 years ago

I get the same error if I eliminate the julia, i.e.,

tim@diva:~/src/libcxxwrap-julia-build$ cmake -DJulia_PREFIX=/home/tim/src/julia-1 ../libcxxwrap-julia
-- Adding path /home/tim/src/julia-1 to search path
-- THIS BRANCH
CMake Error at FindJulia.cmake:32 (file):
  file failed to open for reading (No such file or directory):

    /home/tim/src/libcxxwrap-julia/Julia_VERSION_INCLUDE-NOTFOUND
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)
...

However, it works for me if I point it to a binary download I have on my hard drive. So my guess is that this package assumes binary but not source builds of Julia.

barche commented 4 years ago

Sorry for the late reply, there are two options that should work for a source build:

cmake -DJulia_PREFIX=/home/tim/src/julia-1/usr ../libcxxwrap-julia

or

cmake -DJulia_EXECUTABLE=/home/tim/src/julia-1/julia ../libcxxwrap-julia

Feel free to reopen if that doesn't solve it, of course!

timholy commented 4 years ago

Sorry, I seem to have missed your reply. Works great! I seem to have missed the line about "directory containing the bin and lib directories." I will submit a PR to amplify this a bit, but feel free to close it without merging if you don't think it's a net improvement.