LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-27-2012, 04:22 AM   #1
McZ
Member
 
Registered: Aug 2012
Posts: 42

Rep: Reputation: Disabled
ld SEARCH_DIR? 64bit LFS-7.1


I have made my own scripts for building LFS-7.1. So now I just have to boot my CD and prepeare partition and mount it to /mnt/lfs and enter
Code:
cd /usr/src && make world
yes a bit FreeBSD inspired

Recently I installed 64bit ArchLinux to build 64bit LFS and update my scripts where needed, because I want a pure 64bit LFS.

But when I get to 6.17 GCC-4.6.2 the output of
Code:
grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
is:
Code:
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib")
and not this as it say in the book:
Code:
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib")
The problem with this is that many packages install libraries in both /lib and /lib64 (why?) thus libraries in /lib64 can't be found. (or in /lib if I change how I re-adjust my toolchain)
My solution so far is to symlink /lib to /lib64 (and the same in /usr{,/local}) but this does feel like an ugly hack not a real solution. So how can I fix my SEARCH_DIR to use both /lib and /lib64?

Last edited by McZ; 08-27-2012 at 04:23 AM. Reason: Made my question Bold for those who don't have time to read all ;)
 
Old 08-27-2012, 04:32 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
In chapter 6.5 this step is executed:
Code:
case $(uname -m) in
 x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
esac
This should have created the lib64 links if the output of uname -m is x86_64.
 
Old 08-27-2012, 04:48 AM   #3
McZ
Member
 
Registered: Aug 2012
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
In chapter 6.5 this step is executed:
Code:
case $(uname -m) in
 x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
esac
This should have created the lib64 links if the output of uname -m is x86_64.
Yes I know. And I have the links and I have successfully built all packages using the symlinks.
BUT this does not change my SEARCH_DIR to use both /lib and /lib64 search paths as it says in the example in the book. Maybe this isn't an issue?
 
Old 08-27-2012, 05:58 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
I'm at a loss why this happens. Those two are links and what is put in one shows up in the accompanying link as well.

Maybe the script(s) you created skips a step or introduces a mistake somewhere down the road....
 
Old 08-27-2012, 06:19 AM   #5
McZ
Member
 
Registered: Aug 2012
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
I'm at a loss why this happens. Those two are links and what is put in one shows up in the accompanying link as well.
I have those links, my build scripts is just cut and paste from the book and then a Makefile + bash scripts to read them. Everything works good on 32bit, but they did not work when I took the step to 64bit.

Quote:
Originally Posted by druuna View Post
Maybe the script(s) you created skips a step or introduces a mistake somewhere down the road....
Maybe, and this is what I'm trying to find.
 
Old 08-27-2012, 06:47 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by McZ View Post
Everything works good on 32bit, but they did not work when I took the step to 64bit.
All steps are the same when building on top of 32 or 64 bit. Some of the steps are only executed when a 32/64 bit system is recognized. The checks surrounding the command(s) make sure these are only executed if a 32/64 bit system is found (most use uname -m to check).

Assuming you put all the steps in the book in your script(s) this should work.

Are you sure that your 64 bit host is fully compliant to build LFS?
 
Old 08-27-2012, 07:40 AM   #7
McZ
Member
 
Registered: Aug 2012
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
...
Are you sure that your 64 bit host is fully compliant to build LFS?
Maybe this is the issue, I have forgotten to run the version check script when I switched to ArchLinux x64 from running 32bit Zenwalk as build Host.

ArchLinux does have packages with higher version than recomended. Gcc-4.7.1, Glibc-2.16.
Going to download another Linux dist once I find one with 64bit and what I need to build LFS-x86_64-7.1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
LFS+BLFS on 64bit - Now want to have WinE DaCapitalist Linux From Scratch 1 04-28-2009 12:51 PM
can LFS be build as a 64bit system and can I use the slackware /etc scripts rob.rice Linux From Scratch 4 09-12-2008 04:33 AM
Building 64bit LFS currir55 Linux From Scratch 1 11-15-2005 03:47 PM
LFS compiled in 64bit mode? ParticleHunter Linux From Scratch 4 06-03-2004 01:33 PM


All times are GMT -5. The time now is 07:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration