libc 5.3.9, POSIX, & Kernel 1.3.94

libc 5.3.9, POSIX, & Kernel 1.3.94

Post by Stephen H. Osbo » Thu, 25 Apr 1996 04:00:00



I have been working on installing libc 5.3.9.  After writing a small test
program I discovered that POSIX_VERSION returns 199309 which means that this
library is POSIX.4 complient.  So I wrote another test program to check the
kernel, this program uses the sysconf call to tell about the operation systems
options.  It (as expected) returned 199009 meaning the the kernel only speaks
POSIX.1.  I recompiled the kernel with the new libraries and it still returns
POSIX.1 complience.  

How do I tell the kernel the recompile and use the pthreads in the new libc?

Also, after the compile one of my modules now generates a BUNCH of missing
symbol errors, and after recompiling it with the new kernel and libc it still
cannot find the symbols.  Ideas?


Applied Technologies Inc.
Boulder Colorado.

 
 
 

libc 5.3.9, POSIX, & Kernel 1.3.94

Post by Ronald Wah » Fri, 26 Apr 1996 04:00:00



> I have been working on installing libc 5.3.9.  After writing a small test
> program I discovered that POSIX_VERSION returns 199309 which means that this
> library is POSIX.4 complient.  So I wrote another test program to check the
> kernel, this program uses the sysconf call to tell about the operation systems
> options.  It (as expected) returned 199009 meaning the the kernel only speaks
> POSIX.1.  I recompiled the kernel with the new libraries and it still returns
> POSIX.1 complience.  

> How do I tell the kernel the recompile and use the pthreads in the new libc?

The kernel has it's own include files and doesn't use libc.

Quote:> Also, after the compile one of my modules now generates a BUNCH of missing
> symbol errors, and after recompiling it with the new kernel and libc it still
> cannot find the symbols.  Ideas?

There should be two links in your /usr/include directory:

  asm   -> /usr/src/linux/include/asm/
  linux -> /usr/src/linux/include/linux/

ron

--

 \ WWW: http://www.tu-chemnitz.de/~row             \
  \ PGP key available by finger to my email address \

 
 
 

libc 5.3.9, POSIX, & Kernel 1.3.94

Post by Markus Ku » Sun, 28 Apr 1996 04:00:00



Quote:>I have been working on installing libc 5.3.9.  After writing a small test
>program I discovered that POSIX_VERSION returns 199309 which means that this
>library is POSIX.4 complient.

Yes. In <unistd.h> you'll find

/* POSIX Standard approved as IEEE Std 1003.1b as of September 15, 1993.  */
#define _POSIX_VERSION  199309L

Quote:>So I wrote another test program to check the kernel,

You can't check the kernel with sysconf()!

Quote:>this program uses the sysconf call to tell about the operation systems
>options.  It (as expected) returned 199009 meaning the the kernel only speaks
>POSIX.1.

This is strange. From the libc-5.3.9 source in
libc/sysdeps/linux/__sysconf.c:

    case _SC_VERSION:
      return _POSIX_VERSION;

So sysconf(_SC_VERSION) is supposed to return exactly the same Posix
version code as _POSIX_VERSION: September 1993. May be you have
compiled libc BEFORE installing the new include files such that
__sysconf.c was compiled using an old <unistd.h>???

Quote:>I recompiled the kernel with the new libraries and it still returns
>POSIX.1 complience.  

The kernel never uses libc. If you compile the kernel, it is
irrelevant, which libc version you have installed.

If you want to know in an application, which kernel system calls are
already available, you should check whether the system call returns
ENOSYS in errno. This is the most reliable test. The _POSIX and _SC
facilities only tell you about the capabilities of libc.

It would theoretically be possible to install a huge table in the
sysconf() libc implementation that knows for each kernel version,
which features are supported and which are not. But this is ugly and
requires permanent updates. Just make sure you have always installed a
recent kernel if you use a recent libc, then things will fit together
nicely.

Markus

--
Markus Kuhn, Computer Science student -- University of Erlangen,

WWW Home: <http://wwwcip.informatik.uni-erlangen.de/user/mskuhn>

 
 
 

1. kernel 1.3.94 Makefile problem

I recently compiled the version 1.3.94 kernel.  Previously I had version
1.2.1 from Slackware 2.2 distribution.  To compile it I had to upgrade my
ld.so and gcc.  I got these from the development disks of the slackware
distribution at ftp://sunsite.unc.edu/pub/Linux/distributions/slackware/
slakware/d* so that I would not have to worry about version problems between
gcc, binutils and libc.

Everything compiled fine, but the problem is that once I rebooted with
the new kernel image I could no long use make.

If for instance I typed "make dep" I got the following error:

make: *** No rule to make target 'dep'.  Stop.

If I simply type "make" I get the following error:

make: *** No targets specified and no makefile found.  Stop.

I tried renaming the file from Makefile to makefile.  When I did this it
worked but stopped when it referenced Makefiles in lower level
directories or if it was for a single directory project it stopped if it
referenced any other Makefiles.

Typing the following causes it to work for single directory projects:

sed 's/Makefile/makefile/g' Makefile > makefile

This might also work for multiple directory projects if I did that to all
of the Makefiles, but the clincher is that it would only work once and
would then give me the errors listed above on subsequent makes.

The only consistent fix was to use make -f Makefile to compile, but it is
cumbersome and only works for single directory projects.

Finally, the entire problem goes away if I restore my old kernel image.

---> Additional information.

When installing ld.so and the development packages I used pkgtool to
remove the old packages.

When I was done installing I found that gcc would not run, giving the
following error message:

gcc: can not load '/lib/libc.so.5'

I was surprised since I got all of the development tools from the
Slackware disks.  I tried making a symlink libc.so.5 -> libc.so.4.7.2.  
When that didn't work I downloaded libc-5.3.9 and installed it after
removing the libc package with pkgtool.  Then I created the symlink
libc.so.5 -> libc.so.5.3.9.  That worked, but could it possibly have had
undesirable consequences?

Thanks for any help you can give on this.

Waleed

2. How-to upgrade UDB ARCware?

3. talk & rusers Linux 1.2.13 Or 1.3.94

4. Solaris Panic when running Java

5. pppd using kernel 1.3.94

6. Morse Telecommunications - disappeared !

7. Kernel Change Summary 1.3.94

8. Epson Stylus 480 under LM 7.2 with CUPS.?

9. tar hang at 1.3.94

10. ftape with 1.3.94

11. Yggdrasil Summer 94 Plug & Play Kernel Compile?

12. Perl & kernel 1.1.94

13. utime & utimes & POSIX & portability