[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Linux include file suckage
Has anyone else tried to figure out what kind of rigamarole is
needed for getting "require 'fcntl.ph'" working in Linux? It's
something of a nightmare due to the <EXPLETIVE DELETED> way they've
got their include files "arranged" (a term best used guardedly).
First, the INSTALL file says
cd /usr/include && h2ph *.h sys/*.h
Because they've screwed up their <sys> directory, you can't do that.
It's not at all enough. You have to do
cd /usr/include
h2ph `find . -name *.h -print`
And even that's not enough, at all. Because the "linux" and "asm"
directories are symblimked, so you have to use
cd /usr/include
h2ph `find . -follow -name *.h -print`
This still gives you this:
% perl -e 'require "sys/fcntl.ph"'
Can't locate stddef.ph in @INC (did you run h2ph?) (@INC contains: /opt/perl/lib/5.00563/i686-linux /opt/perl/lib/5.00563 /opt/perl/lib/site_perl/5.00563/i686-linux /opt/perl/lib/site_perl .) at /opt/perl/lib/site_perl/5.00563/i686-linux/bits/types.ph line 7.
Compilation failed in require at /opt/perl/lib/site_perl/5.00563/i686-linux/sys/types.ph line 6.
Compilation failed in require at /opt/perl/lib/site_perl/5.00563/i686-linux/bits/fcntl.ph line 6.
Compilation failed in require at /opt/perl/lib/site_perl/5.00563/i686-linux/fcntl.ph line 6.
Compilation failed in require at /opt/perl/lib/site_perl/5.00563/i686-linux/sys/fcntl.ph line 3.
Compilation failed in require at -e line 1.
Why? I don't rightly know. It has something to do with their nutty gcc
include bits.
% echo "#include <stddef.h>" > /tmp/foo.h
% ( strace cpp /tmp/foo.h > /dev/null ) | & grep '^open.* = [0-9]'
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/tmp/foo.h", O_RDONLY) = 3
open("/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h", O_RDONLY) = 4
I find that I have to do this to make it all work:
% perl -I /opt/perl/lib/site_perl/5.00563/i686-linux/linux -e 'require "sys/fcntl.ph"'
I'd like that to be in the default library path, so I don't have to
type all that ick.
But there's still some sys/types.h problem:
% perl -I /opt/perl/lib/site_perl/5.00563/i686-linux/linux -e 'require "sys/types.ph"'
Prototype mismatch: sub main::__NFDBITS vs () at (eval 58) line 1.
Prototype mismatch: sub main::__FD_SETSIZE vs () at (eval 59) line 1.
--tom
PS: I can't wait for next release, at which point I'll get to
reinstall absolutely everything, include millions of libraries,
since they'll need to look for things in
/opt/perl/lib/site_perl/5.00564
instead of
/opt/perl/lib/site_perl/5.00563
Upgrades: just say no, and plan a few days for them when they do
happen.
- Follow-Ups from:
-
"Matthias Urlichs" <smurf@noris.net>
Andy Dougherty <doughera@lafayette.edu>
JVromans@squirrel.nl (Johan Vromans)
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]