OS X compile w/non-standard dirs
I am getting the following error while building greylist-daemon:
[ 40%] Building CXX object src/dbiwrapped-0.0.1/CMakeFiles/dbiwrapped.dir/StderrLog.cpp.o
/opt/local/var/macports/build/_Users_brad_misc_MacPorts_brad_ports_mail_greylist-daemon/work/greylist/src/dbiwrapped-0.0.1/StderrLog.cpp:44:25: error: mysql/mysql.h: No such file or directory
Here is an example of where files are placed on my system. Most everything is prefixed with /opt/local. Notice that mysql is subdired to support more then one version.
/opt/local/include/mysql5/mysql/mysql.h
/opt/local/lib/dbd/libdbdmysql.so
/opt/local/lib/libdbi.dylib
I'm fairly unfamiliar with cmake.
Are there env vars to help cmake find files?
I would like to avoid patching and use designed methods for building if possible.
Regards,
Bradley Giesbrecht
- Log in to post comments
Added CXXFLAGS
Added CXXFLAGS -I/opt/local/include/mysql5 and now mysql.h is found.
Next error:
src/dbiwrapped-0.0.1/dbiwrapped.h:112: error: 'LOG_PID' was not declared in this scope
src/dbiwrapped-0.0.1/dbiwrapped.h:112: error: 'LOG_USER' was not declared in this scope
*** [src/CMakeFiles/greylist.dir/greylist.cpp.o] Error 1
They should be defined in
They should be defined in syslog.h - is it included when you look at the top of dbiwrapped.h?