public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] Adjust paths when cross-compiling
@ 2010-09-16 11:03 Jan Kobler
  2010-09-20 17:39 ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kobler @ 2010-09-16 11:03 UTC (permalink / raw
  To: gentoo-embedded

Hi,

when cross-compiling I have encountered some problems with path names:

ROOT=/usr/armv4tl-softfloat-linux-gnueabi
SYSROOT=/usr/armv4tl-softfloat-linux-gnueabi

I get error messages like:
/usr/lib/libgmp.so: could not read symbols: File in wrong format

or

/usr/libexec/gcc/armv4tl-softfloat-linux-gnueabi/ld: cannot find
/lib/libcrack.so.2

I have changed the paths manually

in the file $ROOT/usr/lib/libgmp.la

from
libdir='/usr/lib'
to
libdir='/usr/armv4tl-softfloat-linux-gnueabi/usr/lib'

in the file $ROOT/usr/lib/libcrack.so
from
GROUP ( /lib/libcrack.so.2 )
to
GROUP ( /usr/armv4tl-softfloat-linux-gnueabi/lib/libcrack.so.2 )


Are there any tools which can do this automatically.
I know that there is cross-fix-root or lafilefixer, but I am reluctant
to test it logged in as root.
Are there any docs about these tools beside --help on the command line.

These problems occurred when cross-compiling as described in
http://gentoo.mindzoo.de/index.cgi/wiki/cross-compiling-chroot
(currently Version 2)

Best regards

Jan



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

* Re: [gentoo-embedded] Adjust paths when cross-compiling
  2010-09-16 11:03 [gentoo-embedded] Adjust paths when cross-compiling Jan Kobler
@ 2010-09-20 17:39 ` Mike Frysinger
  2010-09-20 20:12   ` Jan Kobler
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-09-20 17:39 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Jan Kobler

[-- Attachment #1: Type: Text/Plain, Size: 403 bytes --]

On Thursday, September 16, 2010 07:03:38 Jan Kobler wrote:
> Are there any tools which can do this automatically.
> I know that there is cross-fix-root or lafilefixer, but I am reluctant
> to test it logged in as root.

well nothing we can do about that then.  if you're unwilling to use the tools 
already created for this explicit purpose, it's up to you to resolve your own 
problems.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-embedded] Adjust paths when cross-compiling
  2010-09-20 17:39 ` Mike Frysinger
@ 2010-09-20 20:12   ` Jan Kobler
  2010-09-21 11:04     ` Enrico Weigelt
  2010-09-21 20:07     ` Mike Frysinger
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kobler @ 2010-09-20 20:12 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Mike Frysinger

Mike,

sorry for my unclear email.

Of course I am looking for the tools which are created for this explicit
purpose and I like to use them.

I had the suspicion that cross-fix-root and lafilefixer are such tools,
but I only know their help text and their source code. I would like to
know more about them, before I call them logged in as root. I don't want
to corrupt my system by calling it at the wrong time, with the wrong
command arguments or with the wrong environment variables.

1. Are there any docs or discussions on the web which further describe
their purpose and their usage?

2. How should I have used these tools in order to prevent the problems with
$ROOT/usr/lib/libgmp.la and
$ROOT/usr/lib/libcrack.so
which I have described in my previous email?

3. Which tools should be called when?
After each emerge?
Are these tools already called by emerge or other system tools?

4. When I cross compile the root file system in
/usr/armv4tl-softfloat-linux-gnueabi,
libdir needs to be
libdir='/usr/armv4tl-softfloat-linux-gnueabi/usr/lib'.

When the target system (ARM) mounts this root fs through NFS, then
libdir needs to be again libdir='/usr/lib'.

May I call cross-fix-root or lafilefixer on the target or host system
again, in order to change the paths forth and back?

Best regards

Jan



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

* Re: [gentoo-embedded] Adjust paths when cross-compiling
  2010-09-20 20:12   ` Jan Kobler
@ 2010-09-21 11:04     ` Enrico Weigelt
  2010-09-21 20:07     ` Mike Frysinger
  1 sibling, 0 replies; 5+ messages in thread
From: Enrico Weigelt @ 2010-09-21 11:04 UTC (permalink / raw
  To: gentoo-embedded

* Jan Kobler <eng1@koblersystems.de> schrieb:

> 4. When I cross compile the root file system in
> /usr/armv4tl-softfloat-linux-gnueabi,
> libdir needs to be
> libdir='/usr/armv4tl-softfloat-linux-gnueabi/usr/lib'.
> 
> When the target system (ARM) mounts this root fs through NFS, then
> libdir needs to be again libdir='/usr/lib'.

#1: use sysroot
#2: dont use libtool


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------



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

* Re: [gentoo-embedded] Adjust paths when cross-compiling
  2010-09-20 20:12   ` Jan Kobler
  2010-09-21 11:04     ` Enrico Weigelt
@ 2010-09-21 20:07     ` Mike Frysinger
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-09-21 20:07 UTC (permalink / raw
  To: Jan Kobler; +Cc: gentoo-embedded

[-- Attachment #1: Type: Text/Plain, Size: 1264 bytes --]

On Monday, September 20, 2010 16:12:44 Jan Kobler wrote:
> Of course I am looking for the tools which are created for this explicit
> purpose and I like to use them.
> 
> I had the suspicion that cross-fix-root and lafilefixer are such tools,
> but I only know their help text and their source code. I would like to
> know more about them, before I call them logged in as root. I don't want
> to corrupt my system by calling it at the wrong time, with the wrong
> command arguments or with the wrong environment variables.

what is unclear about cross-fix-root's help text ?  rather than keep answering 
e-mails about the same thing, i'd rather improve the output of the util and 
point people to that.

$ cross-fix-root
Usage: cross-fix-root <sysroot> <cross-bindir> <cross-prefix>
       cross-fix-root <cross-prefix>
       cross-fix-root # takes settings from env

Environment variables:
  CROSS_COMPILE=<cross-prefix>
  (SYSROOT|ROOT|STAGEDIR)=<sysroot>

Description:
  Fix library perms and mung paths in libtool linker scripts & random -config
  scripts to point to our SYSROOT directory.  Add symlinks for the -config
  with cross-compiler prefixes as autotool packages will search for them first
  when cross-compiling.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2010-09-23 16:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-16 11:03 [gentoo-embedded] Adjust paths when cross-compiling Jan Kobler
2010-09-20 17:39 ` Mike Frysinger
2010-09-20 20:12   ` Jan Kobler
2010-09-21 11:04     ` Enrico Weigelt
2010-09-21 20:07     ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox