LinuxQuestions.org
Visit Jeremy's Blog.
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 05-06-2006, 01:09 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Directories for Package Installation 6.1.1


Hi Everbody,

I realize this is an elementary question, but I have two concerns. I have installed Binutils and GCC and am now in the process of installing Linux-Libc-Headers. The instructions directed me to create a separate build directory for Binutils and GCC, one for each. There is no such instruction for decompressing and installing the Linux-Libc-Headers package. Where do I install it? After installation, I have do this command:

Code:
cp -Rv include/asm-i386 /usr/include/asm
cp -Rv include/linux /usr/include
These locations to do not yet exist, so I am assuming these files will be found in Linux-Libc-Headers. I just don't want the files from the host system to be corrupted or interfere with this project. Does each package have to have its own build directory?

Any help would be greatly appreciated.

Bob
 
Old 05-06-2006, 03:32 PM   #2
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Not going to plan..

Well, every turn is a new advernture. Got the headers installed, now trying to install Glibc-2.3.4, per instruction and created a glibc-build directory to decompress it. Did so, and expecting to ./configure make make install, I get this:

Code:
lfs:/mnt/lfs/glibc-build/glibc-2.3.4$ ./configure --prefix=/tools \
>     --disable-profile --enable-add-ons \
>     --enable-kernel=2.6.0 --with-binutils=/tools/bin \
>     --without-gd --with-headers=/tools/include \
>     --without-selinux
configure: error: you must configure in a separate build directory
If I just move it to another directory, same error. How can you build/configure glibc-2.3.4 outside of the glibc-2.3.4 directory. Trying that just results in a "no such file or directory"

Anyone have any ideas?

Thanks

Bob
 
Old 05-06-2006, 04:36 PM   #3
Seph64
Member
 
Registered: Feb 2003
Distribution: Gentoo, FreeBSD, LFS
Posts: 298
Blog Entries: 21

Rep: Reputation: 30
Try doing this:

Code:
cd .. &&
mv glibc-2.3.4/ ../ &&
../glibc-2.3.4/configure --prefix=/tools \
     --disable-profile --enable-add-ons \
     --enable-kernel=2.6.0 --with-binutils=/tools/bin \
     --without-gd --with-headers=/tools/include \
     --without-selinux
Since you extracted glibc in the glibc-build directory, this should do the trick.
 
Old 05-06-2006, 04:47 PM   #4
R3D
LQ Newbie
 
Registered: Apr 2006
Location: Belgium, Antwerp City
Distribution: Slackware 10.2
Posts: 6

Rep: Reputation: 0
The source and build directories for glibc should be located next to eachother, eg;
$LFS/sources/glibc-2.3.4
$LFS/sources/glibc-build


Here is an excample:

Step into your sources directory;
Code:
cd $LFS/sources
Unpack glibc and step into the directory;
Code:
bunzip2 glibc-2.3.4.tar.bz2
tar xf glibc-2.3.4.tar
cd glibc-2.3.4
Apply patch if necessary;
Code:
patch -Np1 -i ../glibc-2.3.4-fix_test-1.patch
Create the build dir one level higher and step into it;
Code:
mkdir -v ../glibc-build
cd ../glibc-build
Then from within the build dir run the configure command like next;
Code:
../glibc-2.3.4/configure --prefix=/tools \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
--without-gd --with-headers=/tools/include \
--without-selinux
EDIT; sorry for crosspost Seph64.
 
Old 05-06-2006, 05:24 PM   #5
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks for your responses. Unfortunately, I suppose I am biting off more than I can chew. I did finally get glibc to compile by taking your suggestion, but added another directory called "build" one up from glibc-build, and it worked.

Now, having compiled, tested, and installed, and running the specfile linker below:

Code:
root:/mnt/lfs# SPECFILE=`gcc --print-file specs` &&
> sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
>     $SPECFILE > tempspecfile &&
> mv -f tempspecfile $SPECFILE &&
> unset SPECFILE
I then run the "sanity check" commands:

Code:
lfs:/mnt/lfs$ echo 'main(){}' > dummy.
lfs:/mnt/lfs$ gcc dummy.c
lfs:/mnt/lfs$ readelf -l a.out | grep ': /tools'
and nothing happens. According to the instructions, this means somethings has gone wrong and it is not working. I don't really have the necessary knowledge to track down where I went wrong. If I can't fix it somehow and get the necessary return from these commands (Requesting Program Interpreter...), I'll just have to admit defeat on this one. I suppose I could wipre the drive and start again....but this has been alot of work already, not really keen to start again if there is any way around it.

