FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 09-16-2010, 11:03 AM
Jan Kobler
 
Default Adjust paths when cross-compiling

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
 
Old 09-20-2010, 05:39 PM
Mike Frysinger
 
Default Adjust paths when cross-compiling

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
 
Old 09-20-2010, 08:12 PM
Jan Kobler
 
Default Adjust paths when cross-compiling

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
 
Old 09-21-2010, 11:04 AM
Enrico Weigelt
 
Default Adjust paths when cross-compiling

* 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
----------------------------------------------------------------------
 
Old 09-21-2010, 08:07 PM
Mike Frysinger
 
Default Adjust paths when cross-compiling

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
 

Thread Tools




All times are GMT. The time now is 10:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org