Gentoo Archives: gentoo-dev

From: David Thomas <davelists2@×××××××××××.com>
To: gentoo-dev@l.g.o, gentoo-embedded@l.g.o
Subject: [gentoo-dev] problems crosscompiling libXt
Date: Sat, 17 Dec 2005 23:23:42
Message-Id: 20051217232033.GA24919@peoplemerge.com
1 Hey all,
2
3 Here is a fix for libXt, similar to the problems I had with libX11
4 last week. I don't see an obvious way to patch the Makefile.am.
5 Please send comments.
6
7 Symptom:
8 ../util/makestrs -i .. < ../util/string.list > StringDefs.c
9 /bin/sh: ../util/makestrs: cannot execute binary file
10 make[2]: *** [StringDefs.c] Error 126
11
12 For this to work, have a look at the ebuild in the forwarded msg.
13
14 Fix patchfile:
15 --- util/Makefile.in
16 +++ util/Makefile.in
17 @@ -48,7 +48,7 @@
18 AUTOHEADER = @AUTOHEADER@
19 AUTOMAKE = @AUTOMAKE@
20 AWK = @AWK@
21 -CC = @CC@
22 +CC = gcc
23 CCDEPMODE = @CCDEPMODE@
24 CFLAGS = @CFLAGS@
25 CPP = @CPP@
26
27
28 On Fri, Dec 09, 2005 at 03:19:28AM -0500, David Thomas (davelists2@×××××××××××.com) wrote:
29 Subject: [gentoo-embedded] problems crosscompiling libX11
30 Message ID: <20051209081928.GA11683@×××××××××××.com>
31
32 > I've been having problems with libX11. First it tries to build a binary
33 > with the crosscompiler then execute it:
34 >
35 > /bin/sh: ../src/util/makekeys: cannot execute binary file
36 >
37 > I wrote a patch that fixes this... See below.
38 >
39 > I'm still having a problem with libtool. The last step of the build process
40 > it does the following:
41 > /bin/sh ../libtool --mode=link armv5l-softfloat-linux-uclibc-gcc ... -L /newroot/usr/lib ...
42 > ...(much more)... -lXau -lXdmcp -ldl
43 >
44 > This calls the crosscompiler replacing -lXau and -lXdmcp with /usr/lib/libXau.so and
45 > /usr/lib/libXdmcp.so INSTEAD of the crosscompiled ones in /newroot/usr/lib
46 >
47 > Same thing even if I hardcode values in ../libtool for sys_lib_search_path_spec.
48 > I also tried setting an LDPATH in /etc/env.d/05crosscompiler.
49 >
50 > Am I missing something in /etc/ld.so.conf environment?
51 >
52 > Thanks!
53 > Dave Thomas
54 >
55 > Here are the fixes:
56 > Added to ebuild (is this right? comments? it seems to work):
57 > src_unpack()
58 > {
59 > x-modular_unpack_source
60 > x-modular_patch_source
61 > cd ${S}
62 > epatch /path/to/patchfile
63 > x-modular_reconf_source
64 > }
65 >
66 > patchfile:
67 > --- src/util/Makefile.am
68 > +++ src/util/Makefile.am
69 > @@ -4,7 +4,8 @@
70 >
71 > makekeys_CFLAGS=$(X11_CFLAGS) $(BIGREQS_CFLAGS)
72 >
73 > -#override CC = gcc
74 > +#do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
75 > +CC = gcc
76 > LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
77 >
78 > EXTRA_DIST = mkks.sh
79 > --- src/util/Makefile.in
80 > +++ src/util/Makefile.in
81 > @@ -189,8 +189,9 @@
82 >
83 > makekeys_CFLAGS = $(X11_CFLAGS) $(BIGREQS_CFLAGS)
84 >
85 > -#override CC = gcc
86 > +#no, do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
87 > +CC = gcc
88 > LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
89 >
90 > __END__
91 >
92 >
93 >
94 > --
95 > gentoo-embedded@g.o mailing list
96 --
97 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] problems crosscompiling libXt Mike Frysinger <vapier@g.o>
Re: [gentoo-dev] problems crosscompiling libXt Mike Frysinger <vapier@g.o>