problem compiling libc

problem compiling libc

Post by Mathias Koerb » Sat, 27 Jan 1996 04:00:00



[ Article reposted from comp.os.linux.misc ]
[ Author was Mathias Koerber ]
[ Posted on 24 Jan 1996 02:59:38 GMT ]

Hi all,

I am trying to recompile libc to fic the PZERO bug (should be 20, is 15)

I got gcc-2.7.2 plus the new binutils and ld.so and the binary distribution
of libc.5.2.16 and installed those. Then I got the libc.5.2.16 source
and installed it under /usr/src (resulting in two subdirs libc and include)

I can configure:

        More than one Linux targets found:
                i486-linux i486-linuxaout
        "i486-linux" is chosen.

        *******Current defaults********

        Build i486-linux library for i586 running linux
        Build targets are static, shared, debug and profile libraries.
        Root path to i486-linux related files is /usr
        Bin path to gcc is /usr/bin
        The version of gcc to be used is 2.7.2
        Build option is fast build.
        GNU `make' executable is make
        Root path to installation dirs is /

        Values correct (y/n) [y] ?

but when I run make:

dnssec2:/usr/src/libc# make
set -e; for i in assert bsd cvt ctype des dirent grp inet io libbsd libio locale login math misc mntent netgroup posix pwd r
egex rpc setjmp signal stdlib string sysdeps time ufc malloc malloc-930716 yp nls gcc elf; do \
        echo making lib in $i; \
        make -C $i lib; \
done
making lib in assert
make[1]: Entering directory `/usr/src/libc/assert'
/usr/bin/gcc -V 2.7.2 -b i486-linux -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -O1 -funroll-loops -I../sysdep
s/linux -I../libio -I../libio/stdio -DNLS -I../nls  -DYP -DNO_SHADOW  -D_GNU_SOURCE -DSTDC_HEADERS -DUSG -DDIRENT -DSYSV -DU
SE_BSD_REGEX -D_LIBC -DINTERNAL_LINUX_C_LIB  -Wall -Wstrict-prototypes -Wmissing-prototypes -funsigned-char -I../internal -n
ostdinc -I../../include -I`/usr/bin/gcc -V 2.7.2 -b i486-linux -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -pr
int-libgcc-file-name | sed -e 's/libgcc.a/include/'` -D_POSIX_THREAD_SAFE_FUNCTIONS -D_POSIX_THREADS -D_MIT_POSIX_THREADS -c
 assert.c -o ../elfstatic/libc/assert.o
In file included from ../../include/stdlib.h:42,
                 from assert.c:22:
../../include/errno.h:27: linux/errno.h: No such file or directory
make[1]: *** [../elfstatic/libc/assert.o] Error 1
make[1]: Leaving directory `/usr/src/libc/assert'
make: *** [lib] Error 2
dnssec2:/usr/src/libc#

Hmm. check some files:

ls -l /usr/include/linux/errno.h
-rw-r--r--   1 root     root          305 Aug 15 21:25 /usr/include/linux/errno.h
dnssec2:/usr/src/libc# ls -l /usr/include/linux
lrwxrwxrwx   1 root     root           28 Dec 23 18:09 /usr/include/linux -> /usr/src/linux/include/linux
dnssec2:/usr/src/libc# ls -l /usr/include/asm
lrwxrwxrwx   1 root     root           26 Dec 23 18:09 /usr/include/asm -> /usr/src/linux/include/asm
dnssec2:/usr/src/libc# ls -l /usr/src/linux
lrwxrwxrwx   1 root     root           21 Jan 24 09:50 /usr/src/linux -> /usr/src/linux-1.3.49
dnssec2:/usr/src/libc# ls -l /usr/src/include/errno.h
-rw-r--r--   1 root     root         1514 Jun  1  1995 /usr/src/include/errno.h
dnssec2:/usr/src/libc#

What am i missing??

Any help appreciated.

PS: I heard that 5.2.18 is out, but I can't find it also :-(

--


Q'town Tel. Exch. | PGP: Keyid: 768/25E082BD
2 Stirling Rd     |      1A 8B FC D4 93 F1 9A FC BD 98 A3 1A 0E 73 01 65
S'pore 148943     | Disclaimer: I speak only for myself
* Eifersucht ist eine Leidenschaft, die mit Eifer sucht, was Leiden schafft *

--


Q'town Tel. Exch. | PGP: Keyid: 768/25E082BD
2 Stirling Rd     |      1A 8B FC D4 93 F1 9A FC BD 98 A3 1A 0E 73 01 65
S'pore 148943     | Disclaimer: I speak only for myself
* Eifersucht ist eine Leidenschaft, die mit Eifer sucht, was Leiden schafft *

 
 
 

problem compiling libc

Post by H J » Tue, 30 Jan 1996 04:00:00


: [ Article reposted from comp.os.linux.misc ]
: [ Author was Mathias Koerber ]
: [ Posted on 24 Jan 1996 02:59:38 GMT ]

: Hi all,

: I am trying to recompile libc to fic the PZERO bug (should be 20, is 15)

: I got gcc-2.7.2 plus the new binutils and ld.so and the binary distribution
: of libc.5.2.16 and installed those. Then I got the libc.5.2.16 source
: and installed it under /usr/src (resulting in two subdirs libc and include)

libc 5.2.18 is current and you need to make symlinks for
asm and linux in /usr/src/include just like what you did
for /usr/include.

Sorry for that.

H.J.

 
 
 

problem compiling libc

Post by Peter Himml » Wed, 31 Jan 1996 04:00:00



> [ Article reposted from comp.os.linux.misc ]
> [ Author was Mathias Koerber ]
> [ Posted on 24 Jan 1996 02:59:38 GMT ]

> Hi all,

> I am trying to recompile libc to fic the PZERO bug (should be 20, is 15)

> I got gcc-2.7.2 plus the new binutils and ld.so and the binary distribution
> of libc.5.2.16 and installed those. Then I got the libc.5.2.16 source
> and installed it under /usr/src (resulting in two subdirs libc and include)

> ....

> Hmm. check some files:

> ls -l /usr/include/linux/errno.h
> -rw-r--r--   1 root     root          305 Aug 15 21:25 /usr/include/linux/errno.h
> dnssec2:/usr/src/libc# ls -l /usr/include/linux
> lrwxrwxrwx   1 root     root           28 Dec 23 18:09 /usr/include/linux -> /usr/src/linux/include/linux
> dnssec2:/usr/src/libc# ls -l /usr/include/asm
> lrwxrwxrwx   1 root     root           26 Dec 23 18:09 /usr/include/asm -> /usr/src/linux/include/asm
> dnssec2:/usr/src/libc# ls -l /usr/src/linux
> lrwxrwxrwx   1 root     root           21 Jan 24 09:50 /usr/src/linux -> /usr/src/linux-1.3.49
> dnssec2:/usr/src/libc# ls -l /usr/src/include/errno.h
> -rw-r--r--   1 root     root         1514 Jun  1  1995 /usr/src/include/errno.h
> dnssec2:/usr/src/libc#

> What am i missing??

> Any help appreciated.

The library build takes the include files from
/usr/src/include/... :-) (RTFM)

You have to make two symbolic links before you can make the library.

$ ln -sf /usr/include/linux /usr/src/include/linux
$ ln -sf /usr/include/asm /usr/src/include/asm

 Peter

--
 -----------------------------------
 |  Peter Himmler                  |

 -----------------------------------

 
 
 

1. Problems compiling libc

When compiling the pthreads package that comes with libc (the fd_kern.c
file that fails because msg_accrights etc. is missing), you need fix the
definition of msghdr in linux/socket.h and the compat.h in the pthreads
directory.

The msghdr in these two files have the same fields, but they are defined
with different names in the two files. My solution (which is one of many
until the naming problem gets resolved) was to change the definition of
linux/socket.h as follows:

#ifndef _MIT_POSIX_THREADS
struct msghdr
{
        void    *       msg_name;       /* Socket name                
*/
        int             msg_namelen;    /* Length of name              
*/
        struct iovec *  msg_iov;        /* Data blocks                
*/
        int             msg_iovlen;     /* Number of blocks            
*/
        void    *       msg_control;    /* Per protocol magic (eg BSD
file descrip
tor passing) */
        int             msg_controllen; /* Length of rights list */
        int             msg_flags;      /* 4.4 BSD item we dont use    
*/
#else
struct msghdr
{
  caddr_t       msg_name;       /* Socket name                  */
  int           msg_namelen;    /* Length of name               */
  struct iovec *        msg_iov;        /* Data blocks                
*/
  int           msg_iovlen;     /* Number of blocks             */
  caddr_t       msg_accrights;  /* Per protocol magic (eg BSD file
descriptor pass
ing) */
  int           msg_accrightslen;       /* Length of rights list */
  int           msg_flags;      /* 4.4 BSD item we dont use      */
#endif

Then the pthreads package will compile and work (although it will issue
A LOT of warnings)..

Good luck!

Marius

2. Graphics editor.

3. problems compiling libc

4. compiling X11R6

5. Problem compiling libc - pthreads

6. SoundBlaster CD-ROM

7. Problem compiling libc 5.0.9: section attributes not supported.

8. best linux CD-set?

9. Problem compiling libc-5.4.38

10. problem compiling libc 4.5.26

11. Include file problem compiling libc 5.3.12

12. Problem Compiling libc 5.3.9 with GCC 2.7.0

13. problem compiling libc