Bug 3731 - Problem with 3.0.23pre1 on AIX 5.1
Summary: Problem with 3.0.23pre1 on AIX 5.1
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.23
Hardware: PPC AIX
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 13:50 UTC by Mark D. McBride
Modified: 2006-06-22 15:01 UTC (History)
1 user (show)

See Also:


Attachments
fix TOC overflow for LDSHFLAGS (386 bytes, patch)
2006-05-04 15:11 UTC, William Jojo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark D. McBride 2006-04-26 13:50:15 UTC
Configured with:

env CC="gcc -D_LINUX_SOURCE_COMPAT" \
CPPFLAGS="-I/usr/local/include" \
LDFLAGS="-L/usr/local/lib -lcrypto -lssl -lsasl2" \
./configure --with-acl-support --with-utmp \
--with-ldap --with-krb5=/usr/local \
--with-libiconv=/usr/local --with-sendfile-support \
--prefix=/usr/local/samba --with-syslog --with-quotas

gcc version 3.3.2 on AIX 5.1

Error list from make.

Compiling smbd/dmapi.c
In file included from smbd/dmapi.c:48:
/usr/include/sys/dmapi.h:147: error: parse error before "timestruc_t"
make: *** [smbd/dmapi.o] Error 1

Lines in dmapi.h on AIX 5.1

/*
 * Stubs for non-supported optional interfaces
 */

extern int      dm_upgrade_right(dm_sessid_t, void *, size_t, dm_token_t);
extern int      dm_downgrade_right(dm_sessid_t, void *, size_t, dm_token_t);
extern int      dm_pending(dm_sessid_t, dm_token_t, timestruc_t *);
extern int      dm_obj_ref_hold(dm_sessid_t, dm_token_t, void *, size_t);
extern int      dm_obj_ref_rele(dm_sessid_t, dm_token_t, void *, size_t);
extern int      dm_obj_ref_query(dm_sessid_t, dm_token_t, void *, size_t);

The dm_pending is line 147

I'm not sure of this parse error, so I'm stuck.

mark
Comment 1 Tim Potter 2006-04-26 14:01:18 UTC
Yeah that looks like a typo in the system header file.  According to the open group manpage[1] for the DSM API, dm_pending() should have the prototype:

int
dm_pending(
    dm_sessid_t         sid,
    dm_token_t          token,
    dm_timestruct_t    *delay)

[1] http://www.opengroup.org/onlinepubs/9657099/chap5.htm

Is there an OS upgrade you can apply here?  I'm not sure that Samba can do much about this.
Comment 2 Mark D. McBride 2006-04-26 14:37:49 UTC
Does Samba use this function?

I changed the header file to reflect this prototype. It still complained of a parse error. I commented the function prototype out and now it is compiling past that point.

extern int      dm_upgrade_right(dm_sessid_t, void *, size_t, dm_token_t);
extern int      dm_downgrade_right(dm_sessid_t, void *, size_t, dm_token_t);
/* extern int   dm_pending(dm_sessid_t, dm_token_t, timestruc_t *); */
extern int      dm_obj_ref_hold(dm_sessid_t, dm_token_t, void *, size_t);
extern int      dm_obj_ref_rele(dm_sessid_t, dm_token_t, void *, size_t);
extern int      dm_obj_ref_query(dm_sessid_t, dm_token_t, void *, size_t);


I know this is not a recommened fix, but this is more of a debuging process.

mark
Comment 3 Mark D. McBride 2006-04-27 07:59:19 UTC
More problems.

make
Using FLAGS =  -I/usr/local/include -O -D_SAMBA_BUILD_ -I./popt -I./iniparser/src -Iinclude -I/usr/local/samba-3.0.23pre1/source/include -I/usr/local/samba-3.0.23pre1/source/tdb  -I. -I/usr/local/include -I/usr/local/include -I/usr/local/include -DLDAP_DEPRECATED -I/usr/local/samba-3.0.23pre1/source -D_SAMBA_BUILD_
      LIBS = -liconv
      LDSHFLAGS = -Wl,-G,-bexpall  -L/usr/local/lib -L/usr/local/lib -lcrypto -lssl -lsasl2 -L/usr/local/lib
      LDFLAGS = -L/usr/local/lib -L/usr/local/lib -lcrypto -lssl -lsasl2 -L/usr/local/lib
      PIE_CFLAGS =
      PIE_LDFLAGS =
Linking libsmbclient shared library bin/libsmbclient.so
ld: 0711-781 ERROR: TOC overflow. TOC size: 72664       Maximum size: 65536
collect2: ld returned 12 exit status
make: *** [bin/libsmbclient.so] Error 1
Comment 4 William Jojo 2006-05-04 15:11:45 UTC
Created attachment 1888 [details]
fix TOC overflow for LDSHFLAGS

Fix for TOC overflow when building shared modules.
Comment 5 Björn Jacke 2006-06-17 11:20:16 UTC
Marc, please don't throw different problems into on bug report, better open another one for a new problem.

Your dmapi compile problem is definetely a bug of the system header files. Please try adding

#include <sys/time.h>

before the dmapi include statement. Please try with rc1 first. If you are using 3.0.23rc2 this won't be a problem anyway, as it will try a compile at configure time and turn off dmapi if it fails.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2006-06-22 15:01:06 UTC
This is fixed in 3.0.23rc3 right?  If I'm wrong, please reopen.