Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #1

Open
KonVas opened this issue Oct 22, 2020 · 8 comments
Open

Build Error #1

KonVas opened this issue Oct 22, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@KonVas
Copy link

KonVas commented Oct 22, 2020

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

@woolgathering
Copy link
Owner

woolgathering commented Oct 22, 2020

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()

@woolgathering woolgathering added the bug Something isn't working label Oct 22, 2020
@KonVas
Copy link
Author

KonVas commented Oct 23, 2020

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.

@woolgathering
Copy link
Owner

woolgathering commented Oct 23, 2020

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.

@KonVas
Copy link
Author

KonVas commented Oct 29, 2020

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

@woolgathering
Copy link
Owner

Are you on Windows or a Unix system?

@KonVas
Copy link
Author

KonVas commented Oct 31, 2020

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

@woolgathering
Copy link
Owner

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.

@djiamnot
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants