FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 11-05-2009, 10:38 PM
Goswin von Brederlow
 
Default Bug#554690: Building cross-compiler for multilib arch fails

Package: gcc-4.3
Version: 4.3.4-1
Severity: wishlist

Hi,

I'm trying to build a cross-compiler for i486-linux-gnu for amd64
Debian and it fails. I know, I know, there is gcc -m32. But I need to
test cross-compiling and I don't have an arm cpu to test with.

I followed the instructions on http://emdebian.org/tools/crossdev.html

export GCC_TARGET=i386
debian/rules control
dpkg-buildpackage -b -rfakeroot

The problem comes when building a 64bit libgcc:

/bin/bash ../../../../src/libgcc/../mkinstalldirs 64
/home/mrvn/src/gcc-4.3-4.3.4/build/./gcc/xgcc -B/home/mrvn/src/gcc-4.3-4.3.4/build/./gcc/ -B/usr/i486-linux-gnu/bin/ -B/usr/i486-linux-gnu/lib/ -isystem /usr/i486-linux-gnu/include -isystem /usr/i486-linux-gnu/sys-include -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o 64/libgcc_s.so.1.tmp -O2 -g -g -O2 -m64 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popco
unt_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-
gnat_s.o unwind-c_s.o emutls_s.o -lc && rm -f 64/libgcc_s.so && if [ -f 64/libgcc_s.so.1 ]; then mv -f 64/libgcc_s.so.1 64/libgcc_s.so.1.backup; else true; fi && mv 64/libgcc_s.so.1.tmp 64/libgcc_s.so.1 && ln -s libgcc_s.so.1 64/libgcc_s.so
/usr/i486-linux-gnu/bin/ld: skipping incompatible /usr/i486-linux-gnu/lib/libc.so when searching for -lc
/usr/i486-linux-gnu/bin/ld: skipping incompatible /usr/i486-linux-gnu/lib/libc.a when searching for -lc
/usr/i486-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[6]: *** [libgcc_s.so] Error 1
make[6]: Leaving directory `/home/mrvn/src/gcc-4.3-4.3.4/build/i486-linux-gnu/64/libgcc'

The problem is that there is no 64bit libc in /usr/i486-linux-gnu/lib/.
I linked /usr/i486-linux-gnu/lib64 -> ../lib64 so there is an
/usr/i486-linux-gnu/lib64/libc.so that it should use. But the command
line specifically says -B/usr/i486-linux-gnu/lib/.

It looks to me like building a cross-compiler is incompatible with
multilib.

MfG Goswin

-- System Information:
Debian Release: squeeze/sid
APT prefers unstable-amd64
APT policy: (1001, 'unstable-amd64'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29.4-frosties-2 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages gcc-4.3 depends on:
ii binutils 2.19.51.20090805-1 The GNU assembler, linker and bina
ii cpp-4.3 4.3.4-1 The GNU C preprocessor
ii gcc-4.3-base 4.3.4-1 The GNU Compiler Collection (base
ii libc6 2.10.1-2 GNU C Library: Shared libraries
ii libgcc1 1:4.4.1-1 GCC support library
ii libgomp1 4.4.1-1 GCC OpenMP (GOMP) support library

Versions of packages gcc-4.3 recommends:
ii libc6-dev 2.10.1-2 GNU C Library: Development Librari

Versions of packages gcc-4.3 suggests:
ii gcc-4.3-doc 4.3.2.nf1-1 documentation for the GNU compiler
pn gcc-4.3-locales <none> (no description available)
pn gcc-4.3-multilib <none> (no description available)
pn libgcc1-dbg <none> (no description available)
pn libgomp1-dbg <none> (no description available)
pn libmudflap0-4.3-dev <none> (no description available)
pn libmudflap0-dbg <none> (no description available)

-- no debconf information



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-09-2010, 02:51 PM
Giel van Schijndel
 
Default Bug#554690: Building cross-compiler for multilib arch fails

On Fri, Nov 06, 2009 at 12:38:33AM +0100, Goswin von Brederlow wrote:
> I'm trying to build a cross-compiler for i486-linux-gnu for amd64
> Debian and it fails. I know, I know, there is gcc -m32. But I need to
> test cross-compiling and I don't have an arm cpu to test with.
>
> I followed the instructions on http://emdebian.org/tools/crossdev.html
>
> export GCC_TARGET=i386
> debian/rules control
> dpkg-buildpackage -b -rfakeroot
>
> The problem comes when building a 64bit libgcc:

I had the same problem. Further considering that I simply don't need to
use the i486-linux-gnu compiler to build binaries for x86_64-linux-gnu
(I can use the native compiler for that). Thus I disabled lib64 support
of the cross compiler by setting this environment variable:
> DEB_CROSS_NO_BIARCH=yes

--
Met vriendelijke groet,
With kind regards,
Giel van Schijndel



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100309155142.GA31550@vps.mortis.eu">http://lists.debian.org/20100309155142.GA31550@vps.mortis.eu
 
Old 03-09-2010, 11:33 PM
Giel van Schijndel
 
Default Bug#554690: Building cross-compiler for multilib arch fails

On Tue, Mar 09, 2010 at 04:51:42PM +0100, Giel van Schijndel wrote:
> On Fri, Nov 06, 2009 at 12:38:33AM +0100, Goswin von Brederlow wrote:
>> I'm trying to build a cross-compiler for i486-linux-gnu for amd64
>> Debian and it fails. I know, I know, there is gcc -m32. But I need to
>> test cross-compiling and I don't have an arm cpu to test with.
>>
>> I followed the instructions on http://emdebian.org/tools/crossdev.html
>>
>> export GCC_TARGET=i386
>> debian/rules control
>> dpkg-buildpackage -b -rfakeroot
>>
>> The problem comes when building a 64bit libgcc:
>
> I had the same problem. Further considering that I simply don't need
> to use the i486-linux-gnu compiler to build binaries for
> x86_64-linux-gnu (I can use the native compiler for that). Thus I
> disabled lib64 support of the cross compiler by setting this
> environment variable:
>> DEB_CROSS_NO_BIARCH=yes

PS I documented the build process a bit more thoroughly on my blog [1].

[1] http://blog.mortis.eu/blog/2010/03/building-a-x86-cross-compiler-on-a-x86-64-debian-based-system.html

--
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
 

Thread Tools




All times are GMT. The time now is 01:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org