How to PROVIDE boost-python


Emily
 

Hi all - 

I'm trying to build an opca recipe (https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb) and it's giving me a build error like: 

| /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld: cannot find -lboost_python-mt

Which seems to indicated I need to add boost-python to my list of DEPENDS. When I do that I get the error: 

ERROR: Nothing PROVIDES 'boost-python' (but /local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close matches:
  boost RPROVIDES boost-python 

I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and to the image definition as I saw this online, but neither seems to work. It seems like boost-python is being built (I can see it in the list when I run oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at build for this recipe. 

If I remove boost from my list of DEPENDS I get an error about that, so obviously boost itself is available at build for the original recipe. I've also tried adding boost-native to DEPENDS, also did not work. 

Is there something obvious I'm missing, or some trick to making boost-python available at build for this other recipe? 

Thanks!
Emily Smith


Quentin Schulz
 

Hi Emily,

On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
Hi all -

I'm trying to build an opca recipe (
https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
and it's giving me a build error like:

|
/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

Which seems to indicated I need to add boost-python to my list of DEPENDS.
When I do that I get the error:

ERROR: Nothing PROVIDES 'boost-python' (but
/local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
matches:
boost RPROVIDES boost-python

I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
to the image definition as I saw this online, but neither seems to work. It
seems like boost-python is being built (I can see it in the list when I run
oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
build for this recipe.

If I remove boost from my list of DEPENDS I get an error about that, so
obviously boost itself is available at build for the original recipe. I've
also tried adding boost-native to DEPENDS, also did not work.

Is there something obvious I'm missing, or some trick to making
boost-python available at build for this other recipe?
Ok so two things.

Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
seems it's already part of the default value of PACKAGECONFIG, c.f.
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
so if no bbappend is overriding it, I'd say you're safe. Better check
with the version in your layer that it's there.
If you don't want to check manually, try `bitbake -e boost | grep -e
"^PACKAGECONFIG="`

DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
only packages.

So you need to DEPENDS on boost, not boost-python. That should be enough
hopefully!

Quentin


Emily
 

Hi Quentin - 

That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe: 

/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt  

So I tried a bunch of other this which also didn't seem to work. 

Thanks for the response!
Emily


On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:
Hi Emily,

On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
> Hi all -
>
> I'm trying to build an opca recipe (
> https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
> and it's giving me a build error like:
>
> |
> /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
> cannot find -lboost_python-mt
>
> Which seems to indicated I need to add boost-python to my list of DEPENDS.
> When I do that I get the error:
>
> ERROR: Nothing PROVIDES 'boost-python' (but
> /local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
> opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
> matches:
>   boost RPROVIDES boost-python
>
> I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
> to the image definition as I saw this online, but neither seems to work. It
> seems like boost-python is being built (I can see it in the list when I run
> oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
> build for this recipe.
>
> If I remove boost from my list of DEPENDS I get an error about that, so
> obviously boost itself is available at build for the original recipe. I've
> also tried adding boost-native to DEPENDS, also did not work.
>
> Is there something obvious I'm missing, or some trick to making
> boost-python available at build for this other recipe?
>

Ok so two things.

Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
seems it's already part of the default value of PACKAGECONFIG, c.f.
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
so if no bbappend is overriding it, I'd say you're safe. Better check
with the version in your layer that it's there.
If you don't want to check manually, try `bitbake -e boost | grep -e
"^PACKAGECONFIG="`

DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
only packages.

So you need to DEPENDS on boost, not boost-python. That should be enough
hopefully!

Quentin


Laurent Gauthier
 

Hi Emily,

To find the solution to your issue in a rational and deterministic way
we need to start from the error message.

What I understand is that while build recipe "opc-ua-server-gfex" you
get an error message that says in short "ld: cannot find
-lboost_python-mt".

Therefore you need to determine which recipe (and which package in
that recipe) provides the "boost_python-mt" library.

One way to determine this is to run something like this:

find /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/*/*/*/packages-split
-name libboost_python\*

This should show you which recipe, and which package produced by that
recipe has the library you are looking for.

The names of the first-level directories inside "packages-split" are
packages names.

Based on things you have mentioned in your previous e-mail my guess
would be that adding an RDEPENDS = "boost-python" should help, but I
might be wrong.

I hope this will help you move in the right direction.

Kind regards, Laurent.

On Tue, Mar 17, 2020 at 6:07 PM Emily <easmith5555@...> wrote:

Hi Quentin -

That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe:

/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

So I tried a bunch of other this which also didn't seem to work.

Thanks for the response!
Emily


On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:

Hi Emily,

On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
Hi all -

I'm trying to build an opca recipe (
https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
and it's giving me a build error like:

|
/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

Which seems to indicated I need to add boost-python to my list of DEPENDS.
When I do that I get the error:

ERROR: Nothing PROVIDES 'boost-python' (but
/local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
matches:
boost RPROVIDES boost-python

I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
to the image definition as I saw this online, but neither seems to work. It
seems like boost-python is being built (I can see it in the list when I run
oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
build for this recipe.

If I remove boost from my list of DEPENDS I get an error about that, so
obviously boost itself is available at build for the original recipe. I've
also tried adding boost-native to DEPENDS, also did not work.

Is there something obvious I'm missing, or some trick to making
boost-python available at build for this other recipe?
Ok so two things.

Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
seems it's already part of the default value of PACKAGECONFIG, c.f.
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
so if no bbappend is overriding it, I'd say you're safe. Better check
with the version in your layer that it's there.
If you don't want to check manually, try `bitbake -e boost | grep -e
"^PACKAGECONFIG="`

DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
only packages.

So you need to DEPENDS on boost, not boost-python. That should be enough
hopefully!

Quentin
--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


Emily
 

Hi Laurent - 

Thanks for the suggestion. It looks like there are a few packages that provide libboost_python3:

find tmp/work/*/*/*/packages-split -name libboost_python\*
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dev/usr/lib/libboost_python3.so
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-python/usr/lib/libboost_python3.so.1.64.0
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-staticdev/usr/lib/libboost_python3.a
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dbg/usr/lib/.debug/libboost_python3.so.1.64.0

Adding boost-python to RDEPENDS doesn't help, I have tried it before also. This sort of made sense to me as I thought RDEPENDS was for run time dependencies, but perhaps I have misunderstood. 

I am working with the rocko branch and python2, so perhaps that's the problem?

Thanks,
Emily


On Tue, Mar 17, 2020 at 1:02 PM Laurent Gauthier <laurent.gauthier@...> wrote:
Hi Emily,

To find the solution to your issue in a rational and deterministic way
we need to start from the error message.

What I understand is that while build recipe "opc-ua-server-gfex" you
get an error message that says in short "ld: cannot find
-lboost_python-mt".

Therefore you need to determine which recipe (and which package in
that recipe) provides the "boost_python-mt" library.

One way to determine this is to run something like this:

    find /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/*/*/*/packages-split
-name libboost_python\*

This should show you which recipe, and which package produced by that
recipe has the library you are looking for.

The names of the first-level directories inside "packages-split" are
packages names.

Based on things you have mentioned in your previous e-mail my guess
would be that adding an RDEPENDS = "boost-python" should help, but I
might be wrong.

I hope this will help you move in the right direction.

Kind regards, Laurent.


On Tue, Mar 17, 2020 at 6:07 PM Emily <easmith5555@...> wrote:
>
> Hi Quentin -
>
> That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe:
>
> /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
> cannot find -lboost_python-mt
>
> So I tried a bunch of other this which also didn't seem to work.
>
> Thanks for the response!
> Emily
>
>
> On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:
>>
>> Hi Emily,
>>
>> On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
>> > Hi all -
>> >
>> > I'm trying to build an opca recipe (
>> > https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
>> > and it's giving me a build error like:
>> >
>> > |
>> > /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
>> > cannot find -lboost_python-mt
>> >
>> > Which seems to indicated I need to add boost-python to my list of DEPENDS.
>> > When I do that I get the error:
>> >
>> > ERROR: Nothing PROVIDES 'boost-python' (but
>> > /local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
>> > opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
>> > matches:
>> >   boost RPROVIDES boost-python
>> >
>> > I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
>> > to the image definition as I saw this online, but neither seems to work. It
>> > seems like boost-python is being built (I can see it in the list when I run
>> > oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
>> > build for this recipe.
>> >
>> > If I remove boost from my list of DEPENDS I get an error about that, so
>> > obviously boost itself is available at build for the original recipe. I've
>> > also tried adding boost-native to DEPENDS, also did not work.
>> >
>> > Is there something obvious I'm missing, or some trick to making
>> > boost-python available at build for this other recipe?
>> >
>>
>> Ok so two things.
>>
>> Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
>> seems it's already part of the default value of PACKAGECONFIG, c.f.
>> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
>> so if no bbappend is overriding it, I'd say you're safe. Better check
>> with the version in your layer that it's there.
>> If you don't want to check manually, try `bitbake -e boost | grep -e
>> "^PACKAGECONFIG="`
>>
>> DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
>> of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
>> only packages.
>>
>> So you need to DEPENDS on boost, not boost-python. That should be enough
>> hopefully!
>>
>> Quentin
>
>



--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


Quentin Schulz
 

Hi Emily,

On Tue, Mar 17, 2020 at 12:06:48PM -0500, Emily wrote:
Hi Quentin -

That's what I tried originally! DEPENDS on boost and not boost-python gives
I should have read more carefully, sorry.

me the following error when trying to build my original recipe:

/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64
-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309
-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../
libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

So I tried a bunch of other this which also didn't seem to work.
So... After googling a little bit I stumbled upon:
https://askubuntu.com/a/486184

"The -mt suffix had been removed. The installed Boost libraries are
multi-threading safe."

I couldn't find an official statement/changelog somewhere so to be taken
with a grain of salt.

But I think you actually need to patch whatever is requiring -lboost_python-mt
and change it to -lboost_python only in your sources.

At the same time, I can't believe you're trying to build a software that
wasn't built in the last 7 years. So I'm sceptical this is the actual
fix?

I tried to access the sources of the SW you're trying to build but from
the few tries I had, couldn't manage to get my hands on it. I'm guessing
some credentials are required.

Can you try the above suggestion and let us know how that goes?

Quentin


Laurent Gauthier
 

Hi again Emily,

You have put your finger on the core issue there.

The name of the boost python library which is linked in your
"opc-ua-server-gfex" recipe is "boost_python-mt" where it seems that
it should be "boost_python3-mt".

I guess you should have a look at the CMakeLists.txt of the
"opc-ua-server-gfex" software package to see how to switch to linking
with "boost_python3-mt" instead as a quick review of the boost recipe
seems to reveal no python2 support.

Kind Regards, Laurent.

On Tue, Mar 17, 2020 at 7:19 PM Emily S <easmith5555@...> wrote:

Hi Laurent -

Thanks for the suggestion. It looks like there are a few packages that provide libboost_python3:

find tmp/work/*/*/*/packages-split -name libboost_python\*
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dev/usr/lib/libboost_python3.so
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-python/usr/lib/libboost_python3.so.1.64.0
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-staticdev/usr/lib/libboost_python3.a
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dbg/usr/lib/.debug/libboost_python3.so.1.64.0

Adding boost-python to RDEPENDS doesn't help, I have tried it before also. This sort of made sense to me as I thought RDEPENDS was for run time dependencies, but perhaps I have misunderstood.

I am working with the rocko branch and python2, so perhaps that's the problem?

Thanks,
Emily


On Tue, Mar 17, 2020 at 1:02 PM Laurent Gauthier <laurent.gauthier@...> wrote:

Hi Emily,

To find the solution to your issue in a rational and deterministic way
we need to start from the error message.

What I understand is that while build recipe "opc-ua-server-gfex" you
get an error message that says in short "ld: cannot find
-lboost_python-mt".

Therefore you need to determine which recipe (and which package in
that recipe) provides the "boost_python-mt" library.

One way to determine this is to run something like this:

find /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/*/*/*/packages-split
-name libboost_python\*

This should show you which recipe, and which package produced by that
recipe has the library you are looking for.

The names of the first-level directories inside "packages-split" are
packages names.

Based on things you have mentioned in your previous e-mail my guess
would be that adding an RDEPENDS = "boost-python" should help, but I
might be wrong.

I hope this will help you move in the right direction.

Kind regards, Laurent.


On Tue, Mar 17, 2020 at 6:07 PM Emily <easmith5555@...> wrote:

Hi Quentin -

That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe:

/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

So I tried a bunch of other this which also didn't seem to work.

Thanks for the response!
Emily


On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:

Hi Emily,

On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
Hi all -

I'm trying to build an opca recipe (
https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
and it's giving me a build error like:

|
/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

Which seems to indicated I need to add boost-python to my list of DEPENDS.
When I do that I get the error:

ERROR: Nothing PROVIDES 'boost-python' (but
/local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
matches:
boost RPROVIDES boost-python

I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
to the image definition as I saw this online, but neither seems to work. It
seems like boost-python is being built (I can see it in the list when I run
oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
build for this recipe.

If I remove boost from my list of DEPENDS I get an error about that, so
obviously boost itself is available at build for the original recipe. I've
also tried adding boost-native to DEPENDS, also did not work.

Is there something obvious I'm missing, or some trick to making
boost-python available at build for this other recipe?
Ok so two things.

Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
seems it's already part of the default value of PACKAGECONFIG, c.f.
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
so if no bbappend is overriding it, I'd say you're safe. Better check
with the version in your layer that it's there.
If you don't want to check manually, try `bitbake -e boost | grep -e
"^PACKAGECONFIG="`

DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
only packages.

So you need to DEPENDS on boost, not boost-python. That should be enough
hopefully!

Quentin


--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com
--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


Laurent Gauthier
 

Also as Quentin suggested it might be needed to remove the "-mt"
suffix, but I see it in the do_install() method of the "boost" recipe
for revision 1.64.

Kind regards, Laurent.

On Tue, Mar 17, 2020 at 11:17 PM Laurent Gauthier via
Lists.Yoctoproject.Org
<laurent.gauthier=soccasys.com@...> wrote:


Hi again Emily,

You have put your finger on the core issue there.

The name of the boost python library which is linked in your
"opc-ua-server-gfex" recipe is "boost_python-mt" where it seems that
it should be "boost_python3-mt".

I guess you should have a look at the CMakeLists.txt of the
"opc-ua-server-gfex" software package to see how to switch to linking
with "boost_python3-mt" instead as a quick review of the boost recipe
seems to reveal no python2 support.

Kind Regards, Laurent.


On Tue, Mar 17, 2020 at 7:19 PM Emily S <easmith5555@...> wrote:

Hi Laurent -

Thanks for the suggestion. It looks like there are a few packages that provide libboost_python3:

find tmp/work/*/*/*/packages-split -name libboost_python\*
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dev/usr/lib/libboost_python3.so
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-python/usr/lib/libboost_python3.so.1.64.0
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-staticdev/usr/lib/libboost_python3.a
tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dbg/usr/lib/.debug/libboost_python3.so.1.64.0

Adding boost-python to RDEPENDS doesn't help, I have tried it before also. This sort of made sense to me as I thought RDEPENDS was for run time dependencies, but perhaps I have misunderstood.

I am working with the rocko branch and python2, so perhaps that's the problem?

Thanks,
Emily


On Tue, Mar 17, 2020 at 1:02 PM Laurent Gauthier <laurent.gauthier@...> wrote:

Hi Emily,

To find the solution to your issue in a rational and deterministic way
we need to start from the error message.

What I understand is that while build recipe "opc-ua-server-gfex" you
get an error message that says in short "ld: cannot find
-lboost_python-mt".

Therefore you need to determine which recipe (and which package in
that recipe) provides the "boost_python-mt" library.

One way to determine this is to run something like this:

find /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/*/*/*/packages-split
-name libboost_python\*

This should show you which recipe, and which package produced by that
recipe has the library you are looking for.

The names of the first-level directories inside "packages-split" are
packages names.

Based on things you have mentioned in your previous e-mail my guess
would be that adding an RDEPENDS = "boost-python" should help, but I
might be wrong.

I hope this will help you move in the right direction.

Kind regards, Laurent.


On Tue, Mar 17, 2020 at 6:07 PM Emily <easmith5555@...> wrote:

Hi Quentin -

That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe:

/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

So I tried a bunch of other this which also didn't seem to work.

Thanks for the response!
Emily


On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:

Hi Emily,

On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
Hi all -

I'm trying to build an opca recipe (
https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
and it's giving me a build error like:

|
/local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
cannot find -lboost_python-mt

Which seems to indicated I need to add boost-python to my list of DEPENDS.
When I do that I get the error:

ERROR: Nothing PROVIDES 'boost-python' (but
/local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
matches:
boost RPROVIDES boost-python

I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
to the image definition as I saw this online, but neither seems to work. It
seems like boost-python is being built (I can see it in the list when I run
oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
build for this recipe.

If I remove boost from my list of DEPENDS I get an error about that, so
obviously boost itself is available at build for the original recipe. I've
also tried adding boost-native to DEPENDS, also did not work.

Is there something obvious I'm missing, or some trick to making
boost-python available at build for this other recipe?
Ok so two things.

Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
seems it's already part of the default value of PACKAGECONFIG, c.f.
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
so if no bbappend is overriding it, I'd say you're safe. Better check
with the version in your layer that it's there.
If you don't want to check manually, try `bitbake -e boost | grep -e
"^PACKAGECONFIG="`

DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
only packages.

So you need to DEPENDS on boost, not boost-python. That should be enough
hopefully!

Quentin


--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com
--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


Emily
 

Hi Laurent - 

Unfortunately I don't have full control over the repo that's using boost_python-mt so I'm not sure I can switch it right now. 

I realize this is not a long-term solution, as I'll need to update that code (and my OS) to python3 soon, but for now I've just copied the boost recipe from this commit  to my own layer, and added a BBMASK to the openembedded-core's boost recipe. This seems to work, except I get a QA error from the commit I'm using for the boost recipe now:

ERROR: boost-1.63.0-r1 do_package: QA Issue: boost: Files/directories were installed but not shipped in any package:
  /usr/lib/libboost_numpy.so.1.63.0
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
boost: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: boost-1.63.0-r1 do_package: Fatal QA errors found, failing task.
ERROR: boost-1.63.0-r1 do_package: Function failed: do_package

I found a log that mentions this exact error, and also mentions a patch that fixes it - I've tried and thus far failed to find that patch. I'm not sure if this will actually work, but I thought I'd check and see if anyone had any ideas. 

Thanks,
Emily

On Tue, Mar 17, 2020 at 5:24 PM Laurent Gauthier <laurent.gauthier@...> wrote:
Also as Quentin suggested it might be needed to remove the "-mt"
suffix, but I see it in the do_install() method of the "boost" recipe
for revision 1.64.

Kind regards, Laurent.

On Tue, Mar 17, 2020 at 11:17 PM Laurent Gauthier via
Lists.Yoctoproject.Org
<laurent.gauthier=soccasys.com@...> wrote:
>
> Hi again Emily,
>
> You have put your finger on the core issue there.
>
> The name of the boost python library which is linked in your
> "opc-ua-server-gfex" recipe is "boost_python-mt" where it seems that
> it should be "boost_python3-mt".
>
> I guess you should have a look at the CMakeLists.txt of the
> "opc-ua-server-gfex" software package to see how to switch to linking
> with "boost_python3-mt" instead as a quick review of the boost recipe
> seems to reveal no python2 support.
>
> Kind Regards, Laurent.
>
>
> On Tue, Mar 17, 2020 at 7:19 PM Emily S <easmith5555@...> wrote:
> >
> > Hi Laurent -
> >
> > Thanks for the suggestion. It looks like there are a few packages that provide libboost_python3:
> >
> > find tmp/work/*/*/*/packages-split -name libboost_python\*
> > tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dev/usr/lib/libboost_python3.so
> > tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-python/usr/lib/libboost_python3.so.1.64.0
> > tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-staticdev/usr/lib/libboost_python3.a
> > tmp/work/aarch64-poky-linux/boost/1.64.0-r0/packages-split/boost-dbg/usr/lib/.debug/libboost_python3.so.1.64.0
> >
> > Adding boost-python to RDEPENDS doesn't help, I have tried it before also. This sort of made sense to me as I thought RDEPENDS was for run time dependencies, but perhaps I have misunderstood.
> >
> > I am working with the rocko branch and python2, so perhaps that's the problem?
> >
> > Thanks,
> > Emily
> >
> >
> > On Tue, Mar 17, 2020 at 1:02 PM Laurent Gauthier <laurent.gauthier@...> wrote:
> >>
> >> Hi Emily,
> >>
> >> To find the solution to your issue in a rational and deterministic way
> >> we need to start from the error message.
> >>
> >> What I understand is that while build recipe "opc-ua-server-gfex" you
> >> get an error message that says in short "ld: cannot find
> >> -lboost_python-mt".
> >>
> >> Therefore you need to determine which recipe (and which package in
> >> that recipe) provides the "boost_python-mt" library.
> >>
> >> One way to determine this is to run something like this:
> >>
> >>     find /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/*/*/*/packages-split
> >> -name libboost_python\*
> >>
> >> This should show you which recipe, and which package produced by that
> >> recipe has the library you are looking for.
> >>
> >> The names of the first-level directories inside "packages-split" are
> >> packages names.
> >>
> >> Based on things you have mentioned in your previous e-mail my guess
> >> would be that adding an RDEPENDS = "boost-python" should help, but I
> >> might be wrong.
> >>
> >> I hope this will help you move in the right direction.
> >>
> >> Kind regards, Laurent.
> >>
> >>
> >> On Tue, Mar 17, 2020 at 6:07 PM Emily <easmith5555@...> wrote:
> >> >
> >> > Hi Quentin -
> >> >
> >> > That's what I tried originally! DEPENDS on boost and not boost-python gives me the following error when trying to build my original recipe:
> >> >
> >> > /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
> >> > cannot find -lboost_python-mt
> >> >
> >> > So I tried a bunch of other this which also didn't seem to work.
> >> >
> >> > Thanks for the response!
> >> > Emily
> >> >
> >> >
> >> > On Tue, Mar 17, 2020 at 11:04 AM Quentin Schulz <quentin.schulz@...> wrote:
> >> >>
> >> >> Hi Emily,
> >> >>
> >> >> On Tue, Mar 17, 2020 at 10:44:10AM -0500, Emily wrote:
> >> >> > Hi all -
> >> >> >
> >> >> > I'm trying to build an opca recipe (
> >> >> > https://github.com/kratsg/meta-l1calo/blob/add/opcServer/recipes-core/opc-ua/opc-ua-server-gfex_git.bb)
> >> >> > and it's giving me a build error like:
> >> >> >
> >> >> > |
> >> >> > /local/d6/easmith5/rocko_bitbake/poky/build/tmp/work/aarch64-poky-linux/opc-ua-server-gfex/1.0+gitAUTOINC+921c563309-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/ld:
> >> >> > cannot find -lboost_python-mt
> >> >> >
> >> >> > Which seems to indicated I need to add boost-python to my list of DEPENDS.
> >> >> > When I do that I get the error:
> >> >> >
> >> >> > ERROR: Nothing PROVIDES 'boost-python' (but
> >> >> > /local/d6/easmith5/rocko_bitbake/meta-l1calo/recipes-core/opc-ua/
> >> >> > opc-ua-server-gfex_git.bb DEPENDS on or otherwise requires it). Close
> >> >> > matches:
> >> >> >   boost RPROVIDES boost-python
> >> >> >
> >> >> > I've tried adding PACKAGECONFIG_pn-boost="python" to both my local.conf and
> >> >> > to the image definition as I saw this online, but neither seems to work. It
> >> >> > seems like boost-python is being built (I can see it in the list when I run
> >> >> > oe-pkgdata-utils list-pkgs -p boost) but it doesn't seem to be available at
> >> >> > build for this recipe.
> >> >> >
> >> >> > If I remove boost from my list of DEPENDS I get an error about that, so
> >> >> > obviously boost itself is available at build for the original recipe. I've
> >> >> > also tried adding boost-native to DEPENDS, also did not work.
> >> >> >
> >> >> > Is there something obvious I'm missing, or some trick to making
> >> >> > boost-python available at build for this other recipe?
> >> >> >
> >> >>
> >> >> Ok so two things.
> >> >>
> >> >> Yes, I'd say you need python in PACKAGECONFIG for boost. However, it
> >> >> seems it's already part of the default value of PACKAGECONFIG, c.f.
> >> >> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/boost/boost.inc?h=master#n45
> >> >> so if no bbappend is overriding it, I'd say you're safe. Better check
> >> >> with the version in your layer that it's there.
> >> >> If you don't want to check manually, try `bitbake -e boost | grep -e
> >> >> "^PACKAGECONFIG="`
> >> >>
> >> >> DEPENDS contains only recipes (well, PROVIDES but PROVIDES has the name
> >> >> of the recipe in it at all times) while RDEPENDS_* (usually ${PN}*) contains
> >> >> only packages.
> >> >>
> >> >> So you need to DEPENDS on boost, not boost-python. That should be enough
> >> >> hopefully!
> >> >>
> >> >> Quentin
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Laurent Gauthier
> >> Phone: +33 630 483 429
> >> http://soccasys.com
>
>
>
> --
> Laurent Gauthier
> Phone: +33 630 483 429
> http://soccasys.com
>



--
Laurent Gauthier
Phone: +33 630 483 429
http://soccasys.com


Quentin Schulz
 

Hi Emily,

On Wed, Mar 18, 2020 at 10:16:23AM -0500, Emily wrote:
Hi Laurent -

Unfortunately I don't have full control over the repo that's using
boost_python-mt so I'm not sure I can switch it right now.
You can create a patch for it. You can use devtool modify <your-recipe>
and create the patch from there, you have access to the sources with
that. devtool build <your-recipe> to check it builds okay.

I realize this is not a long-term solution, as I'll need to update that
code (and my OS) to python3 soon, but for now I've just copied the boost
recipe from this commit
<https://github.com/openembedded/openembedded-core/commit/ef603f41b5df4772bb598ec9d389dd5f858592af#diff-9c24742c4bfe7eb2853f86cce86b91c6>
to
my own layer, and added a BBMASK to the openembedded-core's boost recipe.
This seems to work, except I get a QA error from the commit I'm using for
the boost recipe now:
I don't think there is a need for BBMASK, you should be able to set
PREFERRED_VERSION_boost = "1.63.0" in local.conf or your machine
configuration file.

ERROR: boost-1.63.0-r1 do_package: QA Issue: boost: Files/directories were
installed but not shipped in any package:
/usr/lib/libboost_numpy.so.1.63.0
Please set FILES such that these items are packaged. Alternatively if they
are unneeded, avoid installing them or delete them within do_install.
boost: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: boost-1.63.0-r1 do_package: Fatal QA errors found, failing task.
ERROR: boost-1.63.0-r1 do_package: Function failed: do_package

I found a log
<https://www.yoctoproject.org/irc/%23yocto.2017-03-09.log.html> that
mentions this exact error, and also mentions a patch that fixes it - I've
tried and thus far failed to find that patch. I'm not sure if this will
actually work, but I thought I'd check and see if anyone had any ideas.
If all of this is really temporary you can install it in some package,
or even create a new package for it. (PACKAGES =+ "boost-numpy",
FILES_${PN}-numpy = "/usr/lib/libboost_numpy.so.1.63.0").

No more ideas tbh. I would try to patch "your" SW first and see if it
brings you somewhere, but that's what I would do, each their own way.

Quentin


Emily
 

Hi Laurent and Quentin - 

Thank you both so much for your help! 

I did just end up patching the source code for my recipe - I had to both add the 3 and remove the -mt, and the OS does build now! If the sw does what I need it to is another question, but we shall see. 

Thanks again! 
Emily

On Wed, Mar 18, 2020 at 10:37 AM Quentin Schulz <quentin.schulz@...> wrote:
Hi Emily,

On Wed, Mar 18, 2020 at 10:16:23AM -0500, Emily wrote:
> Hi Laurent -
>
> Unfortunately I don't have full control over the repo that's using
> boost_python-mt so I'm not sure I can switch it right now.
>

You can create a patch for it. You can use devtool modify <your-recipe>
and create the patch from there, you have access to the sources with
that. devtool build <your-recipe> to check it builds okay.

> I realize this is not a long-term solution, as I'll need to update that
> code (and my OS) to python3 soon, but for now I've just copied the boost
> recipe from this commit
> <https://github.com/openembedded/openembedded-core/commit/ef603f41b5df4772bb598ec9d389dd5f858592af#diff-9c24742c4bfe7eb2853f86cce86b91c6>
> to
> my own layer, and added a BBMASK to the openembedded-core's boost recipe.
> This seems to work, except I get a QA error from the commit I'm using for
> the boost recipe now:
>

I don't think there is a need for BBMASK, you should be able to set
PREFERRED_VERSION_boost = "1.63.0" in local.conf or your machine
configuration file.

> ERROR: boost-1.63.0-r1 do_package: QA Issue: boost: Files/directories were
> installed but not shipped in any package:
>   /usr/lib/libboost_numpy.so.1.63.0
> Please set FILES such that these items are packaged. Alternatively if they
> are unneeded, avoid installing them or delete them within do_install.
> boost: 1 installed and not shipped files. [installed-vs-shipped]
> ERROR: boost-1.63.0-r1 do_package: Fatal QA errors found, failing task.
> ERROR: boost-1.63.0-r1 do_package: Function failed: do_package
>
> I found a log
> <https://www.yoctoproject.org/irc/%23yocto.2017-03-09.log.html> that
> mentions this exact error, and also mentions a patch that fixes it - I've
> tried and thus far failed to find that patch. I'm not sure if this will
> actually work, but I thought I'd check and see if anyone had any ideas.
>

If all of this is really temporary you can install it in some package,
or even create a new package for it. (PACKAGES =+ "boost-numpy",
FILES_${PN}-numpy = "/usr/lib/libboost_numpy.so.1.63.0").

No more ideas tbh. I would try to patch "your" SW first and see if it
brings you somewhere, but that's what I would do, each their own way.

Quentin