* [gentoo-embedded] emerge ppp with crosscompile problem
@ 2006-05-02 14:39 Jakub Ladman
2006-05-03 9:48 ` Harald Schioeberg
0 siblings, 1 reply; 9+ messages in thread
From: Jakub Ladman @ 2006-05-02 14:39 UTC (permalink / raw
To: gentoo-embedded
Hi everyone.
I have this problem
By this script i am trying to emerge ppp ebuild:
trotl ladmanj # cat memerge
#!/bin/bash
ARCH=sh4
ACCEPT_KEYWORDS="-x86 -~x86 sh ~sh"
ROOT="/home/ladmanj/work_projects/sh4prj"
CFLAGS="-Os -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${ROOT}/lib -L${ROOT}/usr/lib"
CBUILD=i686-pc-linux-gnu
CHOST=sh4-pc-linux-uclibc
CTARGET=sh4-pc-linux-uclibc
CC=sh4-pc-linux-uclibc-gcc
CXX=sh4-pc-linux-uclibc-g++
PKGDIR=/usr/portage/packages/sh4
USE="-* -X -kde -gnome -glibc uclibc make-symlinks static dhcp"
export ARCH ACCEPT_KEYWORDS CFLAGS CXXFLAGS LDFLAGS ROOT CBUILD CHOST CTARGET
CC CXX PKGDIR USE
emerge -b $*
trotl ladmanj #
this is the error i get
gcc -o dhcpc.so -shared dhcpc.o clientpacket.o packet.o socket.o options.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld:
dhcpc.o: Relocations in generic ELF (EM: 42)
dhcpc.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [dhcpc.so] Error 1
When i disable the dhcp use flag, it succesfuly installs everything. But i
need dhcp support.
Thanks for your help
Best regards
Jakub Ladman
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-02 14:39 [gentoo-embedded] emerge ppp with crosscompile problem Jakub Ladman
@ 2006-05-03 9:48 ` Harald Schioeberg
2006-05-03 9:59 ` Jakub Ladman
0 siblings, 1 reply; 9+ messages in thread
From: Harald Schioeberg @ 2006-05-03 9:48 UTC (permalink / raw
To: gentoo-embedded
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jakub Ladman wrote:
> Hi everyone.
> I have this problem
> By this script i am trying to emerge ppp ebuild:
>
> trotl ladmanj # cat memerge
> #!/bin/bash
>
> ARCH=sh4
> ACCEPT_KEYWORDS="-x86 -~x86 sh ~sh"
> ROOT="/home/ladmanj/work_projects/sh4prj"
> CFLAGS="-Os -pipe"
> CXXFLAGS="${CFLAGS}"
> LDFLAGS="-L${ROOT}/lib -L${ROOT}/usr/lib"
> CBUILD=i686-pc-linux-gnu
> CHOST=sh4-pc-linux-uclibc
> CTARGET=sh4-pc-linux-uclibc
> CC=sh4-pc-linux-uclibc-gcc
> CXX=sh4-pc-linux-uclibc-g++
> PKGDIR=/usr/portage/packages/sh4
> USE="-* -X -kde -gnome -glibc uclibc make-symlinks static dhcp"
>
> export ARCH ACCEPT_KEYWORDS CFLAGS CXXFLAGS LDFLAGS ROOT CBUILD CHOST CTARGET
> CC CXX PKGDIR USE
>
> emerge -b $*
> trotl ladmanj #
>
> this is the error i get
>
> gcc -o dhcpc.so -shared dhcpc.o clientpacket.o packet.o socket.o options.o
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld:
> dhcpc.o: Relocations in generic ELF (EM: 42)
> dhcpc.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make[2]: *** [dhcpc.so] Error 1
things that come up in my mind, perhaps worth trying:
1) it uses the i686-pc-linux-gnu/bin/ld, don't you need the
sh4-pc-linux-uclibc-ld ?
export LD="sh4-pc-linux-uclibc-ld"
2) try adding -fpic or -fPIC to your CFLAGS, relocation error sounds a
bit like that.
3) it uses the gcc to compile a .so
3a) it should use the sh4-pc-linux-uclibc-gcc
3b) it shouldn't build a .so at all with USE="-* static"
correct my if i'm wrong, but that sounds that either the dhcp ebuild is
completely broken (unlikely) or your variables don't end up in your emerge.
4) try adding an export ROOT="/path/to/sh4/system" variable, maybe it
gets confused when merging your sh4 binaries to / , maybe it tries to
link something to libs from /
just some wild guesses.
Harald
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEWHx/Jgyxs71kcx4RArxcAJ0ccINX+JdV2/+GjWRc2sXb+mzw5ACeInoJ
SgniBpgL+CT2mP7eM41L5Dg=
=qETX
-----END PGP SIGNATURE-----
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 9:48 ` Harald Schioeberg
@ 2006-05-03 9:59 ` Jakub Ladman
2006-05-03 10:42 ` Jakub Ladman
0 siblings, 1 reply; 9+ messages in thread
From: Jakub Ladman @ 2006-05-03 9:59 UTC (permalink / raw
To: gentoo-embedded
Thanks for answer.
>
> 1) it uses the i686-pc-linux-gnu/bin/ld, don't you need the
> sh4-pc-linux-uclibc-ld ?
> export LD="sh4-pc-linux-uclibc-ld"
I will try it, it seems to be one of my mistakes
>
> 2) try adding -fpic or -fPIC to your CFLAGS, relocation error sounds a
> bit like that.
I will try it, even i do not know what it is.
>
> 3) it uses the gcc to compile a .so
> 3a) it should use the sh4-pc-linux-uclibc-gcc
> 3b) it shouldn't build a .so at all with USE="-* static"
It must be bug in ebuild, cause to other ebuilds are using the correct
compiler.
I will try to remove static use flag.
> correct my if i'm wrong, but that sounds that either the dhcp ebuild is
> completely broken (unlikely) or your variables don't end up in your emerge.
>
> 4) try adding an export ROOT="/path/to/sh4/system" variable, maybe it
> gets confused when merging your sh4 binaries to / , maybe it tries to
> link something to libs from /
That is allready set.
>
> just some wild guesses.
> Harald
Best regards
Jakub
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 9:59 ` Jakub Ladman
@ 2006-05-03 10:42 ` Jakub Ladman
2006-05-03 11:57 ` Harald Schioeberg
0 siblings, 1 reply; 9+ messages in thread
From: Jakub Ladman @ 2006-05-03 10:42 UTC (permalink / raw
To: gentoo-embedded
Hi all
trotl ladmanj # ./memerge -va ppp
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] net-dialup/ppp-2.4.3-r14
to /home/ladmanj/work_projects/sh4prj/ -activefilter -atm +dhcp -eap-tls -gtk
-ipv6 -mppe-mppc -pam -radius 0 kB
make[2]: Entering directory
`/var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/dhcp'
sh4-pc-linux-uclibc-gcc -I../.. -I../../../include -Os -pipe -fPIC -fPIC -c
-o dhcpc.o dhcpc.c
sh4-pc-linux-uclibc-gcc -I../.. -I../../../include -Os -pipe -fPIC -fPIC -c
-o clientpacket.o clientpacket.c
sh4-pc-linux-uclibc-gcc -I../.. -I../../../include -Os -pipe -fPIC -fPIC -c
-o packet.o packet.c
sh4-pc-linux-uclibc-gcc -I../.. -I../../../include -Os -pipe -fPIC -fPIC -c
-o socket.o socket.c
sh4-pc-linux-uclibc-gcc -I../.. -I../../../include -Os -pipe -fPIC -fPIC -c
-o options.o options.c
gcc -o dhcpc.so -shared dhcpc.o clientpacket.o packet.o socket.o options.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/bin/ld:
dhcpc.o: Relocations in generic ELF (EM: 42)
dhcpc.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [dhcpc.so] Error 1
make[2]: Leaving directory
`/var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/dhcp'
actual script is:
#!/bin/bash
ARCH=sh4
ACCEPT_KEYWORDS="-x86 -~x86 sh ~sh"
ROOT="/home/ladmanj/work_projects/sh4prj"
CFLAGS="-Os -pipe -fPIC"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${ROOT}/lib -L${ROOT}/usr/lib"
LD="sh4-pc-linux-uclibc-ld"
CBUILD=i686-pc-linux-gnu
CHOST=sh4-pc-linux-uclibc
CTARGET=sh4-pc-linux-uclibc
CC=sh4-pc-linux-uclibc-gcc
CXX=sh4-pc-linux-uclibc-g++
PKGDIR=/usr/portage/packages/sh4
USE="-* -X -kde -gnome -glibc uclibc make-symlinks dhcp"
export ARCH ACCEPT_KEYWORDS CFLAGS CXXFLAGS LDFLAGS ROOT CBUILD CHOST CTARGET
CC CXX PKGDIR USE
emerge -b $*
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 10:42 ` Jakub Ladman
@ 2006-05-03 11:57 ` Harald Schioeberg
2006-05-03 12:09 ` Jakub Ladman
2006-05-03 13:01 ` wireless
0 siblings, 2 replies; 9+ messages in thread
From: Harald Schioeberg @ 2006-05-03 11:57 UTC (permalink / raw
To: gentoo-embedded
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
i found your problem:
it is in
/var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/Makefile.linux
these are the first lines of this file:
CC = gcc
COPTS = -O2 -g
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
LDFLAGS = -shared
[...]
.... and it simply does not respect any environment variables.
Time to write a patch and file the bugreport against the ppp ebuild.
cheers
Harald
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEWJqxJgyxs71kcx4RAoK9AKCXauIOxEp59jp3+Qa+ly3mXzoFVgCgoSGx
I3yoOrbfeWeulrJ4Smsiw2Y=
=rgU6
-----END PGP SIGNATURE-----
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 11:57 ` Harald Schioeberg
@ 2006-05-03 12:09 ` Jakub Ladman
2006-05-03 12:27 ` Harald Schioeberg
2006-05-03 13:01 ` wireless
1 sibling, 1 reply; 9+ messages in thread
From: Jakub Ladman @ 2006-05-03 12:09 UTC (permalink / raw
To: gentoo-embedded
Dne st 3. května 2006 13:57 Harald Schioeberg napsal(a):
> i found your problem:
> it is in
> /var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/Makefile.linux
>
> these are the first lines of this file:
>
> CC = gcc
> COPTS = -O2 -g
> CFLAGS = $(COPTS) -I.. -I../../include -fPIC
> LDFLAGS = -shared
> [...]
>
> .... and it simply does not respect any environment variables.
> Time to write a patch and file the bugreport against the ppp ebuild.
But i do not know how to do it :-(
Jakub Ladman
>
> cheers
> Harald
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 12:09 ` Jakub Ladman
@ 2006-05-03 12:27 ` Harald Schioeberg
2006-05-03 12:41 ` Harald Schioeberg
0 siblings, 1 reply; 9+ messages in thread
From: Harald Schioeberg @ 2006-05-03 12:27 UTC (permalink / raw
To: gentoo-embedded
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jakub Ladman wrote:
> Dne st 3. května 2006 13:57 Harald Schioeberg napsal(a):
>> i found your problem:
>> it is in
>> /var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/Makefile.linux
>>
>> these are the first lines of this file:
>>
>> CC = gcc
>> COPTS = -O2 -g
>> CFLAGS = $(COPTS) -I.. -I../../include -fPIC
>> LDFLAGS = -shared
>> [...]
>>
>> .... and it simply does not respect any environment variables.
>> Time to write a patch and file the bugreport against the ppp ebuild.
>
> But i do not know how to do it :-(
> Jakub Ladman
>
>> cheers
>> Harald
>
A workaround until a new ppp ebuild is released might be (untested):
ln -s /usr/bin/sh4-..-gcc /usr/local/sh4-tools/gcc
PATH="/usr/local/sh4-tools:$PATH"
emerge ppp
i have filed a bug:
http://bugs.gentoo.org/show_bug.cgi?id=132115
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEWKHHJgyxs71kcx4RAopKAKDgkC5vktq5XLlc/7DMTUDVJ8N93gCfdOju
i9sIvFmVFEBRvLXZED8PN9A=
=nMSv
-----END PGP SIGNATURE-----
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 12:27 ` Harald Schioeberg
@ 2006-05-03 12:41 ` Harald Schioeberg
0 siblings, 0 replies; 9+ messages in thread
From: Harald Schioeberg @ 2006-05-03 12:41 UTC (permalink / raw
To: gentoo-embedded
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>
> http://bugs.gentoo.org/show_bug.cgi?id=132115
>
what i forgot: Jakub, can you please attach the output of emerge --info
and your the rest of your build setup to the bug.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEWKTyJgyxs71kcx4RAu/1AJ0eVjZK0EahdI7hB+RZSI29zatE4QCgvhH/
gB12qqY1I4+VL6ZXiZSmjF4=
=c9tU
-----END PGP SIGNATURE-----
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-embedded] emerge ppp with crosscompile problem
2006-05-03 11:57 ` Harald Schioeberg
2006-05-03 12:09 ` Jakub Ladman
@ 2006-05-03 13:01 ` wireless
1 sibling, 0 replies; 9+ messages in thread
From: wireless @ 2006-05-03 13:01 UTC (permalink / raw
To: gentoo-embedded
Harald Schioeberg wrote:
> i found your problem:
> it is in
> /var/tmp/portage/ppp-2.4.3-r14/work/ppp-2.4.3/pppd/plugins/Makefile.linux
>
> these are the first lines of this file:
>
> CC = gcc
> COPTS = -O2 -g
Maybe it would be useful to try 'small binaries'
COPTS = -Os -g
> cheers
> Harald
James
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-05-03 12:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-02 14:39 [gentoo-embedded] emerge ppp with crosscompile problem Jakub Ladman
2006-05-03 9:48 ` Harald Schioeberg
2006-05-03 9:59 ` Jakub Ladman
2006-05-03 10:42 ` Jakub Ladman
2006-05-03 11:57 ` Harald Schioeberg
2006-05-03 12:09 ` Jakub Ladman
2006-05-03 12:27 ` Harald Schioeberg
2006-05-03 12:41 ` Harald Schioeberg
2006-05-03 13:01 ` wireless
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox