![Thomas Petazzoni](/assets/img/avatar_default.png)
In configuration where target architecture == host architecture, and libgpg-error is installed system-wide with development files, the build of cppcms fails with: /home/test/buildroot/output/host/usr/bin/x86_64-amd-linux-gnu-g++ --sysroot=/home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -Wextra -DNDEBUG CMakeFiles/base64_test.dir/tests/base64_test.cpp.o -o base64_test -L/home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib -Wl,-rpath,/home/test/buildroot/output/build/cppcms-1.0.5:/home/test/buildroot/output/build/cppcms-1.0.5/booster:/usr/lib -rdynamic libcppcms.so.1.0.5 booster/libbooster.so.0.0.3 -lpthread /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libpcre.so /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libdl.so /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libz.so /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpg_err_set_errno@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpgrt_lock_init@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpgrt_lock_destroy@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpg_err_code_from_syserror@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpg_err_code_from_errno@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpgrt_lock_unlock@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpg_strerror@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpg_strsource@GPG_ERROR_1.0' /home/test/buildroot/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libgcrypt.so: undefined reference to `gpgrt_lock_lock@GPG_ERROR_1.0' The problem comes from the "-Wl,-rpath,/home/test/buildroot/output/build/cppcms-1.0.5:/home/test/buildroot/output/build/cppcms-1.0.5/booster:/usr/lib" option, which tells the linker to search for libraries in /usr/lib. This commit fixes that by asking CMake to not add any rpath when building cppcms. Fixes: http://autobuild.buildroot.net/results/a7eb1ede552ae14f409cfd7bd877bcf25ca69a74/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# cppcms
|
|
#
|
|
################################################################################
|
|
|
|
CPPCMS_VERSION = 1.0.5
|
|
CPPCMS_SOURCE = cppcms-$(CPPCMS_VERSION).tar.bz2
|
|
CPPCMS_LICENSE = LGPL-3.0
|
|
CPPCMS_LICENSE_FILES = COPYING.TXT
|
|
CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION)
|
|
CPPCMS_INSTALL_STAGING = YES
|
|
|
|
# disable rpath to avoid getting /usr/lib added to the link search
|
|
# path
|
|
CPPCMS_CONF_OPTS = -DCMAKE_SKIP_RPATH=ON
|
|
|
|
CPPCMS_DEPENDENCIES = zlib pcre libgcrypt
|
|
|
|
ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y)
|
|
CPPCMS_CONF_OPTS += -DDISABLE_ICONV=ON
|
|
CPPCMS_DEPENDENCIES += icu
|
|
endif
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
# posix backend needs monetary.h which isn't available on uClibc
|
|
CPPCMS_CONF_OPTS += -DDISABLE_POSIX_LOCALE=on
|
|
endif
|
|
|
|
# We copy cppcms_tmpl_cc from staging to host because this file can be
|
|
# needed for compiling packages using cppcms. And it is not worth
|
|
# creating a host package just for a python script.
|
|
define CPPCMS_INSTALL_HOST_TOOLS
|
|
cp $(STAGING_DIR)/usr/bin/cppcms_tmpl_cc $(HOST_DIR)/usr/bin/cppcms_tmpl_cc
|
|
endef
|
|
CPPCMS_POST_INSTALL_STAGING_HOOKS += CPPCMS_INSTALL_HOST_TOOLS
|
|
|
|
$(eval $(cmake-package))
|