Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269430 - dev-lang/perl-5.8.8-r6 breaks autotools (on platforms without chdir?)
Summary: dev-lang/perl-5.8.8-r6 breaks autotools (on platforms without chdir?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Other
: High blocker (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 281550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-11 16:51 UTC by Stuart Shelton
Modified: 2009-09-28 15:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2009-05-11 16:51:06 UTC
With dev-lang/perl-5.8.8-r6, autotools and any builds using autotools fail with errors similar to:

The dirfd function is unimplemented at /opt/portage/usr/lib/perl5/5.8.8/File/Path.pm line 224.
END failed--call queue aborted.

... however the same builds succeed if perl is downgraded to 5.8.8-r5.

I've tried building perl-5.8.8-r6 with all of the changes I made to the ebuild for 5.8.8-r5, and the same behaviour remains.

I notice, however, that there are several patches in the 5.8.8-r5 ebuild which are commented-out in the 5.8.8-r6 ebuild - is it one of these which was fixing this problem, and is now no longer being included?

In any case, perl-5.8.8-r6 is significantly broken on IRIX :(
Comment 1 Fabian Groffen gentoo-dev 2009-05-11 17:14:47 UTC
this might also be the source of problems on x64-solaris then...
Comment 2 Fabian Groffen gentoo-dev 2009-05-19 20:02:41 UTC
we did some wild retreat on this one, -r5 is back now.
Comment 3 Fabian Groffen gentoo-dev 2009-05-28 20:54:43 UTC
reopening.  perl-5.8.8-r6 breaks this way at least on solaris this way also.

The only diff I see between -r5 and -r6 is the CAN rmtree patch, which is changing some perl implemented code (afaict), so if that's the source, it must be in what it calls that eventually gets to the C-level ... brrr...
Comment 4 Fabian Groffen gentoo-dev 2009-08-15 08:23:52 UTC
*** Bug 281550 has been marked as a duplicate of this bug. ***
Comment 5 Fabian Groffen gentoo-dev 2009-08-15 08:24:47 UTC
it seems to me it's the fix_file_path_chdir patch
Comment 6 Fabian Groffen gentoo-dev 2009-08-15 09:39:21 UTC
scratch that, the CAN thing is hell.
Comment 7 Stuart Shelton 2009-08-16 15:26:49 UTC
Sounds like you're way ahead of me here, but I thought that I'd just quickly note that IRIX does have chdir() and fchdir() in <unistd.h>.
Comment 8 Fabian Groffen gentoo-dev 2009-08-17 09:01:52 UTC
it's somehow that the CAN patch is triggering a case where the implementation of chdir ".." in perl triggers the use of dirfd, which is not implemented on Solaris and IRIX.  (There are workarounds for that, and configure seems to check for its existence, but apparently that's not enough...)
Comment 9 Stuart Shelton 2009-08-17 11:55:09 UTC
... it's worth noting that dirfd() does exist on IRIX, defined in <sys/dir.h> (which the man page states implements the 4.3BSD version of the routine).

The function prototype is:

     int dirfd(DIR *dirp)

     dirfd returns the integer file descriptor associated with the named
     directory stream, see open(2).
Comment 10 Stuart Shelton 2009-08-17 11:58:40 UTC
Ah - but Linux has dirfd() in <dirent.h>, whilst the IRIX manpages specifically say:

     The inclusion of <sys/dir.h> selects the 4.3BSD versions of these
     routines.  For the System V versions, include <dirent.h>.

IRIX' <dirent.h> does not define dirfd().

A simple fix for IRIX, then, may be to #include <sys/dir.h> in preference to <dirent.h>...
Comment 11 Michael Haubenwallner (RETIRED) gentoo-dev 2009-09-28 13:35:37 UTC
(In reply to comment #8)
> it's somehow that the CAN patch is triggering a case where the implementation
> of chdir ".." in perl triggers the use of dirfd, which is not implemented on
> Solaris and IRIX.

Same on HP-UX.

Trouble here is that the CAN patch calls chdir with a handle returned from opendir ".", which triggers the use of dirfd within chdir.
Comment 12 Michael Haubenwallner (RETIRED) gentoo-dev 2009-09-28 13:39:40 UTC
Using getcwd instead of opendir "." works, will commit a revbump soon.
Comment 13 Fabian Groffen gentoo-dev 2009-09-28 15:06:36 UTC
I thought we masked it, so we don't need a rev-bump, IMO.  Unless it was only for Solaris/IRIX...
Comment 14 Michael Haubenwallner (RETIRED) gentoo-dev 2009-09-28 15:42:52 UTC
Didn't recognize it was masked for Solaris and Irix.

Ok, as I'm (nearly?) the only AIX and HP-UX user, there's indeed no real need for a bump then.
Comment 15 Michael Haubenwallner (RETIRED) gentoo-dev 2009-09-28 15:49:02 UTC
Fixed in r51693, Solaris and Irix mask dropped.