Bug 3340 - aio.h inclusion on AIX causing loader problems
Summary: aio.h inclusion on AIX causing loader problems
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.9
Hardware: Other Windows XP
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
: 3048 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-19 15:02 UTC by David Daugherty
Modified: 2006-01-09 08:59 UTC (History)
1 user (show)

See Also:


Attachments
fix for aio.h AIX lib dependency (269 bytes, patch)
2006-01-07 08:18 UTC, William Jojo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Daugherty 2005-12-19 15:02:50 UTC
AIO.H typically exists /usr/include/aio.h - but this does not mean the AIX has the kernel support or the thin wrapper to support AIO.  But including aio.h on AIX system causes the loader to look for nonexistant AIO support.

To solve this, I patched my 3.0.20b configure on a 3.0.20b around line 6120 to do the following
if test "$with_aio_support" = "yes"; then
    echo "Including aio.h header check"
    HEADERS_TO_CHECK="aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h"
else
    echo "NOT including aio.h header check"
    HEADERS_TO_CHECK="arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h"
fi
for ac_header in $HEADERS_TO_CHECK;
do
...
Comment 1 William Jojo 2006-01-07 08:18:25 UTC
Created attachment 1655 [details]
fix for aio.h AIX lib dependency

AIX supports two aio libs. legacy aio and posix aio. all the calls are through the same lib names. IBM creates functions in aio.h that wrap the posix calls. simply not loading the aio.h fixes the problem as demonstated below:

[acedev:/tmp] # cat aio.c
#include <stdio.h>
#include <aio.h>

int main () {

        printf("hi\n");

}

[acedev:/tmp] # gcc -o aio aio.c                                 
[acedev:/tmp] # ldd ./aio
./aio needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libc.a(posix_aio.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)
[acedev:/tmp] #
Comment 2 Gerald (Jerry) Carter (dead mail address) 2006-01-09 08:37:33 UTC
*** Bug 3048 has been marked as a duplicate of this bug. ***
Comment 3 Gerald (Jerry) Carter (dead mail address) 2006-01-09 08:59:04 UTC
applying to trunk and SAMBA_3_0.  Thanks Bill.