LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 09-05-2011, 09:08 AM   #1
sanitynotvanity
Member
 
Registered: Jul 2007
Location: UK
Distribution: LFS 6.8, Android, Ubuntu 10.10, XP, 7 (HB,HP,Ultimate)
Posts: 41

Rep: Reputation: 15
Multilib support for LFS-6.8 - Help please


Hi,

First of all I am aware that LFS-6.8 and 7.0 RC1 expicitly state that they do not support multilib at present.

However, I am between a rock and a hard place called multilib.

the rock is a big application that controls hardware in real-time. it was written with the principle that a long is always 32bit, and Int could be anything so don't use it!

the OS must be upgraded from 32bit to 64bit, and currently it is based on pure 64bit compilation of LFS-6.8.

So now that 32bit long looks somewhat more like 64bit!

we could have looked to port our application into 64bit realm, which would have been someone else's problem. Unfortunately I must have drawn the short straw, as it is my problem that I must now produce a multilib version of LFS-6.8 instead (apparently a lesser task).

what I have done so far is:

binutils pass 1:
configure line now has --enable-multilib
I still create the symlink for /tools/lib64

gcc-pass1
removed --disable-multilib from configure line

adjusting
added a new part to the sed command in the SPECS file to make the following change:
*multilib:
. !m64 !m32;64:../lib64 m64 !m32;32:../lib !m64 m32;
to:
*multilib:
. !m64 !m32;.:../lib64 m64 !m32;../lib !m64 m32;
REFERENCE: http://connie.slackware.com/~alien/m.../source/README

binutils pass 2:
configure line now has --enable-multilib

gcc-pass 2
removed the sed command that deleted MULTILIB_OSDIRNAMES
removed --disable-multilib from configure line

From what I understand if I have installed binutils and gcc correctly in the first pass then when glibc is installed it will install appropriately in multilib. However, I still do not get a stub-32.h in /tools/include/gnu which is the compile error for gcc-pass 2.

and so that is my problem, where is stub-32.h?

how far off track am I? I'm obviously missing something.

Would greatly appreciate some advice,

thanks in advance,

Andy
 
Old 09-05-2011, 10:06 AM   #2
sanitynotvanity
Member
 
Registered: Jul 2007
Location: UK
Distribution: LFS 6.8, Android, Ubuntu 10.10, XP, 7 (HB,HP,Ultimate)
Posts: 41

Original Poster
Rep: Reputation: 15
after reading the following thread:
http://www.linuxquestions.org/questi...923/page2.html

which at first I dismissed, but since read to the end I have found that one poster weibullguy indicates that glibc would need to be compiled for each arch type (in my case, 32 and 64) using the host= parameter.

However, I am still quite unsure how this would work. Would I not just be overwritting the 64 support with 32 and vice/versa?

I need both at the same time.

has anyone does this before? My google searches are cluttered with peoples experiences on package managed distro's such as ubuntu where the thread concludes with install the dev package! Which makes it hard to find proper linux help

Last edited by sanitynotvanity; 09-05-2011 at 10:08 AM. Reason: missed a word
 
Old 09-09-2011, 07:12 AM   #3
magiknight
Member
 
Registered: Oct 2003
Posts: 37

Rep: Reputation: 4
Take a look at CLFS... it does support multilib configurations.
 
Old 09-12-2011, 04:42 AM   #4
sanitynotvanity
Member
 
Registered: Jul 2007
Location: UK
Distribution: LFS 6.8, Android, Ubuntu 10.10, XP, 7 (HB,HP,Ultimate)
Posts: 41

Original Poster
Rep: Reputation: 15
Hi magiknight,

thanks for your response. Sorry it has taken me so long to reply.

I have indeed been looking at CLFS, I hadn't updated my progress because I was hoping for an alternative.


So CLFS adds a new chapter for the cross compile tools. Do I need this? It makes sense if you are compiling on two very different architectures such as PowerPC from X86. However I am compiling from x86_64 to x86_64 just with 32bit multi-lib.
CLFS uses cross-tools to compile temporary tools to compile basic system to avoid using the host compiler. However as my host and target architectures are the same. Surely I can use the host compiler to compile the temporary tools to compile the basic system as per LFS?

From my current understanding all I need to do is compile most of the basic system in both 32bit and 64 bit. To do this requries a multi-lib compatible tool chain. To do that I think (please correct me) I need a multi-lib compatible temporary tool chain.

but if that is true then it really becomes chicken and the egg. How do you create a multi-lib tool chain without a multi-lib tool chain?

----

furthermore I have some reason to believe CLFS approach may not be the best for my scenario because I have read from slackware to use --enable-multilib in the binutils. However this is not used in CLFS.


thanks in advance
 
Old 09-12-2011, 07:13 AM   #5
magiknight
Member
 
Registered: Oct 2003
Posts: 37

Rep: Reputation: 4
Quote:
Originally Posted by sanitynotvanity View Post
Hi magiknight,

So CLFS adds a new chapter for the cross compile tools. Do I need this? It makes sense if you are compiling on two very different architectures such as PowerPC from X86. However I am compiling from x86_64 to x86_64 just with 32bit multi-lib.
CLFS uses cross-tools to compile temporary tools to compile basic system to avoid using the host compiler. However as my host and target architectures are the same. Surely I can use the host compiler to compile the temporary tools to compile the basic system as per LFS?
Yes you do, the current LFS doesnt support multilib yet, this is being worked on. CLFS's book gives you an option to compile a multilib CLFS for the x86_64 and i686 builds.

Quote:
From my current understanding all I need to do is compile most of the basic system in both 32bit and 64 bit. To do this requries a multi-lib compatible tool chain. To do that I think (please correct me) I need a multi-lib compatible temporary tool chain.
Yes this is correct, and also a wrapper for certain packages like perl, so apps can invoke it in either 32 it 64 bit versions.

Quote:
but if that is true then it really becomes chicken and the egg. How do you create a multi-lib tool chain without a multi-lib tool chain?
By creating cross-tools first then constructing a temporary system.


----

Quote:
furthermore I have some reason to believe CLFS approach may not be the best for my scenario because I have read from slackware to use --enable-multilib in the binutils. However this is not used in CLFS.
This is because Slackware miltilib support is a hack, also their are different ways to do things as well, if you look at Slackware's Ada support it's compiled last yet the shared ada libs are compiled the first time around...
 
  


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
[SOLVED] Broffice not compile on Slack64(multilib or no multilib);SlackBuild afreitascs Slackware 4 06-14-2010 07:16 AM
Questions about and errors found in Version 7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 1 09-06-2005 11:10 PM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM
How to enable large file support (LFS)? maddmike SUSE / openSUSE 0 12-27-2004 10:45 AM
LFS Support Red Hat Entreprise 2.1 simquest Linux - Software 1 06-01-2004 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:57 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