[pocket-linux] Compiling glibc

David Horton dhorton at speakeasy.net
Tue Jul 27 08:47:04 CDT 2004


> -----Original Message-----
> From: Bettes [mailto:bettes at freegates.be]
> Sent: Tuesday, July 27, 2004 01:04 PM
> To: 'Support for Pocket Linux Guide'
> Subject: Re: [pocket-linux] Compiling glibc
> 
> On Monday 26 July 2004 22:25, David Horton wrote:
> > > -----Original Message-----
> > > From: Bettes [mailto:bettes at freegates.be]
> > > Sent: Monday, July 26, 2004 06:38 PM
> > > To: pocket-linux at ufo.chicago.il.us
> > > Subject: [pocket-linux] Compiling glibc
> > >
> > > Hi,
> > >
> > > I was able to compile the glibc sources. However, the compiled libraries
> > > are not working on my P I 75 Mhz. ( I am Building it on a Athlon 1Hhz
> > > using a SuSE 8.2 distro)
> > >
> > > When I try
> > > $  ldd libc.so.6
> > >
> > > I got the message
> > > $  /usr/bin/ldd: line 1: ./libc.so.6: No such file or directory
> > >
> > > which I find very strange.
> > > I do not have this message on precompiled libraries from David Hortons
> > > site
> > >
> > > When I use these libraries for pocket linux in chapter 8 I get
> > >
> > > > Freeing unused kernel memory: 248k freed
> > > > /sbin/ini: error while loading shared libraries: libc.so.6: cannot open
> > > > shared object file: No such file or directory
> > > > Kernel panic: Attempted to kill init!
> > >
> > > I have compiled glibc with the line
> > > $  export CC="gcc -mcpu=i386"
> > > $
> > > $  ./glibc-2.3.2/configure --enable-add-ons --host=i386-pc-linux-gnu
> > > $  --prefix=/home/bettes/Documents/
> > >
> > > I checked this with the way David Horton compiles using the architect
> > > scripts. ....
> > > # Configure the package for FHS compliance and i386 processor.
> > > export CC="gcc -mcpu=i386"
> > > cd $BUILD_DIR
> > > $SRC_DIR/configure \
> > >   --enable-add-ons \
> > >   --host=i386-pc-linux-gnu \
> > >   --infodir=/usr/share/info \
> > >   --libexec=/usr/lib/glibc \
> > >   --prefix=/usr \
> > > ...
> > >
> > > ANy idea what I am doing wrong?
> >
> > The problem may be with the --prefix=/home/bettes/Documents/.  I understand
> > what you are trying to do here.  You want the library to install into
> > /home/bettes/Documents rather than overwritting your existing libraries. 
> > You can get better control over the installation location by using the
> > 'install_root' Makefile variable.  Look at the following section of the
> > recipe:
> >
> > # Install into staging area overriding make variables as needed.
> > make \
> >   install_root=$STAGING_DIR \
> >   install
> >
> > Just change $STAGING_DIR to /home/bettes/Documents.  This should install it
> > in the right place and perhaps solve the 'shared library not found' errors.
> >
> > Good Luck,
> > Dave
> >
> >
> >
> >
> > _______________________________________________
> > Pocket-Linux mailing list
> > Pocket-Linux at ufo.chicago.il.us
> > http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux
> 
> Hi David,
> 
> I don't see the reason why, but changing the prefix option to /usr did the 
> trick. Now the libraries are working.
> 
> Thanks for the support
> Bettes
> 


I think that the --prefix value may be compiled into ld-linux.so (the dynamic loader) somehow so that it affects where it looks for libraries.  With --prefix=/usr, ld-linux.so looks in /lib and /usr/lib for any libraries it needs.  With --prefix=/home/bettes/Documents ld-linux.so may get confused and look in /home/bettes/Documents/lib or something like that.  Anyway, I'm glad to hear that it is working for you now.

Dave






More information about the Pocket-Linux mailing list