All of lore.kernel.org
 help / color / mirror / Atom feed
* How to find libraries when building software
@ 2015-04-02 17:36 Andy Falanga (afalanga)
  2015-04-02 17:50 ` Gary Thomas
  2015-04-02 17:58 ` Gary Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Falanga (afalanga) @ 2015-04-02 17:36 UTC (permalink / raw)
  To: yocto@yoctoproject.org

HI,

Thanks to Gary Thomas' response, I was able to get the python libraries from Boost built.  Now, when I'm building my own library, which requires libboost_python, the configure script isn't able to find it.  How do I work with these cross compilation environments?

What I have is this.  I added the line below to local.conf as Gary instructed.

PACKAGECONFIG_pn-boost = "python"

I then ran

bitbake core-image-minimal

This built both python and the full set of boost (include libboost_python).  I see this in <output_dir>/sysroots/zc706-zynq7/usr/lib.  (In case it's relevant, this environment was constructed using /opt/yocto/poky-dizzy-12.0.1/oe-init-build-env.)  I then use a script that a co-worker wrote (quite simple) which configures the paths accordingly to use the cross compiler toolset.  My path is as follows:

/home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky-dizzy-12.0.1/scripts:/opt/yocto/poky-dizzy-12.0.1/bitbake/bin:/opt/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin:/opt/petalinux-v2014.4-final/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

In my own library project, I run my configure script with this:

./configure --host=arm-poky-linux-gnueabi

All is working quite well except that I run into this error:
...
checking for Boost headers version >= 1.47.0... yes
checking for Boost's header version... 1_56
checking for the toolset name used by Boost for arm-poky-linux-gnueabi-g++... gcc49 -gcc
checking boost/system/error_code.hpp usability... yes
checking boost/system/error_code.hpp presence... yes
checking for boost/system/error_code.hpp... yes
checking for the Boost system library... yes
checking boost/filesystem/path.hpp usability... yes
checking boost/filesystem/path.hpp presence... yes
checking for boost/filesystem/path.hpp... yes
checking for the Boost filesystem library... (cached) yes
checking boost/python.hpp usability... no
checking boost/python.hpp presence... no
checking for boost/python.hpp... no
configure: error: cannot find boost/python.hpp

I can find this file in <output_dir>/sysroots/zx706-zinq7/usr/include/boost, why can't the configure script?  What's wrong with how I've done things?  Or, and probably much more beneficial, when I say, "--host=arm-poky-linux-gnueabi" what does that actually mean?  Where are these things installed?  Why is it saying that it cannot find the header when I can?  The only rational explanation is that it's looking somewhere other than where I am.  Thus, I don't understand as much as I should.  What should I read in the manual? 

Andy



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

* Re: How to find libraries when building software
  2015-04-02 17:36 How to find libraries when building software Andy Falanga (afalanga)
@ 2015-04-02 17:50 ` Gary Thomas
  2015-04-02 17:58 ` Gary Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2015-04-02 17:50 UTC (permalink / raw)
  To: yocto

On 2015-04-02 11:36, Andy Falanga (afalanga) wrote:
> HI,
>
> Thanks to Gary Thomas' response, I was able to get the python libraries from Boost built.  Now, when I'm building my own library, which requires libboost_python, the configure script isn't able to find it.  How do I work with these cross compilation environments?
>
> What I have is this.  I added the line below to local.conf as Gary instructed.
>
> PACKAGECONFIG_pn-boost = "python"
>
> I then ran
>
> bitbake core-image-minimal
>
> This built both python and the full set of boost (include libboost_python).  I see this in <output_dir>/sysroots/zc706-zynq7/usr/lib.  (In case it's relevant, this environment was constructed using /opt/yocto/poky-dizzy-12.0.1/oe-init-build-env.)  I then use a script that a co-worker wrote (quite simple) which configures the paths accordingly to use the cross compiler toolset.  My path is as follows:
>
> /home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky-dizzy-12.0.1/scripts:/opt/yocto/poky-dizzy-12.0.1/bitbake/bin:/opt/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin:/opt/petalinux-v2014.4-final/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>
> In my own library project, I run my configure script with this:
>
> ./configure --host=arm-poky-linux-gnueabi
>
> All is working quite well except that I run into this error:
> ...
> checking for Boost headers version >= 1.47.0... yes
> checking for Boost's header version... 1_56
> checking for the toolset name used by Boost for arm-poky-linux-gnueabi-g++... gcc49 -gcc
> checking boost/system/error_code.hpp usability... yes
> checking boost/system/error_code.hpp presence... yes
> checking for boost/system/error_code.hpp... yes
> checking for the Boost system library... yes
> checking boost/filesystem/path.hpp usability... yes
> checking boost/filesystem/path.hpp presence... yes
> checking for boost/filesystem/path.hpp... yes
> checking for the Boost filesystem library... (cached) yes
> checking boost/python.hpp usability... no
> checking boost/python.hpp presence... no
> checking for boost/python.hpp... no
> configure: error: cannot find boost/python.hpp
>
> I can find this file in <output_dir>/sysroots/zx706-zinq7/usr/include/boost, why can't the configure script?  What's wrong with how I've done things?  Or, and probably much more beneficial, when I say, "--host=arm-poky-linux-gnueabi" what does that actually mean?  Where are these things installed?  Why is it saying that it cannot find the header when I can?  The only rational explanation is that it's looking somewhere other than where I am.  Thus, I don't understand as much as I should.  What should I read in the manual?

Library dependencies like this are handled by DEPENDS

Does your recipe DEPENDS contain "boost"? e.g.
   DEPENDS = "boost"

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: How to find libraries when building software
  2015-04-02 17:36 How to find libraries when building software Andy Falanga (afalanga)
  2015-04-02 17:50 ` Gary Thomas
@ 2015-04-02 17:58 ` Gary Thomas
  2015-04-02 21:04   ` Andy Falanga (afalanga)
  1 sibling, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-04-02 17:58 UTC (permalink / raw)
  To: yocto

On 2015-04-02 11:36, Andy Falanga (afalanga) wrote:
> HI,
>
> Thanks to Gary Thomas' response, I was able to get the python libraries from Boost built.  Now, when I'm building my own library, which requires libboost_python, the configure script isn't able to find it.  How do I work with these cross compilation environments?
>
> What I have is this.  I added the line below to local.conf as Gary instructed.
>
> PACKAGECONFIG_pn-boost = "python"
>
> I then ran
>
> bitbake core-image-minimal
>
> This built both python and the full set of boost (include libboost_python).  I see this in <output_dir>/sysroots/zc706-zynq7/usr/lib.  (In case it's relevant, this environment was constructed using /opt/yocto/poky-dizzy-12.0.1/oe-init-build-env.)  I then use a script that a co-worker wrote (quite simple) which configures the paths accordingly to use the cross compiler toolset.  My path is as follows:
>
> /home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky-dizzy-12.0.1/scripts:/opt/yocto/poky-dizzy-12.0.1/bitbake/bin:/opt/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin:/opt/petalinux-v2014.4-final/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>
> In my own library project, I run my configure script with this:
>
> ./configure --host=arm-poky-linux-gnueabi
>
> All is working quite well except that I run into this error:
> ...
> checking for Boost headers version >= 1.47.0... yes
> checking for Boost's header version... 1_56
> checking for the toolset name used by Boost for arm-poky-linux-gnueabi-g++... gcc49 -gcc
> checking boost/system/error_code.hpp usability... yes
> checking boost/system/error_code.hpp presence... yes
> checking for boost/system/error_code.hpp... yes
> checking for the Boost system library... yes
> checking boost/filesystem/path.hpp usability... yes
> checking boost/filesystem/path.hpp presence... yes
> checking for boost/filesystem/path.hpp... yes
> checking for the Boost filesystem library... (cached) yes
> checking boost/python.hpp usability... no
> checking boost/python.hpp presence... no
> checking for boost/python.hpp... no
> configure: error: cannot find boost/python.hpp
>
> I can find this file in <output_dir>/sysroots/zx706-zinq7/usr/include/boost, why can't the configure script?  What's wrong with how I've done things?  Or, and probably much more beneficial, when I say, "--host=arm-poky-linux-gnueabi" what does that actually mean?  Where are these things installed?  Why is it saying that it cannot find the header when I can?  The only rational explanation is that it's looking somewhere other than where I am.  Thus, I don't understand as much as I should.  What should I read in the manual?

Another thing to look at is the 'config.log' in your build
(for your "library" recipe).  It should tell you more about
why it can't find boost/python.hpp

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: How to find libraries when building software
  2015-04-02 17:58 ` Gary Thomas
@ 2015-04-02 21:04   ` Andy Falanga (afalanga)
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Falanga (afalanga) @ 2015-04-02 21:04 UTC (permalink / raw)
  To: Gary Thomas, yocto@yoctoproject.org

______________________________________
From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of Gary Thomas [gary@mlbassoc.com]
Sent: Thursday, April 02, 2015 11:58 AM
To: yocto@yoctoproject.org
Subject: Re: [yocto] How to find libraries when building software

On 2015-04-02 11:36, Andy Falanga (afalanga) wrote:
> HI,
>
> Thanks to Gary Thomas' response, I was able to get the python libraries from Boost built.  Now, when I'm building my own library, which requires libboost_python, the configure script isn't able to find it.  How do I work with these cross compilation environments?
>
> What I have is this.  I added the line below to local.conf as Gary instructed.
>
> PACKAGECONFIG_pn-boost = "python"
>
> I then ran
>
> bitbake core-image-minimal
>
> This built both python and the full set of boost (include libboost_python).  I see this in <output_dir>/sysroots/zc706-zynq7/usr/lib.  (In case it's relevant, this environment was constructed using /opt/yocto/poky-dizzy-12.0.1/oe-init-build-env.)  I then use a script that a co-worker wrote (quite simple) which configures the paths accordingly to use the cross compiler toolset.  My path is as follows:
>
> /home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/home/afalanga/src/crisscross/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky-dizzy-12.0.1/scripts:/opt/yocto/poky-dizzy-12.0.1/bitbake/bin:/opt/petalinux-v2014.4-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin:/opt/petalinux-v2014.4-final/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>
> In my own library project, I run my configure script with this:
>
> ./configure --host=arm-poky-linux-gnueabi
>
> All is working quite well except that I run into this error:
> ...
> checking for Boost headers version >= 1.47.0... yes
> checking for Boost's header version... 1_56
> checking for the toolset name used by Boost for arm-poky-linux-gnueabi-g++... gcc49 -gcc
> checking boost/system/error_code.hpp usability... yes
> checking boost/system/error_code.hpp presence... yes
> checking for boost/system/error_code.hpp... yes
> checking for the Boost system library... yes
> checking boost/filesystem/path.hpp usability... yes
> checking boost/filesystem/path.hpp presence... yes
> checking for boost/filesystem/path.hpp... yes
> checking for the Boost filesystem library... (cached) yes
> checking boost/python.hpp usability... no
> checking boost/python.hpp presence... no
> checking for boost/python.hpp... no
> configure: error: cannot find boost/python.hpp
>
> I can find this file in <output_dir>/sysroots/zx706-zinq7/usr/include/boost, why can't the configure script?  What's wrong with how I've done things?  Or, and probably much more beneficial, when I say, "--host=arm-poky-linux-gnueabi" what does that actually mean?  Where are these things installed?  Why is it saying that it cannot find the header when I can?  The only rational explanation is that it's looking somewhere other than where I am.  Thus, I don't understand as much as I should.  What should I read in the manual?

Another thing to look at is the 'config.log' in your build
(for your "library" recipe).  It should tell you more about
why it can't find boost/python.hpp


I want to ensure I've been clear enough.  I fear I didn’t explain well
how I'm trying to build my library.  (It's a C++ library exposed in
python.)  I have a standard GNU configure script which I'm trying to use
with the cross compiler that was built.  I'm not using recipes in bitbake
to make this library.

Also, I have been reviewing the config.log file.  It appears to me that
the real problem is that the build cannot find python.h.  This is rather
strange because the file does exist and it's in
.../sysroots/zc706-zynq7/usr/include/python2.7.  I would have assumed that
the automate macro AM_PATH_PYTHON.  At any rate, this does seem to be the
problem.  Curiously, I haven't yet been able to workaround it by supplying
a customized "CPPFLAGS=" argument.  I've tried both CPPFLAGS= and 
"BOOST_PYTHON_CPPFLAGS=" to the same effect.

Any pointers are most appreciated.

Thanks,
Andy

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

end of thread, other threads:[~2015-04-02 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 17:36 How to find libraries when building software Andy Falanga (afalanga)
2015-04-02 17:50 ` Gary Thomas
2015-04-02 17:58 ` Gary Thomas
2015-04-02 21:04   ` Andy Falanga (afalanga)

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.