From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FbDxx-0006ZU-HC for garchives@archives.gentoo.org; Wed, 03 May 2006 09:48:17 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k439lorF020017; Wed, 3 May 2006 09:47:50 GMT Received: from mailout1.informatik.tu-muenchen.de (mailout1.informatik.tu-muenchen.de [131.159.0.18]) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k439lnBp022724 for ; Wed, 3 May 2006 09:47:49 GMT Message-ID: <44587C7F.6010504@net.in.tum.de> Date: Wed, 03 May 2006 11:48:47 +0200 From: Harald Schioeberg User-Agent: Mail/News 1.5 (X11/20060406) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-embedded@gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 To: gentoo-embedded@lists.gentoo.org Subject: Re: [gentoo-embedded] emerge ppp with crosscompile problem References: <200605021639.26665.ladmanj@volny.cz> In-Reply-To: <200605021639.26665.ladmanj@volny.cz> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new/sophie/sophos at mailrelay1.informatik.tu-muenchen.de X-Archives-Salt: 57f635b5-a813-4955-a830-e26fb18b757c X-Archives-Hash: 009ea4d6597036c8fe8c1885dd45998c -----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