Skip Menu |

This queue is for tickets about the IO-AIO CPAN distribution.

Report information
The Basics
Id: 13908
Status: resolved
Priority: 0/
Queue: IO-AIO

People
Owner: Nobody in particular
Requestors: aar [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.0
Fixed in: (no value)



Subject: Fail to load on MacOS X
Perl v5.8.1-RC3 built for darwin-thread-multi-2level on Darwin Kernel Version 7.8.0 Compiled and installed successfully from CPAN, but I get the following when loading the module: $ perl -MIO::AIO dyld: perl Undefined symbols: /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/IO/AIO/AIO.bundle undefined reference to _fdatasync expected to be defined in a dynamic image Trace/BPT trap
Date: Fri, 29 Jul 2005 03:58:23 +0200
From: Marc Lehmann <schmorp [...] schmorp.de>
To: Guest via RT <bug-IO-AIO [...] rt.cpan.org>
Subject: Re: [cpan #13908] Fail to load on MacOS X
RT-Send-Cc:
On Thu, Jul 28, 2005 at 02:29:57PM -0400, Guest via RT <bug-IO-AIO@rt.cpan.org> wrote: Show quoted text
> Perl v5.8.1-RC3 built for darwin-thread-multi-2level > on Darwin Kernel Version 7.8.0 > > Compiled and installed successfully from CPAN, but I get the following when loading the module: > > /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/IO/AIO/AIO.bundle undefined reference to _fdatasync expected to be defined in a dynamic image
If it compiles but doesn't find the function, maybe I need a special library for fdatasync? If you could find out what what library I have to link to then this could be fixed easily. Of course, it could be, just like on cygwin, that the header file is there but the call is not actually implemented - macosx is not unix, after all, and expecting posix extensions to work might be too much to aks for. Alternatively, I could add some detection mechanism, but that would mean some calls mightsimply not be available. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
[I just noticed that CPAN rt didn't get my reply.] On 28-07-2005 at 3:58, Marc Lehmann via RT wrote: Show quoted text
>If it compiles but doesn't find the function, maybe I need a special >library for fdatasync? If you could find out what what library I have >to link to then this could be fixed easily.
Hi Marc, thanks for your feedback. After a brief research it turned out that fdatasync(2) is not available on Darwin. It provides fsync(2) instead, along with sys/aio.h which provides O_SYNC. Other software use fsync(2) on MacOS X. http://www.hmug.org/man/2/fsync.php - alessandro.
[schmorp@schmorp.de - Thu Jul 28 21:58:54 2005]: Show quoted text
> If it compiles but doesn't find the function, maybe I need a special > library > for fdatasync? If you could find out what what library I have to link > to then > this could be fixed easily.
Marc, I found this article which may clarify the situation on MacOS X: http://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html - alessandro ranellucci.
[AAR - Sun Oct 30 04:30:21 2005]: Show quoted text
fsync is not a replacement (but a workaround) for fdatasync, and the article is wrong, this would be a bug in macosx. In any case, the original issue of missing fdatasync should be solved by the autodetection code in place for some time now (it will use fsync instead, which is a superste of fdatasync, so it's a performance degradation only). If the problem persist, please reopen this bug report or create a new one. Thanks for your report!
From: aar [...] cpan.org
[MLEHMANN - Mon Dec 5 19:09:49 2005]: Show quoted text
> In any case, the original issue of missing fdatasync should be solved by > the autodetection code in place for some time now (it will use fsync > instead, which is a superste of fdatasync, so it's a performance > degradation only).
Yes, it compiles now. There are some warnings though: AIO.xs:39:1: warning: "STACKSIZE" redefined In file included from /usr/include/machine/param.h:30, from /usr/include/sys/param.h:102, from /System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h:442, from AIO.xs:5: /usr/include/ppc/param.h:58:1: warning: this is the location of the previous definition Thank you Marc for the bugfix! - alessandro.