woolgathering/dbap

Build Error

Opened this issue · 8 comments

Step

(base)  ~/dbap/build/ [master] cmake --build . --config Release

response

[ 25%] Building CXX object CMakeFiles/DBAP_supernova.dir/plugins/DBAP/DBAP.cpp.o
In file included from /Users/konstantinos/dbap/plugins/DBAP/DBAP.cpp:5:
/Users/konstantinos/dbap/plugins/DBAP/DBAP.hpp:7:10: fatal error: 'boost/geometry.hpp' file not found
#include <boost/geometry.hpp>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/DBAP_supernova.dir/plugins/DBAP/DBAP.cpp.o] Error 1
make[1]: *** [CMakeFiles/DBAP_supernova.dir/all] Error 2
make: *** [all] Error 2

Ok, so you're going to be my guinea pig on Windows to avoid a bunch of unnecessary commits to get it to compile. The error is because Boost is not in your path.

Can you try putting this in CMakeLists.txt? Put it at line 63, just after the NOVA_SIMD stuff:

set(Boost_USE_STATIC_LIBS OFF) 
set(Boost_USE_MULTITHREADED ON)  
set(Boost_USE_STATIC_RUNTIME OFF) 
FIND_PACKAGE(Boost REQUIRED COMPONENTS geometry)

if(Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS}) 
    add_executable(progname file1.cxx file2.cxx) 
    target_link_libraries(progname ${Boost_LIBRARIES})
endif()

If that doesn't work, try this variation in the same place:

set(Boost_USE_STATIC_LIBS OFF) 
set(Boost_USE_MULTITHREADED ON)  
set(Boost_USE_STATIC_RUNTIME OFF) 
find_package(Boost 1.65.1 COMPONENTS geometry) 

if(Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS}) 
    add_executable(progname file1.cxx file2.cxx) 
    target_link_libraries(progname ${Boost_LIBRARIES})
endif()

Thanks for this. I am using this now:

set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.65.1 COMPONENTS geometry)

if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(progname file1.cxx file2.cxx)
target_link_libraries(progname ${Boost_LIBRARIES})
endif()

(base)  ~/dbap/build/ [master*] cmake .. -DCMAKE_BUILD_TYPE=Release

-- Found SuperCollider: /Users/konstantinos/supercollider -- Building plugins for SuperCollider version: 3.11.1 -- Install directory set to: /Users/konstantinos/Library/Application Support/SuperCollider/Extensions -- Could NOT find Boost: missing: geometry (found /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.65.1")) -- Added server plugin target DBAP_scsynth -- Added server plugin target DBAP_supernova -- Generating plugin targets done -- Configuring done -- Generating done -- Build files have been written to: /Users/konstantinos/dbap/build

I also tried to add the Boost path with this way:

cmake .. -DBoost_INCLUDE_DIR=/usr/local/lib/cmake/Boost-1.74.0

But same response.

You're on Windows, correct? Just confirming since you have "usr/local/" in your directory and there are forward slashes, both of which indicate Unix. In any case, try setting BOOST_ROOT and BOOST_LIBRARYDIR instead:

cmake .. -DBOOST_ROOT="/usr/local/lib/cmake/Boost-1.74.0" -DBOOST_LIBRARYDIR="/usr/local/lib/cmake/Boost-1.74.0"

You can also try setting BOOST_ROOT and BOOST_LIBRARYDIR as Windows Environment Variables:

Variable name: Boost_INCLUDE_DIR
Variable value: \libs\headers
eg. \wherever\it\is\boost_1_74_0\libs\headers

Variable name: BOOST_ROOT
Variable value:
eg. \wherever\it\is\boost_1_74_0\

The good news is the newer and better version I'm working on probably won't require Boost. At least it's looking that way.

I am afraid neither has made the trick yet. But maybe is preferable to wait for the new version.

Are you on Windows or a Unix system?

Are you on Windows or a Unix system?

I am on MacOS, I thought this justified it on my initial post, thus I didn't mention it explicitly

(base)  ~/dbap/build/ [master] cmake --build . --config Release

Ok, sorry, got it. For some reason I incorrectly thought you were on Windows. Getting my wires from the SC forum crossed.

But good news! Another user managed to compile for OSX by adding a variation of the lines we were using above to CMakeLists.txt:

# include libraries

if (NOVA_SIMD)
…

set(Boost_INCLUDE_DIR /usr/local/Cellar/boost/1.74.0/include)
set(Boost_LIBRARY_DIR /usr/local/Cellar/boost/1.74.0/lib)
find_package(Boost COMPONENTS system filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR})

I'll send you the binaries they made.

Would it be possible to obtain those Mac (M-1?) binaries? Asking for a friend ;)