Gentoo Archives: gentoo-embedded

From: Christopher Friedt <cfriedt@××××××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] mpfr cross-compiles, but bails out on install
Date: Fri, 25 Jan 2008 13:49:13
Message-Id: 4799EA5E.3060909@visible-assets.com
In Reply to: [gentoo-embedded] mpfr cross-compiles, but bails out on install by Christopher Friedt
1 I have another patch now that allows mpfr to compile properly - time
2 will tell as to whether disabling rpath will create any errors down the
3 road, but I can't imagine that being the case, since it's basically just
4 a compile-time override for LD_LIBRARY_PATH. As long as that is set
5 properly by the environment, then any application should have no
6 problems linking dynamically.
7
8 http://forums.gentoo.org/viewtopic-p-4775252.html#4775252
9
10 ~/Chris
11
12 Christopher Friedt wrote:
13 > Hi everyone,
14 >
15 > I'm cross compiling using arm-softfloat-linux-gnu, with the usual
16 > procedure using a SYSROOT of /usr/arm-softfloat-linux-gnu and the xmerge
17 > script.
18 >
19 > First of all, I should ask - has anyone found a fix for cross-compiling
20 > mpfr already? If so how? ... would something like
21 > ECONF_EXTRA="--with-gmp-lib=DIR" work?
22 >
23 > The original problem is exactly related to Simon's here:
24 >
25 > http://forums.gentoo.org/viewtopic-t-639572.html?sid=acbcac0d727bdaafa52ffc784641c0e7
26 >
27 >
28 > Mpfr would originally not compile because it linked to
29 > /usr/lib/libgmp.so always, instead of the libgmp.so in the compiler's
30 > search path.
31 >
32 > That was due to -rpath /usr/lib being present, so i created a very
33 > simple patch to remove the rpath (was that a bad idea?).
34 >
35 > In any event, mpfr-2.3.0_p3.ebuild now looks like [1], while
36 > mpfr-2.3.0_p3-disable-rpath-patch looks like [2].
37 >
38 > The patch applies perfectly and the compile is successful, but then
39 > during the install phase, the installer bails out with message [3].
40 >
41 > There is no .libs/libmpfr.lai file at all, but there is of course a
42 > .libs/libmpfr.la file.
43 >
44 > Why would the .la file suddenly be named .lai? Is it just a copy?
45 >
46 > It seems like an easy enough patch to just copy from one directory to
47 > another in Makefile.in, but I thought I'd write the list first and see
48 > if anyone else has a more elegant solution.
49 >
50 > ~/Chris
51 >
52 >
53 > =======================================[1]======================================
54 >
55 > src_compile()
56 > {
57 > ...
58 > tc-is-cross-compiler && epatch
59 > "${FILESDIR}"/${PN}-${MY_PV}_p${PLEVEL}-disable-rpath.patch ||
60 > die "disable rpath failed"
61 > }
62 >
63 > ========================================[2]=====================================
64 >
65 > --- Makefile.in_old 2008-01-25 02:59:01.000000000 +0100
66 > +++ Makefile.in 2008-01-25 02:59:21.000000000 +0100
67 > @@ -394,7 +394,7 @@
68 > rm -f "$${dir}/so_locations"; \
69 > done
70 > libmpfr.la: $(libmpfr_la_OBJECTS) $(libmpfr_la_DEPENDENCIES)
71 > - $(LINK) -rpath $(libdir) $(libmpfr_la_LDFLAGS)
72 > $(libmpfr_la_OBJECTS) $(libmpfr_la_LIBADD) $(LIBS)
73 > + $(LINK) $(libmpfr_la_LDFLAGS) $(libmpfr_la_OBJECTS)
74 > $(libmpfr_la_LIBADD) $(LIBS)
75 > tuneup$(EXEEXT): $(tuneup_OBJECTS) $(tuneup_DEPENDENCIES)
76 > @rm -f tuneup$(EXEEXT)
77 > $(LINK) $(tuneup_LDFLAGS) $(tuneup_OBJECTS) $(tuneup_LDADD) $(LIBS)
78 >
79 >
80 > =================================[3]================================
81 > >>> Source compiled.
82 > >>> Test phase [not enabled]: dev-libs/mpfr-2.3.0_p3
83 >
84 > >>> Install mpfr-2.3.0_p3 into
85 > /var/tmp/portage/dev-libs/mpfr-2.3.0_p3/image/ category dev-libs
86 > .......
87 > /usr/bin/install -c .libs/libmpfr.lai
88 > /var/tmp/portage/dev-libs/mpfr-2.3.0_p3/image//usr/lib/libmpfr.la
89 > /usr/bin/install: cannot stat `.libs/libmpfr.lai': No such file or
90 > directory
91 > make[2]: *** [install-libLTLIBRARIES] Error 1
92 >
93 >
94 --
95 gentoo-embedded@l.g.o mailing list