Operating System - HP-UX
1832469 Members
2594 Online
110043 Solutions
New Discussion

Samba-2.2.7a compiling LDAP support

 
support_5
Super Advisor

Samba-2.2.7a compiling LDAP support

Dear all,

I am trying to use Samba with LDAP support on my HPUX 11.00 host so I can't use the CIFS binaries.

I are having an issue with compiling samba-2.27.a (patched) on our HPUX server.

I am configuring it with these Samba option flags:

--prefix=/opt/samba
--libdir=/etc/opt/samba
--localstatedir=/var/opt/samba
--with-privatedir=/var/opt/samba/private
--with-lockdir=/var/opt/samba/locks
--with-swatdir=/opt/samba/swat
--with-acl-support
--with-msdfs
--with-ldapsam
--with-profile
-disable-static

I have gcc-3.2 installed.

I run configure OK, but get an error when running gmake:

Compiling lib/snprintf.c
lib/snprintf.c790: conflicting types for `snprintf'
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.1/include/stdio.h:493:previous declaration of `snprintf'
***Error exit code 1

I think the lines in conflict are:

gcc-3.2 stdio.h "extern int snprintf(char *, _hpux_size_t, char *,...);"

samba-2.2.7a/source/lib/snprintf.c " int snprintf(char *str,size_t count,const char *fmt,...)"

but I do not know how to resolve the issue.

I'd love to know if you have had any success with this or have any ideas.

I've put the same note on the samba lists and will copy across the solution when done to both lists.

Cheers,

Damo

2 REPLIES 2
Roberto Martinez_6
Frequent Advisor

Re: Samba-2.2.7a compiling LDAP support

Hello,

Compiling other Open Source applications I've overcome these errors re-ordering options in the configure command...It's been a try-and-error operation.
Start from scratch with less options until you find which combination make the error appear. Good Luck and be patient...
It wasn't me
support_5
Super Advisor

Re: Samba-2.2.7a compiling LDAP support

Dear all,

As promised, Here is how to get around this issue.

Use gcc-3.2 and gmake.

Comment out line 493 in:

/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.1/include/stdio.h

It will configure and compile successfully after this.

I found it useful to use the smbstart an stopsmb scripts provided by HP with CIFS as well.

Thanks to the wonderful forums and HP support.

Damian Hickey
Unix Administrator
Workcover Queensland