[Cppcms-users] Booster-PCRE linking
Brought to you by:
artyom-beilis
|
From: Sab <rim...@gm...> - 2013-03-20 15:23:08
|
Hi Artyom,
I'm cross compiling my application and having trouble with linking the
static libraries. CppCMS compiles fine but when I compile my application
that uses cppcms, I get undefined reference to 'pcre_exec', 'pcre_compile'
and 'pcre_fullinfo' needed by libbooster.a e.g. in function
'booster::regex::match'.
Here is how I compile CppCMS in my environment installer Makefile:
Shared3rdParty/cppcms-1.0.2.target/pub/libcppcms.a:
Shared3rdParty/zlib-1.2.7.target/pub/lib/libz.a
Shared3rdParty/pcre-8.32.target/pub/lib/libpcre.a
cd Shared3rdParty/cppcms-1.0.2.target && mkdir -p -v build
cd Shared3rdParty/cppcms-1.0.2.target/build && cmake \
-DCMAKE_TOOLCHAIN_FILE="../../Product/gcc-${TOOLSUITE}.cmake" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DDISABLE_ICU_LOCALE=ON \
-DDISABLE_POSIX_LOCALE=ON \
-DDISABLE_SHARED=ON \
-DDISABLE_GCRYPT=ON \
-DDISABLE_OPENSSL=ON \
-DDISABLE_OPENSSL=ON \
-DCMAKE_INSTALL_PREFIX="../pub" \
-DDISABLE_SCGI=ON \
-DDISABLE_HTTP=ON \
-DZLIB_INCLUDE_DIR="../../zlib-1.2.7.target/pub/include" \
-DZLIB="../../zlib-1.2.7.target/pub/lib/libz.a" \
-DPCRE_LIB="../../pcre-8.32.target/pub/lib/libpcre.so" \
-DCMAKE_INCLUDE_PATH="../../pcre-8.32.target/pub/include" \
-DCMAKE_LIBRARY_PATH="../../pcre-8.32.target/pub/lib" ..
cd Shared3rdParty/cppcms-1.0.2.target/build && make && make install
Here is how I compile pcre in the same makefile:
Shared3rdParty/pcre-8.32.target/pub/lib/libpcre.a:
cd Shared3rdParty/pcre-8.32.target && ./configure --host=${TOOLSUITE}
--prefix=`pwd`/pub
cd Shared3rdParty/pcre-8.32.target && make && make install
I do see the right path in CppCMS's CMakeCache.txt:
//Path to a library.
PCRE_LIB:FILEPATH=/work/eBox/Shared3rdParty/pcre-8.32.target/pub/lib/libpcre.so
and:
//Dependencies for the target
booster-static_LIB_DEPENDS:STATIC=general;
/usr/arm-linux-gnueabi/lib/libpthread.so;
general;
/work/eBox/Shared3rdParty/pcre-8.32.target/pub/lib/libpcre.so;general;
/usr/arm-linux-gnueabi/lib/libdl.so;
The pcre lib compiles fine and it is in the right path.
Cppcms uses the right path too.
Why isn't pcre get linked correctly to booster?
Sab
|