LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2007, 03:38 AM   #1
nLEyETn
LQ Newbie
 
Registered: Mar 2007
Posts: 28

Rep: Reputation: 15
Unhappy Trouble building a Cross Compiler to use to build a x86_64 kernel.


I'm attempting to build a Cross Compiler and keep running into problems; so if anyone can please help me it would be much appreciated. I'm using a Slackware 11.0 host system with a 2.6.20.1 kernel with the default ARCH="i386" built by myself. I then downloaded 'binutils-2.17,' 'gcc-4.1.2' and 'glibc-2.5.' I then built binutils with the following sequence:

Code:
unset CFLAGS
unset CXXFLAGS
../binutils/binutils-2.17/configure  --prefix=/usr/local/env64 --target=x86_64-sw-linux --with-lib-path=/usr/local/tmp/lib --enable-shared --enable-64-bit-bfd --disable-multilib
make
make install
This seemed to work fine. I should mention that /usr/local/tmp and it's subdirectory lib are empty. I then built gcc as so:

Code:
export PATH=$PATH:/usr/local/env64
export CFLAGS='-Dinhibit_libc'
../gcc/gcc-4.1.2/configure   --prefix=/usr/local/env64 --target=x86_64-sw-linux --with-local-prefix=/usr/local/tmp --disable-shared --disable-multilib --disable-threads --enable-languages=c
make all-gcc
make install-gcc
This also seemed to build without any real problems. Then I tried to build glibc like so:

Code:
mkdir /usr/local/env64/x86_64-sw-linux/include
cp -r /usr/src/linux/include/linux /usr/local/env64/x86_64-sw-linux/include
cp -r /usr/src/linux/include/asm-generic /usr/local/env64/x86_64-sw-linux/include
cp -r /usr/src/linux/include/asm-x86_64 /usr/local/env64/x86_64-sw-linux/include/asm
BUILD_CC="gcc" CC="x86_64-sw-linux-gcc -m64" AR="x86_64-sw-linux-ar" RANLIB="x86_64-sw-linux-ranlib" ../glibc/glibc-2.5/configure --prefix=/usr/local/env64 --host=x86_64-sw-linux --build=i686-pc-linux-gnu --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-binutils=/usr/local/env64/bin --with-headers=/usr/local/env64/x86_64-sw-linux/include
This gives me the following error:

"configure: error: forced unwind support is required." I have no idea what to do now, so if anyone can please help I'd appreciate it.
 
Old 05-07-2007, 06:51 AM   #2
Mahonri
Member
 
Registered: May 2007
Location: Austin, Texas, USA
Distribution: Debian Etch
Posts: 34

Rep: Reputation: 15
I'm stuck on this error also!

I've scoured the net trying to figure out how to overcome this. I'm trying to build a x86-64 -> i686 cross compiler. From what I can tell, the problem has something to do with a dependency on a libc. In other words, you need a libc to compile a libc!

Were you ever able to solve this problem?
 
Old 05-08-2007, 06:35 PM   #3
nLEyETn
LQ Newbie
 
Registered: Mar 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Sorry, no. I ended up installing Slamd64 in my case instead of using Slackware. Later on I decided to skip the headaches for now, and just go with Slackware. Slamd64 was nice but you really need a dual environment with 32 and 64 bits since there are some binaries which I cannot recompile because they are closed source. Such as video codecs. Basically I head to compile alot of stuff for both 32 and 64 bits, but that got tedious, so I decided to go with a strict 32 environment for now since everything is supported on that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help building x86_64 Cross compiler on x86 linux (Red Hat) torque_dwf Linux - Software 4 01-08-2009 03:37 AM
glib Error: while building Cross-Compiler for PPC Dhana_pal Linux From Scratch 2 12-28-2006 12:57 AM
Cross compiler build enviroment terp4life2001 Linux - General 1 12-10-2005 11:20 AM
Building cross-compiler gcc for powerpc-linux ccool Linux - General 3 09-17-2004 06:33 AM
Building an ARM7 cross compiler from gcc Charlie_B Linux - Software 2 08-20-2003 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration