Tim, Serghei,
When building TDE packages, if the cmake files do not properly find includes, what is the proper way to tell cmake where the include is? The cmake site says to use the CMAKE_INCLUDE_PATH environment variable. So I try:
export CMAKE_INCLUDE_PATH=/usr/include/apr-1
The TDE cmake setup seems to totally ignore this variable:
[ 0%] Building CXX object src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o cd /build/src/build/src/svnqt && /usr/bin/c++ -Dsvnqt_EXPORTS -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC -I/build/src/build/src/svnqt -I/opt/tqt3/include -I/opt/trinity/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/tdesvn/src -I/build/src/tdesvn/src/settings -I/build/src/tdesvn/src/svnqt -I/build/src/tdesvn/src/svnfrontend/graphtree -I/build/src/tdesvn/src/svnfrontend/fronthelpers -I/build/src/tdesvn/src/ksvnwidgets -I/build/src/tdesvn/src/helpers -I/build/src/tdesvn/src/svnfrontend -I/build/src/tdesvn/src/svnqt/cache -I/usr/include/subversion-1 -I/usr/include/apr-1.0 -I/build/src/tdesvn/src/svnqt/SQLITE_INCLUDE_DIR -fPIC -o CMakeFiles/svnqt.dir/apr.cpp.o -c /build/src/tdesvn/src/svnqt/apr.cpp /build/src/tdesvn/src/svnqt/apr.cpp:32:25: fatal error: apr_general.h: No such file or directory compilation terminated. make[2]: *** [src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [src/svnqt/CMakeFiles/svnqt.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0" that the cmake files include.
My pkgconfig file for apr is correct as well:
21:19 nirvana:~/tde> cat /usr/lib/pkgconfig/apr-1.pc prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib APR_MAJOR_VERSION=1 includedir=/usr/include/apr-1
Name: APR Description: The Apache Portable Runtime library Version: 1.4.5 Libs: -L${libdir} -lapr-${APR_MAJOR_VERSION} -luuid -lrt -lcrypt -lpthread -ldl Cflags: -D_REENTRANT -D_GNU_SOURCE -pthread -I${includedir}
Where is cmake getting the extra '.0' it tacks on the end of the include path? How to fix?
On 03/13/2012 09:25 PM, David C. Rankin wrote:
Tim, Serghei,
When building TDE packages, if the cmake files do not properly find includes, what is the proper way to tell cmake where the include is? The cmake site says to use the CMAKE_INCLUDE_PATH environment variable. So I try:
export CMAKE_INCLUDE_PATH=/usr/include/apr-1
<snip>
Where is cmake getting the extra '.0' it tacks on the end of the include path? How to fix?
Got it!
## fix CMakeLists.txt msg "Patching src/CMakeLists.txt to fix apr include path"
cd ${srcdir}/${pkgname#*-} sed -i 's|/usr/include/apr-1.0|/usr/include/apr-1|' src/CMakeLists.txt
The build should still respect the export CMAKE_INCLUDE_PATH variable...
On Wednesday 14 March 2012 04:25:59 David C. Rankin wrote:
Tim, Serghei,
When building TDE packages, if the cmake files do not properly find includes, what is the proper way to tell cmake where the include is?
Detection of modules should never fail. If it fail, should be fixed.
The cmake site says to use the CMAKE_INCLUDE_PATH environment variable. So I try:
export CMAKE_INCLUDE_PATH=/usr/include/apr-1
The purpose of CMAKE_INCLUDE_PATH is not to pass to compiler something.
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INCLUDE_P...
[...]
My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0" that the cmake files include.
Most likely is not TDE cmake system and alter somehow include path.
On 03/14/2012 04:03 AM, Serghei Amelian wrote:
My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0"
that the cmake files include.
Most likely is not TDE cmake system and alter somehow include path.
No - it WAS TDE cmake. Somebody HARDCODED the apr include location in tdesvn/src/CMakeLists.txt:
################################################# # # (C) 2011 Timothy Pearson # kb9vqf (AT) pearsoncomputing.net # # Improvements and feedback are welcome # # This file is released under GPL >= 2 # #################################################
include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/settings ${CMAKE_SOURCE_DIR}/src/svnqt ${CMAKE_BINARY_DIR}/src/svnqt ${CMAKE_SOURCE_DIR}/src/svnfrontend/graphtree ${CMAKE_SOURCE_DIR}/src/svnfrontend/fronthelpers ${CMAKE_SOURCE_DIR}/src/ksvnwidgets ${CMAKE_SOURCE_DIR}/src/helpers ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} /usr/include/apr-1.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Problem )
On Wednesday 14 March 2012 20:01:56 David C. Rankin wrote:
On 03/14/2012 04:03 AM, Serghei Amelian wrote:
My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0"
that the cmake files include.
Most likely is not TDE cmake system and alter somehow include path.
No - it WAS TDE cmake. Somebody HARDCODED the apr include location in tdesvn/src/CMakeLists.txt:
################################################# # # (C) 2011 Timothy Pearson # kb9vqf (AT) pearsoncomputing.net # # Improvements and feedback are welcome # # This file is released under GPL >= 2 # #################################################
include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/settings ${CMAKE_SOURCE_DIR}/src/svnqt ${CMAKE_BINARY_DIR}/src/svnqt ${CMAKE_SOURCE_DIR}/src/svnfrontend/graphtree ${CMAKE_SOURCE_DIR}/src/svnfrontend/fronthelpers ${CMAKE_SOURCE_DIR}/src/ksvnwidgets ${CMAKE_SOURCE_DIR}/src/helpers ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} /usr/include/apr-1.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Problem )
Replace /usr/include/apr-1.0 with ${APR_INCLUDE_DIRS}
On 03/14/2012 01:03 PM, Serghei Amelian wrote:
${SUBVERSION_INCLUDE_DIR}
/usr/include/apr-1.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Problem )
Replace /usr/include/apr-1.0 with ${APR_INCLUDE_DIRS}
Ahh! Thank you! Much prettier than:
## fix CMakeLists.txt msg "Patching src/CMakeLists.txt to fix apr include path"
cd ${srcdir}/${pkgname#*-} sed -i 's|/usr/include/apr-1.0|/usr/include/apr-1|' src/CMakeLists.txt
Replace /usr/include/apr-1.0 with ${APR_INCLUDE_DIRS}
Ahh! Thank you! Much prettier than:
## fix CMakeLists.txt msg "Patching src/CMakeLists.txt to fix apr include path"
cd ${srcdir}/${pkgname#*-} sed -i 's|/usr/include/apr-1.0|/usr/include/apr-1|' src/CMakeLists.txt
If that works with a successful build, please submit a patch. :) I never built tdesvn so I don't know....
Darrell
On 03/14/2012 01:39 PM, Darrell Anderson wrote:
If that works with a successful build, please submit a patch. :) I never built tdesvn so I don't know....
Darrell
Yes, it works fine -- I'll submit the patch :)
On 03/14/2012 01:03 PM, Serghei Amelian wrote:
On Wednesday 14 March 2012 20:01:56 David C. Rankin wrote:
On 03/14/2012 04:03 AM, Serghei Amelian wrote:
My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0"
that the cmake files include.
Most likely is not TDE cmake system and alter somehow include path.
No - it WAS TDE cmake. Somebody HARDCODED the apr include location in tdesvn/src/CMakeLists.txt:
################################################# # # (C) 2011 Timothy Pearson # kb9vqf (AT) pearsoncomputing.net # # Improvements and feedback are welcome # # This file is released under GPL >= 2 # #################################################
include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/settings ${CMAKE_SOURCE_DIR}/src/svnqt ${CMAKE_BINARY_DIR}/src/svnqt ${CMAKE_SOURCE_DIR}/src/svnfrontend/graphtree ${CMAKE_SOURCE_DIR}/src/svnfrontend/fronthelpers ${CMAKE_SOURCE_DIR}/src/ksvnwidgets ${CMAKE_SOURCE_DIR}/src/helpers ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} /usr/include/apr-1.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Problem )
Replace /usr/include/apr-1.0 with ${APR_INCLUDE_DIRS}
Serghei,
I tried that and that did not work??
include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/settings ${CMAKE_SOURCE_DIR}/src/svnqt ${CMAKE_BINARY_DIR}/src/svnqt ${CMAKE_SOURCE_DIR}/src/svnfrontend/graphtree ${CMAKE_SOURCE_DIR}/src/svnfrontend/fronthelpers ${CMAKE_SOURCE_DIR}/src/ksvnwidgets ${CMAKE_SOURCE_DIR}/src/helpers ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} ${APR_INCLUDE_DIRS} )
Still results in the error:
[ 0%] Building CXX object src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o cd /build/src/build/src/svnqt && /usr/bin/c++ -Dsvnqt_EXPORTS -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC -I/build/src/build/src/svnqt -I/opt/tqt3/include -I/opt/trinity/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/tdesvn/src -I/build/src/tdesvn/src/settings -I/build/src/tdesvn/src/svnqt -I/build/src/tdesvn/src/svnfrontend/graphtree -I/build/src/tdesvn/src/svnfrontend/fronthelpers -I/build/src/tdesvn/src/ksvnwidgets -I/build/src/tdesvn/src/helpers -I/build/src/tdesvn/src/svnfrontend -I/build/src/tdesvn/src/svnqt/cache -I/usr/include/subversion-1 -I/build/src/tdesvn/src/svnqt/SQLITE_INCLUDE_DIR -fPIC -o CMakeFiles/svnqt.dir/apr.cpp.o -c /build/src/tdesvn/src/svnqt/apr.cpp /build/src/tdesvn/src/svnqt/apr.cpp:32:25: fatal error: apr_general.h: No such file or directory compilation terminated. make[2]: *** [src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [src/svnqt/CMakeFiles/svnqt.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Build failed, check /mnt/nv1/home/chroot/david/build
If I just patch with the directory it works fine:
include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/settings ${CMAKE_SOURCE_DIR}/src/svnqt ${CMAKE_BINARY_DIR}/src/svnqt ${CMAKE_SOURCE_DIR}/src/svnfrontend/graphtree ${CMAKE_SOURCE_DIR}/src/svnfrontend/fronthelpers ${CMAKE_SOURCE_DIR}/src/ksvnwidgets ${CMAKE_SOURCE_DIR}/src/helpers ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} /usr/include/apr-1 )
There is something wrong with the logic behind ${APR_INCLUDE_DIRS} which is probably why it got hardcoded to begin with?? ${APR_INCLUDE_DIRS} isn't providing anything. Does it need more cmake code somewhere in the cmake dir?
For some reason setting ${APR_INCLUDE_DIRS} doesn't include the information from pkg-config:
17:31 nirvana:~/tde/tmp/tdesvn> pkg-config --variable=includedir apr-1 /usr/include/apr-1
Setting src/CMakeLists.txt using the patch hardcoding the dir seems to be the only thing that works. This points to a problem with the cmake code that is setting ${APR_INCLUDE_DIRS}. This patch is an example of how I got it to work. The original patch including ${APR_INCLUDE_DIRS} is what should be done, but the cmake code that sets ${APR_INCLUDE_DIRS} will need fixing first.
This is http://bugs.pearsoncomputing.net/show_bug.cgi?id=916
On Thursday 15 March 2012 00:37:16 David C. Rankin wrote: [...]
There is something wrong with the logic behind ${APR_INCLUDE_DIRS} which is probably why it got hardcoded to begin with?? ${APR_INCLUDE_DIRS} isn't providing anything. Does it need more cmake code somewhere in the cmake dir?
For some reason setting ${APR_INCLUDE_DIRS} doesn't include the information from pkg-config:
17:31 nirvana:~/tde/tmp/tdesvn> pkg-config --variable=includedir apr-1 /usr/include/apr-1
Setting src/CMakeLists.txt using the patch hardcoding the dir seems to be the only thing that works. This points to a problem with the cmake code that is setting ${APR_INCLUDE_DIRS}. This patch is an example of how I got it to work. The original patch including ${APR_INCLUDE_DIRS} is what should be done, but the cmake code that sets ${APR_INCLUDE_DIRS} will need fixing first.
This is http://bugs.pearsoncomputing.net/show_bug.cgi?id=916
I think there is no check for apr. Insert somewhere in ConfigureChecks.cmake a code like this:
pkg_search_module( APR apr-1 ) if( NOT APR_FOUND ) tde_message_fatal( "apr-1 is required, but was not found on your system" ) endif( )
On 03/14/2012 05:48 PM, Serghei Amelian wrote:
On Thursday 15 March 2012 00:37:16 David C. Rankin wrote: [...]
There is something wrong with the logic behind ${APR_INCLUDE_DIRS} which is probably why it got hardcoded to begin with?? ${APR_INCLUDE_DIRS} isn't providing anything. Does it need more cmake code somewhere in the cmake dir?
For some reason setting ${APR_INCLUDE_DIRS} doesn't include the information from pkg-config:
17:31 nirvana:~/tde/tmp/tdesvn> pkg-config --variable=includedir apr-1 /usr/include/apr-1
Setting src/CMakeLists.txt using the patch hardcoding the dir seems to be the only thing that works. This points to a problem with the cmake code that is setting ${APR_INCLUDE_DIRS}. This patch is an example of how I got it to work. The original patch including ${APR_INCLUDE_DIRS} is what should be done, but the cmake code that sets ${APR_INCLUDE_DIRS} will need fixing first.
This is http://bugs.pearsoncomputing.net/show_bug.cgi?id=916
I think there is no check for apr. Insert somewhere in ConfigureChecks.cmake a code like this:
pkg_search_module( APR apr-1 ) if( NOT APR_FOUND ) tde_message_fatal( "apr-1 is required, but was not found on your system" ) endif( )
OK, that something was missing is what I just figured out :), I'll test and report back. I just added this to the bug report:
I can't figure out what is going on. When I set src/CMakeLists.txt:
include_directories( <snip> ${SUBVERSION_INCLUDE_DIR} ${APR_INCLUDE_DIRS} )
The CMakeCache.txt information is exactly the same as when I hardcode
include_directories( <snip> ${SUBVERSION_INCLUDE_DIR} /usr/include/apr-1 )
APR_CONFIG:FILEPATH=/usr/bin/apr-1-config svnqt_LIB_DEPENDS:STATIC=general;tqt;general;tqt-mt;general;/usr/lib/libsvn_client-1.so;general;/usr/lib/libsvn_diff-1.so;general;/usr/lib/libsvn_fs-1.so;general;/usr/lib/libsvn_ra-1.so;general;/usr/lib/libsvn_repos-1.so;general;/usr/lib/libsvn_subr-1.so;general;/usr/lib/libsvn_wc-1.so;general;-luuid -lrt -lcrypt -lpthread -ldl -L/usr/lib -lapr-1 -L/usr/lib -lldap -llber -llber -ldb -lgdbm -lexpat -L/usr/lib -laprutil-1;general;/usr/lib/libsqlite3.so; APR_CPP_FLAGS:INTERNAL=-D_REENTRANT -D_GNU_SOURCE APR_EXTRA_LIBFLAGS:INTERNAL=-luuid -lrt -lcrypt -lpthread -ldl -L/usr/lib -lapr-1 APR_INCLUDE_DIR:INTERNAL=/usr/include/apr-1 APU_CPP_FLAGS:INTERNAL=-I/usr/include/apr-1 -I/usr/include APU_EXTRA_LIBFLAGS:INTERNAL=-L/usr/lib -lldap -llber -llber -ldb -lgdbm -lexpat -L/usr/lib -laprutil-1 APU_INCLUDE_DIR:INTERNAL=/usr/include/apr-1
However, if I use ${APR_INCLUDE_DIRS}, the build fails with:
[ 0%] Building CXX object src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o cd /build/src/build/src/svnqt && /usr/bin/c++ -Dsvnqt_EXPORTS -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC -I/build/src/build/src/svnqt -I/opt/tqt3/include -I/opt/trinity/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/tdesvn/src -I/build/src/tdesvn/src/settings -I/build/src/tdesvn/src/svnqt -I/build/src/tdesvn/src/svnfrontend/graphtree -I/build/src/tdesvn/src/svnfrontend/fronthelpers -I/build/src/tdesvn/src/ksvnwidgets -I/build/src/tdesvn/src/helpers -I/build/src/tdesvn/src/svnfrontend -I/build/src/tdesvn/src/svnqt/cache -I/usr/include/subversion-1 -I/build/src/tdesvn/src/svnqt/SQLITE_INCLUDE_DIR -fPIC -o CMakeFiles/svnqt.dir/apr.cpp.o -c /build/src/tdesvn/src/svnqt/apr.cpp /build/src/tdesvn/src/svnqt/apr.cpp:32:25: fatal error: apr_general.h: No such file or directory compilation terminated.
hardcoded, I get:
[ 0%] Building CXX object src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o cd /build/src/build/src/svnqt && /usr/bin/c++ -Dsvnqt_EXPORTS -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC -I/build/src/build/src/svnqt -I/opt/tqt3/include -I/opt/trinity/include/tqt -I/opt/trinity/include -I/build/src/build -I/build/src/build/src -I/build/src/tdesvn/src -I/build/src/tdesvn/src/settings -I/build/src/tdesvn/src/svnqt -I/build/src/tdesvn/src/svnfrontend/graphtree -I/build/src/tdesvn/src/svnfrontend/fronthelpers -I/build/src/tdesvn/src/ksvnwidgets -I/build/src/tdesvn/src/helpers -I/build/src/tdesvn/src/svnfrontend -I/build/src/tdesvn/src/svnqt/cache -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/build/src/tdesvn/src/svnqt/SQLITE_INCLUDE_DIR -fPIC -o
So the ${APR_INCLUDE_DIRS} variable is FUBAR....
On 03/14/2012 05:48 PM, Serghei Amelian wrote:
I think there is no check for apr. Insert somewhere in ConfigureChecks.cmake a code like this:
pkg_search_module( APR apr-1 ) if( NOT APR_FOUND ) tde_message_fatal( "apr-1 is required, but was not found on your system" ) endif( )
Serghei,
I think I found the problem. Where is APR_INCLUDE_DIR set from APR_INCLUDE_DIR_INT?? All I find is:
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT)
which works to set APR_INCLUDE_DIR_INT, but I can't find anywhere that there is a:
SET(APR_INCLUDE_DIR ${APR_INCLUDE_DIR_INT})
On 03/14/2012 06:09 PM, David C. Rankin wrote:
On 03/14/2012 05:48 PM, Serghei Amelian wrote:
I think there is no check for apr. Insert somewhere in ConfigureChecks.cmake a code like this:
pkg_search_module( APR apr-1 ) if( NOT APR_FOUND ) tde_message_fatal( "apr-1 is required, but was not found on your system" ) endif( )
Serghei,
I think I found the problem. Where is APR_INCLUDE_DIR set from APR_INCLUDE_DIR_INT?? All I find is:
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT)
which works to set APR_INCLUDE_DIR_INT, but I can't find anywhere that there is a:
SET(APR_INCLUDE_DIR ${APR_INCLUDE_DIR_INT})
WHEW - solved - but you still need to figure out where to put this stuff in the final version of the cmake files:
diff -uNr ../tdesvn.orig/ConfigureChecks.cmake ./ConfigureChecks.cmake --- ../tdesvn.orig/ConfigureChecks.cmake 2012-02-16 11:55:15.000000000 -0600 +++ ./ConfigureChecks.cmake 2012-03-14 18:21:22.606110951 -0500 @@ -119,6 +119,8 @@ endif(NOT APU_CONFIG)
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT) +SET(APR_INCLUDE_DIRS ${APR_INCLUDE_DIR_INT}) + EXEC_PROGRAM(${APU_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APU_INCLUDE_DIR_INT) SET(APR_INCLUDE_DIR "${APR_INCLUDE_DIR_INT}" CACHE INTERNAL "") SET(APU_INCLUDE_DIR "${APU_INCLUDE_DIR_INT}" CACHE INTERNAL "") diff -uNr ../tdesvn.orig/src/CMakeLists.txt ./src/CMakeLists.txt --- ../tdesvn.orig/src/CMakeLists.txt 2012-02-16 11:55:15.000000000 -0600 +++ ./src/CMakeLists.txt 2012-03-14 18:21:11.540201043 -0500 @@ -25,7 +25,7 @@ ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} - /usr/include/apr-1.0 + ${APR_INCLUDE_DIRS} )
link_directories(
I'll upload the patch to the bug report.
I'll upload the patch to the bug report.
David C. Rankin, J.D.,P.E.
David, I remembered that tdesdk has APR checks. You probably could copy and paste from there, or at least use tdesdk as a template to ensure you resolved the tdesvn problems.
Darrell
I think I found the problem. Where is APR_INCLUDE_DIR set from APR_INCLUDE_DIR_INT?? All I find is:
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT)
which works to set APR_INCLUDE_DIR_INT, but I can't find anywhere that there is a:
SET(APR_INCLUDE_DIR ${APR_INCLUDE_DIR_INT})
I believe cmake generates the variable when the pkg config test is performed. cmake generates many internal variables.
Darrell
On 03/14/2012 06:31 PM, Darrell Anderson wrote:
I believe cmake generates the variable when the pkg config test is performed. cmake generates many internal variables.
Darrell
voodoo.......
I'll try the pkg_search_module( APR apr-1 ) approach and see if that works as well.
On 03/14/2012 06:38 PM, David C. Rankin wrote:
On 03/14/2012 06:31 PM, Darrell Anderson wrote:
I believe cmake generates the variable when the pkg config test is performed. cmake generates many internal variables.
Darrell
voodoo.......
I'll try the pkg_search_module( APR apr-1 ) approach and see if that works as well.
It does :)
Final form of patch uploaded. Serghei will still need to figure out where he wants to move the info within ConfigureChecks.cmake. The patch is:
diff -uNr ../tdesvn.orig/ConfigureChecks.cmake ./ConfigureChecks.cmake --- ../tdesvn.orig/ConfigureChecks.cmake 2012-02-16 11:55:15.000000000 -0600 +++ ./ConfigureChecks.cmake 2012-03-14 18:44:38.613923907 -0500 @@ -119,6 +119,12 @@ endif(NOT APU_CONFIG)
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT) + + pkg_search_module( APR apr-1 ) + if( NOT APR_FOUND ) + tde_message_fatal( "apr-1 is required, but was not found on your system" ) + endif( ) + EXEC_PROGRAM(${APU_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APU_INCLUDE_DIR_INT) SET(APR_INCLUDE_DIR "${APR_INCLUDE_DIR_INT}" CACHE INTERNAL "") SET(APU_INCLUDE_DIR "${APU_INCLUDE_DIR_INT}" CACHE INTERNAL "") diff -uNr ../tdesvn.orig/src/CMakeLists.txt ./src/CMakeLists.txt --- ../tdesvn.orig/src/CMakeLists.txt 2012-02-16 11:55:15.000000000 -0600 +++ ./src/CMakeLists.txt 2012-03-14 18:21:11.540201043 -0500 @@ -25,7 +25,7 @@ ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR} - /usr/include/apr-1.0 + ${APR_INCLUDE_DIRS} )
link_directories(
Works fine:
==> Tidying install... -> Purging unwanted files... -> Compressing man and info pages... ==> Creating package... -> Generating .PKGINFO file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: tde-tdesvn 3513_tqt-1 (Wed Mar 14 23:48:54 UTC 2012)
It does :)
Final form of patch uploaded. Serghei will still need to figure out where he wants to move the info within ConfigureChecks.cmake. The patch is:
diff -uNr ../tdesvn.orig/ConfigureChecks.cmake ./ConfigureChecks.cmake --- ../tdesvn.orig/ConfigureChecks.cmake 2012-02-16 11:55:15.000000000 -0600 +++ ./ConfigureChecks.cmake 2012-03-14 18:44:38.613923907 -0500 @@ -119,6 +119,12 @@ endif(NOT APU_CONFIG)
EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR_INT)
- pkg_search_module( APR apr-1 )
- if( NOT APR_FOUND )
- tde_message_fatal( "apr-1 is required, but
was not found on your system" )
- endif( )
- EXEC_PROGRAM(${APU_CONFIG} ARGS
"--includedir" OUTPUT_VARIABLE APU_INCLUDE_DIR_INT) SET(APR_INCLUDE_DIR "${APR_INCLUDE_DIR_INT}" CACHE INTERNAL "") SET(APU_INCLUDE_DIR "${APU_INCLUDE_DIR_INT}" CACHE INTERNAL "") diff -uNr ../tdesvn.orig/src/CMakeLists.txt ./src/CMakeLists.txt
../tdesvn.orig/src/CMakeLists.txt 2012-02-16 11:55:15.000000000 -0600 +++ ./src/CMakeLists.txt 2012-03-14 18:21:11.540201043 -0500 @@ -25,7 +25,7 @@ ${CMAKE_SOURCE_DIR}/src/svnfrontend ${CMAKE_SOURCE_DIR}/src/svnqt/cache ${SUBVERSION_INCLUDE_DIR}
- /usr/include/apr-1.0
- ${APR_INCLUDE_DIRS}
)
link_directories(
Works fine:
==> Tidying install... -> Purging unwanted files... -> Compressing man and info pages... ==> Creating package... -> Generating .PKGINFO file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: tde-tdesvn 3513_tqt-1 (Wed Mar 14 23:48:54 UTC 2012)
Is apr an option or requirement? If the former then the CMakeLists.txt should contain a -DWITH_APR option or something similar. Then the pkg-config test occurs only if ( WITH_APR).
Darrell
On Thursday 15 March 2012 02:11:09 Darrell Anderson wrote: [...]
Is apr an option or requirement? If the former then the CMakeLists.txt should contain a -DWITH_APR option or something similar. Then the pkg-config test occurs only if ( WITH_APR).
Darrell
I think subversion needs apr.
On 03/14/2012 07:34 PM, Serghei Amelian wrote:
Is apr an option or requirement? If the former then the CMakeLists.txt
should contain a -DWITH_APR option or something similar. Then the pkg-config test occurs only if ( WITH_APR).
Darrell
I think subversion needs apr.
It does -- it's the apache portable runtime module...
I'll try the pkg_search_module( APR apr-1 ) approach and see if that works as well.
Write an if-else test for the apr pc file. If apr-1.0 was hard coded then some distros must install apr that way. So both tests must occur.
Darrell
On Thursday 15 March 2012 02:07:19 Darrell Anderson wrote:
I'll try the pkg_search_module( APR apr-1 ) approach and see if that works as well.
Write an if-else test for the apr pc file. If apr-1.0 was hard coded then some distros must install apr that way. So both tests must occur.
Darrell
I'm against agressive searching. Is much easier to fix a compilation failure than to hunt strange bugs generated by a wrong detection.
So, my advice is to use pkgconfig system when is possible.
On 03/14/2012 07:40 PM, Serghei Amelian wrote:
Write an if-else test for the apr pc file. If apr-1.0 was hard coded then
some distros must install apr that way. So both tests must occur.
Darrell
I'm against agressive searching. Is much easier to fix a compilation failure than to hunt strange bugs generated by a wrong detection.
So, my advice is to use pkgconfig system when is possible.
That gets the config proper no matter where a distro installs it. tdesvn would have worked fine, it was just missing the code that actually provoked the pkg-config test for apr-1. It just took me a while to figure it out. Unlike the autotools problem with tdeutils -- where I'm just hosed :)