Gentoo Archives: gentoo-embedded

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

Replies

Subject Author
Re: [gentoo-embedded] mpfr cross-compiles, but bails out on install Christopher Friedt <cfriedt@××××××××××××××.com>