#266 cmake build for lodo appears to ignore CMAKE_INCLUDE_PATH

trunk
closed
Brian Gerkey
player (137)
5
2009-01-27
2009-01-19
Andrew Symington
No

Since I use Macports, I have the following two environment variables set in ~/.profile:

export CMAKE_INCLUDE_PATH=/opt/local/include
export CMAKE_LIBRARY_PATH=/opt/local/lib

However, when I try to build player from SVN the lodo module fails to find a GSL include, resulting in the following error:

...
[ 97%] Built target lodo
[ 97%] Building CXX object utils/pmap/CMakeFiles/lododriver.dir/lodo_driver.o
In file included from /Users/asymingt/Source/Tarballs/player-svn/utils/pmap/lodo_driver.cc:162:
/Users/asymingt/Source/Tarballs/player-svn/utils/pmap/lodo.h:103:25: error: gsl/gsl_min.h: No such file or directory
/Users/asymingt/Source/Tarballs/player-svn/utils/pmap/lodo.h:224: error: ISO C++ forbids declaration of ‘gsl_min_fminimizer’ with no type
/Users/asymingt/Source/Tarballs/player-svn/utils/pmap/lodo.h:224: error: expected ‘;’ before ‘*’ token
make[2]: *** [utils/pmap/CMakeFiles/lododriver.dir/lodo_driver.o] Error 1
make[1]: *** [utils/pmap/CMakeFiles/lododriver.dir/all] Error 2
make: *** [all] Error 2

----

GSL is definitely installed. Here is some info from pkg-config

andrew-symingtons-macbook-pro-15:stage-svn asymingt$ pkg-config --cflags gsl
-I/opt/local/include
andrew-symingtons-macbook-pro-15:stage-svn asymingt$ pkg-config --libs gsl
-L/opt/local/lib -lgsl -lgslcblas -lm
andrew-symingtons-macbook-pro-15:stage-svn asymingt$ pkg-config --modversion gsl
1.12
andrew-symingtons-macbook-pro-15:stage-svn asymingt$

---

I suspect this might have to do with the cmake build files. I ran cmake with verbosity and inserted -I/opt/local/include into the two failed build steps. Everything compiled successfully thereafter. Since I am unfamiliar with cmake, I am unable to post an updated build script or patch.

Discussion

  • I checked out latest SVN version and manually deleted CMakeCache.txt. After this change everything worked as expected.

     
    • status: open --> closed