1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Jakub Ladman wrote: |
5 |
> Hi everyone. |
6 |
> I have this problem |
7 |
> By this script i am trying to emerge ppp ebuild: |
8 |
> |
9 |
> trotl ladmanj # cat memerge |
10 |
> #!/bin/bash |
11 |
> |
12 |
> ARCH=sh4 |
13 |
> ACCEPT_KEYWORDS="-x86 -~x86 sh ~sh" |
14 |
> ROOT="/home/ladmanj/work_projects/sh4prj" |
15 |
> CFLAGS="-Os -pipe" |
16 |
> CXXFLAGS="${CFLAGS}" |
17 |
> LDFLAGS="-L${ROOT}/lib -L${ROOT}/usr/lib" |
18 |
> CBUILD=i686-pc-linux-gnu |
19 |
> CHOST=sh4-pc-linux-uclibc |
20 |
> CTARGET=sh4-pc-linux-uclibc |
21 |
> CC=sh4-pc-linux-uclibc-gcc |
22 |
> CXX=sh4-pc-linux-uclibc-g++ |
23 |
> PKGDIR=/usr/portage/packages/sh4 |
24 |
> USE="-* -X -kde -gnome -glibc uclibc make-symlinks static dhcp" |
25 |
> |
26 |
> export ARCH ACCEPT_KEYWORDS CFLAGS CXXFLAGS LDFLAGS ROOT CBUILD CHOST CTARGET |
27 |
> CC CXX PKGDIR USE |
28 |
> |
29 |
> emerge -b $* |
30 |
> trotl ladmanj # |
31 |
> |
32 |
> this is the error i get |
33 |
> |
34 |
> gcc -o dhcpc.so -shared dhcpc.o clientpacket.o packet.o socket.o options.o |
35 |
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld: |
36 |
> dhcpc.o: Relocations in generic ELF (EM: 42) |
37 |
> dhcpc.o: could not read symbols: File in wrong format |
38 |
> collect2: ld returned 1 exit status |
39 |
> make[2]: *** [dhcpc.so] Error 1 |
40 |
|
41 |
things that come up in my mind, perhaps worth trying: |
42 |
|
43 |
1) it uses the i686-pc-linux-gnu/bin/ld, don't you need the |
44 |
sh4-pc-linux-uclibc-ld ? |
45 |
export LD="sh4-pc-linux-uclibc-ld" |
46 |
|
47 |
2) try adding -fpic or -fPIC to your CFLAGS, relocation error sounds a |
48 |
bit like that. |
49 |
|
50 |
3) it uses the gcc to compile a .so |
51 |
3a) it should use the sh4-pc-linux-uclibc-gcc |
52 |
3b) it shouldn't build a .so at all with USE="-* static" |
53 |
correct my if i'm wrong, but that sounds that either the dhcp ebuild is |
54 |
completely broken (unlikely) or your variables don't end up in your emerge. |
55 |
|
56 |
4) try adding an export ROOT="/path/to/sh4/system" variable, maybe it |
57 |
gets confused when merging your sh4 binaries to / , maybe it tries to |
58 |
link something to libs from / |
59 |
|
60 |
just some wild guesses. |
61 |
Harald |
62 |
-----BEGIN PGP SIGNATURE----- |
63 |
Version: GnuPG v1.4.2.1 (GNU/Linux) |
64 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
65 |
|
66 |
iD8DBQFEWHx/Jgyxs71kcx4RArxcAJ0ccINX+JdV2/+GjWRc2sXb+mzw5ACeInoJ |
67 |
SgniBpgL+CT2mP7eM41L5Dg= |
68 |
=qETX |
69 |
-----END PGP SIGNATURE----- |
70 |
-- |
71 |
gentoo-embedded@g.o mailing list |