Bug 179835 - glibc breaks ruby headers or ruby does not work with gcc headers
glibc breaks ruby headers or ruby does not work with gcc headers
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-03 05:00 EST by Andreas Bierfert
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.8.4-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-05 23:41:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Andreas Bierfert 2006-02-03 05:00:49 EST
Here is the info from an fc4 system where everything works fine:
[10:55 AM][awjb@alkaid ~]$ rpm -qf /usr/include/unistd.h 
glibc-headers-2.3.5-10.3
[10:57 AM][awjb@alkaid ~]$ rpm -qf /usr/lib/ruby/1.8/i386-linux/intern.h
ruby-devel-1.8.4-1.fc4

[10:57 AM][awjb@alkaid ~]$ grep eaccess /usr/lib/ruby/1.8/i386-linux/intern.h
/usr/include/unistd.h 
/usr/lib/ruby/1.8/i386-linux/intern.h:int eaccess _((const char*, int));

Now on devel I get this:
[11:04 AM][awjb@alioth ~]$  rpm -qf /usr/include/unistd.h
glibc-headers-2.3.90-30
[11:04 AM][awjb@alioth ~]$ rpm -qf /usr/lib/ruby/1.8/i386-linux/intern.h
ruby-devel-1.8.4-2


[10:59 AM][awjb@alioth ~]$ grep eaccess /usr/lib/ruby/1.8/i386-linux/intern.h
/usr/include/unistd.h 
/usr/lib/ruby/1.8/i386-linux/intern.h:int eaccess _((const char*, int));
/usr/include/unistd.h:extern int eaccess (__const char *__name, int __type)
/usr/include/unistd.h:   If AT_EACCESS is set in FLAG, then use effective IDs
like `eaccess',

with eaccess in unistd.h like this:
/* An alias for `euidaccess', used by some other systems.  */
extern int eaccess (__const char *__name, int __type)
     __THROW __nonnull ((1));

and ruby being:
int eaccess _((const char*, int));

Resulting in:
make[4]: Entering directory `/builddir/build/BUILD/koffice-1.4.90/lib/kross/ruby'
/bin/sh ../../../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I../../.. -I../../../lib/kross -I/usr/lib/ruby/1.8/i386-linux
-I/usr/include/kde -I/usr/lib/qt-3.3/include -I.   -DQT_THREAD_SUPPORT 
-D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -Wformat-security -Wmissing-format-attribute
-Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common
-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
-DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -fexceptions -c -o rubyinterpreter.lo
rubyinterpreter.cpp
/usr/include/unistd.h:266: error: declaration of 'int eaccess(const char*, int)
throw ()' throws different exceptions
/usr/lib/ruby/1.8/i386-linux/intern.h:224: error: from previous declaration 'int
eaccess(const char*, int)'
make[4]: *** [rubyinterpreter.lo] Error 1
make[4]: Leaving directory `/builddir/build/BUILD/koffice-1.4.90/lib/kross/ruby'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/builddir/build/BUILD/koffice-1.4.90/lib/kross'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/builddir/build/BUILD/koffice-1.4.90/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/koffice-1.4.90'
make: *** [all] Error 2
Comment 1 Andreas Bierfert 2006-02-03 05:02:15 EST
darn should read: ...not work with glibc headers.
Comment 2 Jakub Jelinek 2006-02-03 12:27:01 EST
Ruby certainly should never redeclare prototypes defined in glibc headers.
It needs to use configure to figure out whether the prototype is provided.
Comment 3 Akira TAGOH 2006-02-05 23:41:38 EST
Fixed in ruby-1.8.4-3.

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