(iPhone)
> On Jun 8, 2014, at 12:00, [email protected] wrote: > > Send cmake-developers mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of cmake-developers digest..." > > > Today's Topics: > > 1. Modules/FindLua51.cmake: lua5.1 include path seems wrong > ([email protected]) > 2. Modules/FindLua51.cmake: lua5.1 include path seems wrong > ([email protected]) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 08 Jun 2014 15:12:01 +0200 > From: [email protected] > To: [email protected] > Subject: [cmake-developers] Modules/FindLua51.cmake: lua5.1 include > path seems wrong > Message-ID: <2100329.pYFkM4cQzp@in1689> > Content-Type: text/plain; charset="us-ascii" > > Hello, > > I observed a problem trying to build a CMake based project using lua5.1 on a > system where both lua5.1 and lua5.2 are present (Linux Arch). > It seems, "Modules/FindLua51.cmake" causes the header for lua5.2 to be > found but the lib for version 5.1 causing obvious problems when trying to > link. > Using "strace" I observed that cmake searches in each path prefix first in > the subdirectory "include", then starting from the base directory. > As > Modules/FindLua51.cmake specifies > {{{ > find_path(LUA_INCLUDE_DIR lua.h > HINTS > ENV LUA_DIR > PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua > include > }}} > Then cmake actually looks for lua.h in this folder order: > <prefix>/include/include/lua51/ > <prefix>/include/include/lua5.1/ > <prefix>/include/include/lua-5.1/ > <prefix>/include/include/lua/ > <prefix>/include/include/ > <prefix>/include/ > ... next prefix ... > > which looks wrong to me. > > "strace" tells: > {{{ > access("/usr/include/include/lua51/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/include/lua5.1/lua.h", R_OK) = -1 ENOENT (No such file > or > directory) > access("/usr/include/include/lua-5.1/lua.h", R_OK) = -1 ENOENT (No such file > or directory) > access("/usr/include/include/lua/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/include/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/lua.h", R_OK) = 0 > }}} > So a file is found but this is actually the one from lua5.2. cmake should > have > searched in > /usr/include/lua5.1/lua.h > in my case. > > I deleted the additional "include/" in FindLua51.cmake and it worked. > > A patch is attached. > > I would be very happy for receiving feedback. > > Regards, > Oliver Kurz > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 0001-FindLua51-Correct-include-search-path.patch > Type: text/x-patch > Size: 771 bytes > Desc: not available > URL: > <http://public.kitware.com/pipermail/cmake-developers/attachments/20140608/fdf6a825/attachment-0001.bin> > > ------------------------------ > > Message: 2 > Date: Sun, 08 Jun 2014 15:00:12 +0200 > From: [email protected] > To: [email protected] > Subject: [cmake-developers] Modules/FindLua51.cmake: lua5.1 include > path seems wrong > Message-ID: <2161782.NSFI7NEOaE@in1689> > Content-Type: text/plain; charset="us-ascii" > > Hello, > > I observed a problem trying to build a CMake based project using lua5.1 on a > system where both lua5.1 and lua5.2 are present (Linux Arch). > It seems, "Modules/FindLua51.cmake" causes the header for lua5.2 to be > found but the lib for version 5.1 causing obvious problems when trying to > link. > Using "strace" I observed that cmake searches in each path prefix first in > the subdirectory "include", then starting from the base directory. > As > Modules/FindLua51.cmake specifies > {{{ > find_path(LUA_INCLUDE_DIR lua.h > HINTS > ENV LUA_DIR > PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua > include > }}} > Then cmake actually looks for lua.h in this folder order: > <prefix>/include/include/lua51/ > <prefix>/include/include/lua5.1/ > <prefix>/include/include/lua-5.1/ > <prefix>/include/include/lua/ > <prefix>/include/include/ > <prefix>/include/ > ... next prefix ... > > which looks wrong to me. > > "strace" tells: > {{{ > access("/usr/include/include/lua51/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/include/lua5.1/lua.h", R_OK) = -1 ENOENT (No such file > or directory) > access("/usr/include/include/lua-5.1/lua.h", R_OK) = -1 ENOENT (No such file > or directory) > access("/usr/include/include/lua/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/include/lua.h", R_OK) = -1 ENOENT (No such file or > directory) > access("/usr/include/lua.h", R_OK) = 0 > }}} > So a file is found but this is actually the one from lua5.2. cmake should > have searched in > /usr/include/lua5.1/lua.h > in my case. > > I deleted the additional "include/" in FindLua51.cmake and it worked. > > A patch is attached. > > I would be very happy for receiving feedback. > > Regards, > Oliver Kurz > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: 0001-FindLua51-Correct-include-search-path.patch > Type: text/x-patch > Size: 771 bytes > Desc: not available > URL: > <http://public.kitware.com/pipermail/cmake-developers/attachments/20140608/d4dae660/attachment-0001.bin> > > ------------------------------ > > Subject: Digest Footer > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers > > ------------------------------ > > End of cmake-developers Digest, Vol 71, Issue 8 > *********************************************** -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
