protobuf: fix ptest compile errors
PATCH 1/1 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.
--- recipes-containers/criu/protobuf_2.5.0.bb | 1 + 1 file changed, 1 insertion(+)
recipes-containers/criu/protobuf_2.5.0.bb +1 -0
@@ -37,6 +37,7 @@ do_compile_ptest() { # Add the location of the cross-compiled header and library files # which haven't been installed yet. cp "${S}/protobuf.pc" "${S}/${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 "${S}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${S}/src/.libs|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc" export PKG_CONFIG_PATH="${S}/${TEST_SRC_DIR}"
Signature · 1 line
1.9.1
I had to resolve a reject on this one, so double check that your meta-virt tree is
up to date, and also check that my resolution was correct.
Cheers,
Bruce
Quoted 34 lines · Zibo Zhao
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/lib64as libdir which are not good for cross compiling. Replace it with proper sysroot path.Signed-off-by Zibo Zhao <[email protected]>--- recipes-containers/criu/protobuf_2.5.0.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/protobuf_2.5.0.bb +1
-1@@ -37,6 +37,7 @@ do_compile_ptest() { # Add the location of the cross-compiled header and library files # which haven't been installed yet. cp "${S}/protobuf.pc" "${S}/${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 "${S}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${S}/src/.libs|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc" export PKG_CONFIG_PATH="${S}/${TEST_SRC_DIR}" --1.9.1
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 3 lines · Bruce Ashfield
I had to resolve a reject on this one, so double check that your meta-virt tree is
up to date, and also check that my resolution was correct.
Sorry, Bruce. I certainly didn't pick up your latest commit regarding splitting the build/src directories. So the resolution has a little bit issue:
sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc"
Should have been using ${B} instead of ${S} since the file is in build dir not in source dir. Can you fix it or you want me to resubmit the patch?
Zibo
Quoted 42 lines
Cheers,
Bruce
Quoted 34 lines · Zibo Zhao
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/lib64as libdir which are not good for cross compiling. Replace it with proper sysroot path.Signed-off-by Zibo Zhao <[email protected]>--- recipes-containers/criu/protobuf_2.5.0.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/protobuf_2.5.0.bb +1
-1@@ -37,6 +37,7 @@ do_compile_ptest() { # Add the location of the cross-compiled header and library files # which haven't been installed yet. cp "${S}/protobuf.pc" "${S}/${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 "${S}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${S}/src/.libs|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc" export PKG_CONFIG_PATH="${S}/${TEST_SRC_DIR}" --1.9.1
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
I pushed the resolution already, but I'll take care of the fixup as well.
Thanks for checking.
Bruce
Quoted 73 lines · Zibo Zhao
Quoted 4 lines · Bruce Ashfield
I had to resolve a reject on this one, so double check that your meta-virt tree is
up to date, and also check that my resolution was correct.Sorry, Bruce. I certainly didn't pick up your latest commit regarding splitting the build/src directories.
So the resolution has a little bit issue:sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc"
Should have been using ${B} instead of ${S} since the file is in build dir not in source dir.
Can you fix it or you want me to resubmit the patch?Zibo
Quoted 50 lines
Cheers,
Bruce
Quoted 40 lines · Zibo Zhao
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/lib64as libdir which are not good for cross compiling. Replace it with proper sysroot path.Signed-off-by Zibo Zhao <[email protected]>--- recipes-containers/criu/protobuf_2.5.0.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/protobuf_2.5.0.bb +0
-0@@ -37,6 +37,7 @@ do_compile_ptest() { # Add the location of the cross-compiled header and libraryfiles
# which haven't been installed yet. cp "${S}/protobuf.pc" "${S}/${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 "${S}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${S}/src/.libs|' -i "${S}/${TEST_SRC_DIR}/protobuf.pc" export PKG_CONFIG_PATH="${S}/${TEST_SRC_DIR}" -- 1.9.1--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"