All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] protobuf: fix ptest compile errors
@ 2014-08-27 16:06 Zibo Zhao
  2014-08-27 16:32 ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Zibo Zhao @ 2014-08-27 16:06 UTC (permalink / raw)
  To: meta-virtualization

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 <Zibo.Zhao@windriver.com>
---
 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 5c7454b..c4b7d18 100644
--- a/recipes-containers/criu/protobuf_2.5.0.bb
+++ b/recipes-containers/criu/protobuf_2.5.0.bb
@@ -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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] protobuf: fix ptest compile errors
  2014-08-27 16:06 [PATCH 1/1] protobuf: fix ptest compile errors Zibo Zhao
@ 2014-08-27 16:32 ` Bruce Ashfield
  2014-08-27 18:29   ` Zibo Zhao
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2014-08-27 16:32 UTC (permalink / raw)
  To: Zibo Zhao; +Cc: meta-virtualization@yoctoproject.org

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

On Wed, Aug 27, 2014 at 12:06 PM, Zibo Zhao <Zibo.Zhao@windriver.com> wrote:
> 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 <Zibo.Zhao@windriver.com>
> ---
>  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 5c7454b..c4b7d18 100644
> --- a/recipes-containers/criu/protobuf_2.5.0.bb
> +++ b/recipes-containers/criu/protobuf_2.5.0.bb
> @@ -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
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] protobuf: fix ptest compile errors
  2014-08-27 16:32 ` Bruce Ashfield
@ 2014-08-27 18:29   ` Zibo Zhao
  2014-08-27 18:38     ` Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Zibo Zhao @ 2014-08-27 18:29 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization@yoctoproject.org


On 08/27/2014 12:32 PM, Bruce Ashfield wrote:
> 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

>
> Cheers,
>
> Bruce
>
> On Wed, Aug 27, 2014 at 12:06 PM, Zibo Zhao <Zibo.Zhao@windriver.com> wrote:
>> 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 <Zibo.Zhao@windriver.com>
>> ---
>>   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 5c7454b..c4b7d18 100644
>> --- a/recipes-containers/criu/protobuf_2.5.0.bb
>> +++ b/recipes-containers/criu/protobuf_2.5.0.bb
>> @@ -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
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] protobuf: fix ptest compile errors
  2014-08-27 18:29   ` Zibo Zhao
@ 2014-08-27 18:38     ` Bruce Ashfield
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2014-08-27 18:38 UTC (permalink / raw)
  To: Zibo Zhao; +Cc: meta-virtualization@yoctoproject.org

I pushed the resolution already, but I'll take care of the fixup as well.

Thanks for checking.

Bruce

On Wed, Aug 27, 2014 at 2:29 PM, Zibo Zhao <Zibo.Zhao@windriver.com> wrote:
>
> On 08/27/2014 12:32 PM, Bruce Ashfield wrote:
>>
>> 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
>
>
>>
>> Cheers,
>>
>> Bruce
>>
>> On Wed, Aug 27, 2014 at 12:06 PM, Zibo Zhao <Zibo.Zhao@windriver.com>
>> wrote:
>>>
>>> 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 <Zibo.Zhao@windriver.com>
>>> ---
>>>   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 5c7454b..c4b7d18 100644
>>> --- a/recipes-containers/criu/protobuf_2.5.0.bb
>>> +++ b/recipes-containers/criu/protobuf_2.5.0.bb
>>> @@ -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
>>> meta-virtualization@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>>
>>
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-27 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 16:06 [PATCH 1/1] protobuf: fix ptest compile errors Zibo Zhao
2014-08-27 16:32 ` Bruce Ashfield
2014-08-27 18:29   ` Zibo Zhao
2014-08-27 18:38     ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.