* [Buildroot] Using buildroot generated toolchain as external toolchain issues
@ 2015-07-28 22:44 Matthew Starr
2015-07-29 6:22 ` Jérôme Pouiller
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Starr @ 2015-07-28 22:44 UTC (permalink / raw)
To: buildroot
I have several buildroot instances I use for different hardware. To
speed up
compile time I am trying to take a compiled buildroot toolchain and
reuse it
as an external toolchain for all my instances of buildroot. I did this
by not
selecting any packages, kernel, or u-boot and not to generate a rootfs.
When building the toolchain I selected ARM and EABIhf for Cortex A8.
I then take the contents of the output/host/usr directory and put it in
a tar
file that is then used as the external toolchain in the other buildroot
instances. When I try to build with the instances of buildroot using
this
external toolchain I get the following error:
output/host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-gnu
eabihf/4.9.2/cc1: error while loading shared libraries:
libcloog-isl.so.4: cannot open shared object file: No such file or
directory
Incorrect ABI setting: EABI selected, but toolchain is incompatible
I have done some searching online and everywhere I look it says I
should be able to use a buildroot toolchain as an external toolchain.
Am I missing something or is there some extra step I should do?
Best regards,
Matthew Starr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-28 22:44 [Buildroot] Using buildroot generated toolchain as external toolchain issues Matthew Starr
@ 2015-07-29 6:22 ` Jérôme Pouiller
2015-07-29 7:00 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Jérôme Pouiller @ 2015-07-29 6:22 UTC (permalink / raw)
To: buildroot
Hello Matthew,
On Tuesday 28 July 2015 17:44:18 Matthew Starr wrote:
> I have several buildroot instances I use for different hardware. To
> speed up
> compile time I am trying to take a compiled buildroot toolchain and
> reuse it
> as an external toolchain for all my instances of buildroot. I did this
> by not
> selecting any packages, kernel, or u-boot and not to generate a rootfs.
> When building the toolchain I selected ARM and EABIhf for Cortex A8.
Until here, everything seems correct
> I then take the contents of the output/host/usr directory and put it in
> a tar
> file that is then used as the external toolchain in the other buildroot
> instances.
Your problem come from this step. Buildroot toolchains are not "relocatable".
It means they don't work if move them away from their original location
(Samuel Martin sent a patch to fix this behavior).
Therefore, once you compiled your toolchain, use "Pre-installed toolchain"
option in order to use it.
Note: while you compile you toolchain, you can change BR2_HOST_DIR in order to
build it directly in directory of you choice (/opt/arm-buildroot-linux-
gnueabihf for example).
BR,
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-29 6:22 ` Jérôme Pouiller
@ 2015-07-29 7:00 ` Thomas Petazzoni
2015-07-29 13:22 ` Matthew Starr
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-07-29 7:00 UTC (permalink / raw)
To: buildroot
J?r?me, Matthew,
On Wed, 29 Jul 2015 08:22:04 +0200, J?r?me Pouiller wrote:
> > I then take the contents of the output/host/usr directory and put it in
> > a tar
> > file that is then used as the external toolchain in the other buildroot
> > instances.
> Your problem come from this step. Buildroot toolchains are not "relocatable".
> It means they don't work if move them away from their original location
> (Samuel Martin sent a patch to fix this behavior).
Correct.
>
> Therefore, once you compiled your toolchain, use "Pre-installed toolchain"
> option in order to use it.
This will not change anything: the toolchain must still be installed in
the location for which it was compiled, but as you can explain below,
this location can be customized.
> Note: while you compile you toolchain, you can change BR2_HOST_DIR in order to
> build it directly in directory of you choice (/opt/arm-buildroot-linux-
> gnueabihf for example).
Matthew, there are two options currently available to fix this problem:
* Use Samuel Martin's patches that adjust the RPATH of host binaries
automatically at the end of the build:
http://lists.busybox.net/pipermail/buildroot/2015-July/132483.html
and following patches.
* Use a quick hack that consists in building the libraries needed by
gcc as static libraries. This is the trick I'm currently using to
build the Buildroot external toolchains used in the autobuilders
(http://autobuild.buildroot.org). I can provide the patch if you
want.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-29 7:00 ` Thomas Petazzoni
@ 2015-07-29 13:22 ` Matthew Starr
2015-07-29 13:30 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Starr @ 2015-07-29 13:22 UTC (permalink / raw)
To: buildroot
Thomas,
> From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
> Sent: Wednesday, July 29, 2015 2:01 AM
>
> Matthew, there are two options currently available to fix this problem:
>
> * Use Samuel Martin's patches that adjust the RPATH of host binaries
> automatically at the end of the build:
>
> http://lists.busybox.net/pipermail/buildroot/2015-July/132483.html
> and following patches.
>
> * Use a quick hack that consists in building the libraries needed by
> gcc as static libraries. This is the trick I'm currently using to
> build the Buildroot external toolchains used in the autobuilders
> (http://autobuild.buildroot.org). I can provide the patch if you
> want.
Could you send out the patch for the static libraries option. This sounds
like the solution that would be the least likely to cause issues if updating
to a future version of buildroot.
If the static library option is used, how would I go about deploying the
toolchain to the other instances of buildroot that I use?
Best regards,
Matthew Starr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-29 13:22 ` Matthew Starr
@ 2015-07-29 13:30 ` Thomas Petazzoni
2015-07-29 21:54 ` Matthew Starr
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-07-29 13:30 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 29 Jul 2015 08:22:57 -0500, Matthew Starr wrote:
> Could you send out the patch for the static libraries option. This sounds
> like the solution that would be the least likely to cause issues if updating
> to a future version of buildroot.
Attached.
> If the static library option is used, how would I go about deploying the
> toolchain to the other instances of buildroot that I use?
Just tarball the toolchain (i.e, output/host/), put the tarball
somewhere, and tell your other Buildroot instances to use it as an
external toolchain.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mpc-mpfr-gmp-build-statically-for-the-host.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150729/fdaa4113/attachment.bin>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-29 13:30 ` Thomas Petazzoni
@ 2015-07-29 21:54 ` Matthew Starr
2015-07-29 22:23 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Starr @ 2015-07-29 21:54 UTC (permalink / raw)
To: buildroot
Thomas,
> From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
> Sent: Wednesday, July 29, 2015 8:31 AM
>
> > Could you send out the patch for the static libraries option. This sounds
> > like the solution that would be the least likely to cause issues if
> > updating to a future version of buildroot.
>
> Attached.
>
> > If the static library option is used, how would I go about deploying
> > the toolchain to the other instances of buildroot that I use?
>
> Just tarball the toolchain (i.e, output/host/), put the tarball somewhere, and
> tell your other Buildroot instances to use it as an external toolchain.
>
I applied the patch, built the toolchain, and pointed the other instances
of buildroot to use the toolchain tar file. I still received the same error
as before I used the patch:
output/host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.2/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
Incorrect ABI setting: EABIhf selected, but toolchain is incompatible
package/pkg-generic.mk:146: recipe for target 'output/build/toolchain-external-undefined/.stamp_configured' failed
The toolchain files appear to be in the output/host/opt/ext-toolchain
directory and the libcloog-isl.so.4 file is located under
output/host/opt/ext-toolchain/lib/ directory.
I also played around with the options to build the libraries as static, shared,
or both. No matter what that setting was it made no difference. I am
guessing this only affects the target libraries and not host.
Are there any other configuration settings I need to get the patch to work?
Best regards,
Matthew Starr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Using buildroot generated toolchain as external toolchain issues
2015-07-29 21:54 ` Matthew Starr
@ 2015-07-29 22:23 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-07-29 22:23 UTC (permalink / raw)
To: buildroot
Dear Matthew Starr,
On Wed, 29 Jul 2015 16:54:34 -0500, Matthew Starr wrote:
> output/host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.2/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
> Incorrect ABI setting: EABIhf selected, but toolchain is incompatible
> package/pkg-generic.mk:146: recipe for target 'output/build/toolchain-external-undefined/.stamp_configured' failed
That's because you have built gcc with graphite support, which requires
cloog. So either disable graphite support, or adjust cloog.mk to also
build the cloog library as a static library.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-29 22:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 22:44 [Buildroot] Using buildroot generated toolchain as external toolchain issues Matthew Starr
2015-07-29 6:22 ` Jérôme Pouiller
2015-07-29 7:00 ` Thomas Petazzoni
2015-07-29 13:22 ` Matthew Starr
2015-07-29 13:30 ` Thomas Petazzoni
2015-07-29 21:54 ` Matthew Starr
2015-07-29 22:23 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox