Gentoo Archives: gentoo-embedded

From: Patrice Tisserand <ptisserand@××××××.com>
To: gentoo-embedded@l.g.o
Cc: Kfir Lavi <lavi.kfir@×××××.com>
Subject: Re: [gentoo-embedded] e2fsprogs checking for blkid_get_cache in -lblkid... no
Date: Tue, 04 Jan 2011 22:19:56
Message-Id: 4D239B6A.4090600@wyplay.com
In Reply to: Re: [gentoo-embedded] e2fsprogs checking for blkid_get_cache in -lblkid... no by Mike Frysinger
1 On 01/04/2011 07:59 PM, Mike Frysinger wrote:
2 > On Tuesday, January 04, 2011 04:02:59 Patrice Tisserand wrote:
3 >> Mike Frysinger wrote:
4 >>> On Monday, January 03, 2011 05:19:58 Kfir Lavi wrote:
5 >>>> when I try to cross compile sys-fs/e2fsprogs I get this error:
6 >>>> checking for blkid_get_cache in -lblkid... no
7 >>>>
8 >>>> copying the uuid and blkid files to the cross environment solve the
9 >>>> problem and the package compiles.
10 >>>> cp /tmp/target_root/usr/lib/libuuid.*
11 >>>> /usr/i686-gentoo-linux-gnu/usr/lib/ cp
12 >>>> /tmp/target_root/usr/lib/libblkid.* /usr/i686-gentoo-linux-gnu/usr/lib/
13 >>>> cp /tmp/target_root/lib/libuuid.so.1* /usr/i686-gentoo-linux-gnu/lib/
14 >>>> cp /tmp/target_root/lib/libblkid.so.1* /usr/i686-gentoo-linux-gnu/lib/
15 >>>>
16 >>>> How can this problem be solved permanently?
17 >>>
18 >>> you should be emerging library packages into your SYSROOT (/usr/$CTARGET)
19 >>> before building/installing packages into your ROOT
20 >>
21 >> Does adding -L /tmp/target_root/lib -L /tmp/target_root/usr/lib
22 >> -Wl,-rpath-link,/tmp/target_root/lib
23 >> -Wl,-rpath-link,/tmp/target_root/usr/lib to LDFLAGS could not be an
24 >> alternative ?
25 >
26 > no. that's broken by design.
27 Thanks for your answer, I have found the following sentence in gentoo
28 embedded handbook:
29 """The common convention is to use your /usr/CTARGET/ tree as your
30 sysroot as the include/library directories in this tree are already
31 encoded into the gcc cross-compiler for searching. You could use another
32 directory and then add custom -I/-L paths to your CPPFLAGS/LDFLAGS, but
33 this has historically proven to be problematic. Yes, it works most of
34 the time, but the corner cases are why this method is discouraged. In
35 the embedded handbook, we'll assume you're using the sysroot as your
36 development ROOT.
37 """
38 Do you know where I can find references about these corner cases ?
39
40 Also how can I handle creating 2 different target rootfs with different
41 libraries versions but using the same cross-compilation toolchain?
42 Do I need to duplicate environment or is there some tips ?
43
44 Regards,
45 Patrice

Replies