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
--
David C. Rankin, J.D.,P.E.