Subject: lib/2360: cc error in libc
To: None <gnats-bugs@NetBSD.ORG>
From: None <>
List: netbsd-bugs
Date: 04/30/1996 14:13:15
>Number:         2360
>Category:       lib
>Synopsis:       cc 2.7.2 can not compile
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 30 14:50:01 1996
>Originator:     Taras Ivanenko
>Release:        960429
System: NetBSD 1.1 NetBSD 1.1 (ctp-sun-slc-disk) #0: Wed Mar 20 22:54:14 EST 1996 sparc

	I have upgraded gcc to 2.7.2, rebuild libraries with new includes 
and new compiler and tried to rebuild compiler again. The make depend process stops at genatttr. After some inverstigation I localized the problem to fopen() call. Sometimes this call hangs, sometimes dumps core. Definitely, something is wrong with a shared library. I checked that the static library works and that the correct version of dynamic library is loaded.

This code is sufficient to demonstrate the problem: (file x.c)
#include <stdio.h>

FILE *f = fopen("x.c","r");
return 0;

cc -o x x.c; ./x

	cc -static fixes the problem