Bug 76205 - strange /usr/include/sys/unistd.h (self-referencing)
strange /usr/include/sys/unistd.h (self-referencing)
Status: CLOSED WONTFIX
Product: Red Hat Raw Hide
Classification: Retired
Component: glibc (Show other bugs)
1.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-18 00:29 EDT by Fortepianissimo
Modified: 2016-11-24 09:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-18 00:30:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fortepianissimo 2002-10-18 00:29:58 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux)

Description of problem:
Compiling openafs-1.2.7 (from openafs.org) resulted in "#include nested too deeply" error on /usr/include/sys/unistd.h. A quick check revealed the file only contains one line "#include <unistd.h>", which clearly is wrong.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
	

Actual Results:  Compiling error "#include nested too deeply" on /usr/include/sys/unistd.h.

Expected Results:  Should compile (it compiled fine with the glibc version shipped with Psyche).

Additional info:

My glibc was rebuilt using optimization flag -O6 -march=pentium3 - don't know if this makes any difference. Haven't checked if the pre-built RPM has the same unistd.h.
Comment 1 Fortepianissimo 2002-10-18 00:36:39 EDT
Well now I'm confused - I checked Psyche, and found  /usr/include/sys/unistd.h 
has the same content. How come I can rebuild openafs-1.2.7-rh8.0.1.src.rpm 
fine before? (on the original Psyche)
Comment 2 Fortepianissimo 2002-10-18 00:38:01 EDT
Here is the last 'few' lines of the error messages: 
 
cc -g -I/usr/src/redhat/BUILD/openafs-1.2.7/src/config 
-I/usr/src/redhat/BUILD/openafs-1.2.7/include -O2   -c -o vsys.o vsys.c 
cc -g -o vsys vsys.o /usr/src/redhat/BUILD/openafs-1.2.7/lib/libsys.a -g  
-lresolv 
make[3]: Leaving directory `/home/RPM-INSTALL/openafs-1.2.7/src/afsd' 
skipping deprecated target: inetd 
skipping deprecated target: rsh 
skipping deprecated target: rcp 
skipping deprecated target: ftpd43+ 
set -x; \ 
case i386_linux24 in \ 
sgi_* ) \ 
        cd src; cd sgistuff ; make all ;; \ 
rs_aix42 ) \ 
        cd src; cd tsm41 ; make all ;; \ 
alpha_dux* ) \ 
        cd src; cd sia ; make all ;; \ 
sun4x_55 ) \ 
        cd src; cd login ; make all ;; \ 
parisc_linux24) \ 
        echo Skipping pam/login for parisc_linux24 ;; \ 
sun4x_* | hp_ux11* | *linux* | *fbsd* ) \ 
        cd src; cd pam ; make all ;; \ 
ppc_darwin* | *_obsd* ) \ 
        echo Skipping login for i386_linux24 ;; \ 
* ) \ 
        cd src; cd login ; make all ;; \ 
esac 
+ cd src 
+ cd pam 
+ make all 
make[3]: Entering directory `/home/RPM-INSTALL/openafs-1.2.7/src/pam' 
cc  -I/usr/src/redhat/BUILD/openafs-1.2.7/src/config 
-I/usr/src/redhat/BUILD/openafs-1.2.7/include -I/usr/include 
-I/usr/include/sys -O2 -Dlinux -DLINUX_PAM -fPIC   -c -o test_pam.o test_pam.c 
In file included from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
       from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from /usr/include/sys/unistd.h:1, 
                 from test_pam.c:19: 
/usr/include/sys/unistd.h:1:10: #include nested too deeply 
test_pam.c:26: warning: initialization from incompatible pointer type 
test_pam.c: In function `main': 
test_pam.c:100: warning: passing arg 1 of `putenv' discards qualifiers from 
pointer target type 
test_pam.c:101: warning: passing arg 1 of `putenv' discards qualifiers from 
pointer target type 
test_pam.c:42: warning: return type of `main' is not `int' 
test_pam.c: In function `my_conv': 
test_pam.c:131: warning: passing arg 1 of `strlen' makes pointer from integer 
without a cast 
test_pam.c:131: warning: passing arg 2 of `memcpy' makes pointer from integer 
without a cast 
test_pam.c:131: warning: passing arg 1 of `__strdup' makes pointer from 
integer without a cast 
make[3]: *** [test_pam.o] Error 1 
make[3]: Leaving directory `/home/RPM-INSTALL/openafs-1.2.7/src/pam' 
make[2]: *** [login] Error 2 
make[2]: Leaving directory `/home/RPM-INSTALL/openafs-1.2.7' 
make[1]: *** [build] Error 2 
make[1]: Leaving directory `/home/RPM-INSTALL/openafs-1.2.7' 
make: *** [all_nolibafs] Error 2 
error: Bad exit status from /var/tmp/rpm-tmp.75536 (%build) 
 
 
RPM build errors: 
    Bad exit status from /var/tmp/rpm-tmp.75536 (%build) 
Comment 3 Jakub Jelinek 2002-10-18 03:40:39 EDT
/usr/include/sys/unistd.h contains #include <unistd.h> on purpose, so that
both #include <unistd.h> and #include <sys/unistd.h> has the same effect.
The bug is that openafs is screwed up, as it never should add
-I/usr/include/sys (well, it should never use -I/usr/include either, as that
should come from gcc's builtin -isystem /usr/include).
Comment 4 Fortepianissimo 2002-10-18 09:45:43 EDT
thanks for clarifying this; two final questions:  
  
1. Shouldn't it be better to have the standard #ifdef ... #endif surrounding  
#include <unistd.h> in /usr/include/sys/unistd.h? Or there might be some other 
considerations that I'm not aware of? 
 
2. Why did the versions of glibc, gcc and pam shipped with Psyche compile the 
*same* version of openafs with no problems? Is this an indication that 
a. something was broken in the old versions of the aformentioned packages; 
b. something *is* broken in the current Rawhide version of the aformentioned 
packages.
Comment 5 Fortepianissimo 2002-10-18 13:33:24 EDT
Could you move this, perhaps, to cpp? I found my own C++ code also stopped 
compiling, complaining not seeing symbols declared/defined in another header 
file (in a different directory). The *same* code compiled fine with the 
version of gcc shipped with Psyche.

Note You need to log in before you can comment on or make changes to this bug.