If anyone has any suggestions, it would be very much appreciated.

Bob
 
Old 05-07-2006, 03:45 AM   #6
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Good try, I suppose

http://images.linuxquestions.org/que...s/confused.gif
Well, I will post this to see if anyone has any thoughts on what is going on, and if its to far gone to fix, I guess I will just chalk this one up to experience.

Got to the 2nd pass of Binutils, and except for some permissions errors, all seemed to be going according to the instructions. This one just might do me in on this attempt, though. Got this when I attempted "make" on the 2nd pass for binutils:

Code:
bucomm.o(.text+0x415):bucomm.c: undefined reference to `bfd_set_format'
bucomm.o(.text+0x46a):bucomm.c: undefined reference to `bfd_close_all_done'
bucomm.o(.text+0x668):bucomm.c: undefined reference to `bfd_close_all_done'
bucomm.o(.text+0x693):bucomm.c: undefined reference to `bfd_openw'
bucomm.o(.text+0x6ae):bucomm.c: undefined reference to `bfd_set_format'
bucomm.o(.text+0x726):bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x7e1):bucomm.c: undefined reference to `bfd_get_error'
bucomm.o(.text+0x9eb): In function `parse_vma':
bucomm.c: undefined reference to `bfd_scan_vma'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_i386_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_efi_app_ia32_vec'
../bfd/.libs/libbfd.so: undefined reference to `symbolsrec_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_malloc'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_little_generic_vec'
../bfd/.libs/libbfd.so: undefined reference to `i386linux_vec'
../bfd/.libs/libbfd.so: undefined reference to `srec_vec'
../bfd/.libs/libbfd.so: undefined reference to `binary_vec'
../bfd/.libs/libbfd.so: undefined reference to `ihex_vec'
../bfd/.libs/libbfd.so: undefined reference to `tekhex_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_i386_arch'
../bfd/.libs/libbfd.so: undefined reference to `trad_core_vec'
../bfd/.libs/libbfd.so: undefined reference to `bfd_elf32_big_generic_vec'
collect2: ld returned 1 exit status
make[3]: *** [size] Error 1
make[3]: Leaving directory `/mnt/lfs/binutils-build/binutils-2.15.94.0.2.2/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/lfs/binutils-build/binutils-2.15.94.0.2.2/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/mnt/lfs/binutils-build/binutils-2.15.94.0.2.2/binutils'
make: *** [all-binutils] Error 2
It looks like I have failed in a previous linking instruction.

It anyone knows what this is and if it can be fixed, I would sure appreciate the help. However, if the opinion is I should forget this attempt and maybe try again, if anyone knows where I went wrong it would help on a future attempt to do this.

Thanks

Bob
 
Old 05-07-2006, 10:25 AM   #7
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Update...progress

What a ride! Just when I think I have had it, no way I am going to be able to actually finish thing, a little progress, and, VIOLA! All the preliminary packages have compiled and been installed, with make test on all of them, which all passed.

I have reached the point of actually chrooting into the new system to install the packages directly (Chapter 6.3). Well, one more little road block to solve, but it has me stumped a little. Here it is:

Code:
chroot "$LFS" /tools/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h
And I get this:

Code:
/tools/bin/bash: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
Well, the missing library is there:

Code:
root:/mnt/lfs# locate libtermcap.so.2
/lib/libtermcap.so.2.0.8
/lib/libtermcap.so.2
I'll keep working at it, but it would sure help if anyone can tell me what is going on. I can taste success, won't give up now!

Any help appreciated.

Bob
 
  


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
my installation source directories Sharaz Linux - General 0 09-27-2005 10:48 AM
Application Installation Directories Skizzler Linux - Software 3 05-26-2005 03:32 AM
message "Problem during installation: x package needed for (installed) x package frayed2 Linux - Newbie 1 04-24-2005 07:05 PM
FC3 installation freezes at package installation tmussche Fedora - Installation 1 04-19-2005 07:56 PM
Possible to relocate RPM package to multiple directories bytaking dir input fromuser chalasaniv Linux - Software 0 10-08-2004 05:52 AM

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

All times are GMT -5. The time now is 05:54 PM.

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