-
Notifications
You must be signed in to change notification settings - Fork 64
Mac osX build #48
Comments
Update : If found a way to build by add theses lines into the CMakeList.txt : INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ) Is this an issue ? |
Thanks for posting both, issue and solution :-) Can you prepare a pull request? |
Hello, I dont think, I understand nothing about Cmake :D I think it need a better review to understand the problem. Other question, how do you link the lib into your executable ? On macOS, I got this error : And on linux ubuntu : Could not find a package configuration file provided by "sqlpp11" with any sqlpp11Config.cmake Add the installation prefix of "sqlpp11" to CMAKE_PREFIX_PATH or set |
Not being a CMake master myself, and not having a Mac at hand, this is going to take some time, I am afraid :-) But first off: In order to link the mysql connector into your program, you need to link the connector library. This is done for the sqlpp11-connector-mysql/tests, for instance. |
Hello @z4qx, I made a PR (#58) that would remove the reliance on Boost.Thread on macOS because nowadays this isn't necessary anymore. |
-- Using /Library/Developer/CommandLineTools/usr/bin/c++ (compiler id: AppleClang) Could not find a package configuration file provided by "date" with any of
Add the installation prefix of "date" to CMAKE_PREFIX_PATH or set -- Configuring incomplete, errors occurred! |
Maybe @kovdan01 can help with that last item? |
@xtuyaowu Hello. Looks like that you do not have date library by Howard Hinnant installed – see requirements section in readme. I can build the library on macOS using these commands:
If you have sqlpp11 installed but are still unable to build the connector, please provide:
|
Hello,
I'm not able to build on macox 10.14.5. There is some strange error with boost 1.0.69.
MacBook:build $
cmake .. -DDATE_INCLUDE_DIR=../../date-2.4.1/include/ -DSQLPP11_INCLUDE_DIR=../../sqlpp11-0.58/include/ -DUSE_MARIADB=1
Apple XCode does not have thread_local, thus we need to wrap that via boost thread
-- Boost version: 1.69.0
-- Found the following Boost libraries:
-- thread
-- system
-- chrono
-- date_time
-- atomic
-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (compiler id: AppleClang)
including date from /Users/m4gyars/Project/core2/setup/date-2.4.1/include
including sqlpp11 from /Users/m4gyars/Project/core2/setup/sqlpp11-0.58/include
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/m4gyars/Project/core2/setup/sqlpp11-connector-mysql-0.25/build
MacBook:build$ make && sudo make install
Scanning dependencies of target sqlpp-mysql
[ 4%] Building CXX object src/CMakeFiles/sqlpp-mysql.dir/connection.cpp.o
/Users/m4gyars/Project/core2/setup/sqlpp11-connector-mysql-0.25/src/connection.cpp:30:10: fatal error: 'boost/thread/tss.hpp' file not found
#include <boost/thread/tss.hpp> // libc++ does not have thread_local yet.
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/sqlpp-mysql.dir/connection.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/sqlpp-mysql.dir/all] Error 2
make: *** [all] Error 2
Any idea to solve this ?
Thanks
The text was updated successfully, but these errors were encountered: