[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-lc fix for BSD/OS and FreeBSD

From: Dave MacKenzie
Subject: -lc fix for BSD/OS and FreeBSD
Date: Thu, 31 Jan 2002 22:23:23 -0500
User-agent: Mutt/1.2.5i

I was trying to run a CGI program with Apache 2.0.18 on BSDI BSD/OS 4.3,
and found that when read() on a nonblocking pipe returned -1, errno wasn't
setting set (to EAGAIN); it was 0.  So apache didn't do its timeout call
and the CGI request got a Server Error.

The problem turned out to be that when linking, libtool was adding
-lc.  Then, when was linked into httpd, -lc gets linked in again,
and there are now two copies of libc in apache's address space, each with its
own thread-safe copy of errno.

The version of libtool that came with Apache is: (GNU libtool) 1.3.4-freebsd-ports (1.385.2.196 1999/12/07 21:47:57)

However, the problem still exists in: (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18)

The latter contains this case:

            # Don't link with libc until the a.out is fixed.

That case needs to be extended to:

          *-*-netbsd* | *-*-freebsd* | *-*-bsdi4*)
            # Don't link with libc until the a.out is fixed.

The FreeBSD port of libtool adds freebsd, and as I just discovered,
BSD/OS needs the same treatment.

This problem also recently bit Steven Schultz <address@hidden> while
porting some video software from Linux to BSD/OS.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]