From 5d8233a69979af36105ad5ec978a1a4c686a2148 Mon Sep 17 00:00:00 2001 From: Zibo Zhao Date: Wed, 27 Aug 2014 12:06:07 -0400 Subject: protobuf: fix ptest compile errors While buiding protobuf ptest on Centos 6.4, the build failed with errors: ...libprotobuf.so: undefined reference to `memcpy@GLIBC_2.14' This is due to protobuf.pc still contains /usr/lib64 as libdir which are not good for cross compiling. Replace it with proper sysroot path. Signed-off-by: Zibo Zhao Signed-off-by: Bruce Ashfield --- recipes-containers/criu/protobuf_2.5.0.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-containers/criu/protobuf_2.5.0.bb b/recipes-containers/criu/protobuf_2.5.0.bb index a85fd87a..fc84cb72 100644 --- a/recipes-containers/criu/protobuf_2.5.0.bb +++ b/recipes-containers/criu/protobuf_2.5.0.bb @@ -39,6 +39,7 @@ do_compile_ptest() { # Add the location of the cross-compiled header and library files # which haven't been installed yet. cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" -- cgit v1.2.3-54-g00ecf