[pocket-linux] Libc.so.6 problems in Chapter 3: Maybe a solution

David Horton dhorton at speakeasy.net
Sun Jun 5 17:06:34 CDT 2005


Benoît Depaire wrote:
> Hi everybody, 
> 
> I've been working with the pocket linux guide for a couple of weeks
> now, and have been stuck lately at chapter 3. I got the well known
> boot problem with the c library (the shared library was not found).
> 
> I've been looking for a solution, reading the previous mails on this
> mailing list. Ofcourse, I could have just passed this problem and go
> on with chapter 4 (using the available images), but I wanted to
> understand why my approach was failing.  After quite some testing, I
> might have an idea what the problem is and decided that I know enough
> now to proceed. However, not sure if my solution will or if I found
> the real reason for the problem (I am planning to check this in the
> future), I still want to share my thoughts with the rest.
> 
> In another conversation on this topic, David Horton mentioned the
> possible problem was the fact that the used c library was build for a
> i686 and it was used on a i386 machine. However, another person (sorry
> forgot the name, and too lazy to look it up), mentioned the disks
> didn't work either on the original machine used to build the disks
> (and from which libc was taken).
> 
> However, I suspect that the problem is somewhere in the same line. I
> suspect that the library is not "found" because it was build against a
> different kernel than that used on the bootdisk. Let me tell you why I
> think so:
> 
> I created a new partition on my laptop (which i use to build the
> boot/root disks) and copied the rootdisk to this partition. Next I
> copied the vmlinuz (for i386 machine, taken from the bootdisk image
> available at the pocket linux website) to the boot directory, where
> the other kernels of this machine are located. Finally, I added a new
> entry in the lilo.conf file. When rebooting the machine, choosing to
> load the pocket linux kernel, it failed exactly the same way as on the
> machine I use the disks on. Thus, the type of machine (laptop =
> pentium M 1500mhz, other machine = desktop= pentium II 233 i believe)
> can not be the reason.
> 
> Next I changed the pocket linux kernel in my boot directory with the
> original kernel working on this laptop. Now, the booting process looks
> pretty much the same, but now the bash shell shows up. Therefore, I
> believe the problem has something to do with the kernel-libc
> combination.
> 
> Another indication is a certain parameter, that can be set during the
> compilation of glibc.
> 
> `--enable-kernel=version'
>     This option is currently only useful on Linux systems. The version
> parameter should have the form X.Y.Z and describes the smallest
> version of the Linux kernel the generated library is expected to
> support. The higher the version number is, the less compatibility code
> is added, and the faster the code gets. '
> 
> Now, you must now that I'm running a Mandrake 10.0 distro, so I can
> easily believe that my c library is optimized for my kernel and fails
> to work with older kernels, which i believe the kernel on the boot
> disk image clearly is.
> 
> To be sure this is the real cause, one should compile the gnu c
> libraries (glibc) for the older kernel and see if that works. However,
> because compiling the gnu c libraries for another system than the host
> system, seems rather complicated, I postpone this thill after the
> pocket linux experience :).
> 
> Finally I would like to mention that the program library how-to on the
> linux documentation project was a great help in understanding how the
> libraries work. I could recommend this reading to anybody who wants to
> know how linux finds the shared libraries.
> 
> Cheers,
> Benoît
> 
> PS: An idea i had lately, maybe interesting as addition to the pocket
> linux guide. Maybe it's possible to use the gmailfs (gmail account as
> file system) together with pocket linux
> 
> _______________________________________________
> Pocket-Linux mailing list
> Pocket-Linux at ufo.chicago.il.us
> http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux


I think your advice about kernel-libc versions is very good.  The
"--enable-kernel=version" may very well be the key.  It seems logical
that distro makers might choose speed over compatibility when compiling
glibc.

By the way, what version of kernel source are you using compared to the
kernel supplied with Mandrake?  Are they drasticly different?  For
example, 2.4 vs. 2.6 or is it just a minor difference?

Dave




More information about the Pocket-Linux mailing list