Re: Compile samba with krb5 (530 Views)
Reply
Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 1 of 13 (635 Views)
Accepted Solution

Compile samba with krb5

[ Edited ]

I want to compile latest samba3 with krb5.

Works fine (compile at least) with heimdal,but when i try to join ads cannot find kdc,i have tried dns enabled

and not in krb5.conf.

So i try to compile with krb5-client of hp

 

./configure   --prefix=/opt/samba   --libdir=/opt/samba/lib   --bindir=/opt/samba/bin   --sbindir=/opt/samba/sbin   --mandir=/opt/samba/man   --sysconfdir=/etc/opt/samba   --with-configdir=/etc/opt/samba   --with-piddir=/var/opt/samba/locks   --with-privatedir=/etc/opt/samba/private   --localstatedir=/var/opt/samba   --with-lockdir=/var/opt/samba/locks   --with-swatdir=/opt/samba/swat   --with-logfilebase=/var/opt/samba/log/  --enable-cups   --enable-external-libtalloc=no   --enable-static=no   --enable-shared=yes   --with-acl-support=yes   --with-automount   --with-quotas   --with-syslog   --with-utmp   --with-libsmbclient   --with-winbind   --with-ldap   --with-krb5=base-dir=/opt/krb5client   --with-ads CPPFLAGS='-I/opt/krb5client/include' LDFLAGS=' -L /opt/krb5client/lib/hpux32' 

 after make give error.

Smbd can't find libgssapi

any suggestion?

Thanks

 

 

P.S. This thread has been moved from HP-UX>System Administration to Languages and Scripting. -HP Forum Moderator

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 2 of 13 (625 Views)

Re: Compile samba with krb5

Compiling smbd/msg_idmap.c
Linking bin/smbd
ld: Can't find library for -lgssapi
Fatal error.
collect2: ld returned 1 exit status
Makefile:1781: recipe for target 'bin/smbd' failed

 The error

Acclaimed Contributor
Dennis Handly
Posts: 25,296
Registered: ‎03-06-2006
Message 3 of 13 (612 Views)

Re: Compile samba with krb5

>ld: Can't find library for -lgssapi

 

You'll need to install/build that runtime dependency, libgssapi.

 

Perhaps these may help:

http://h30499.www3.hp.com/t5/System-Administration/Secure-Shell-install-can-t-find-libgssapi-krb5-so...

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRB5CLIENT

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 4 of 13 (572 Views)

Re: Compile samba with krb5

Another error,samba3 on hpux 11.23,samba is 3.6.23


i use this configure

 

CPPFLAGS='-I/usr/local/include' LDFLAGS=' -L/usr/local/lib/ -lintl -z ignore -z lazyload' ./configure --prefix=/opt/samba3  --enable-shared=yes  --enable-static=no --with-acl-support --with-aio-support --with-pam --with-winbind --with-ads --enable-nss-wrapper --with-shared-modules=vfs_zfsacl,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex --with-readline --with-ads --with-ldap --with-automount --with-dnsupdate=no --with-krb5=/usr/local --with-privatedir=/var/opt/samba3/private --with-configdir=/etc/opt/samba3 --with-lockdir=/var/opt/samba3/locks --with-statedir=/var/opt/samba3/locks --with-cachedir=/var/opt/samba3/locks --with-piddir=/var/opt/samba3/locks --with-logfilebase=/var/opt/samba3/log

 

 

error givern

 

Compiling lib/srprs.c
In file included from lib/srprs.c:28:
lib/cbuf.h:179: error: expected declaration specifiers or ‘...’ before ‘uint32_t’
The following command failed:
)
*** Codice di uscita errore 1

Stop.

 

Acclaimed Contributor
Dennis Handly
Posts: 25,296
Registered: ‎03-06-2006
Message 5 of 13 (566 Views)

Re: Compile samba with krb5

>lib/cbuf.h:179: error: expected declaration specifiers or ‘...’ before ‘uint32_t’

 

What's around that line in that file?

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 6 of 13 (559 Views)

Re: Compile samba with krb5

./configure --prefix=/opt/samba3  --enable-shared=yes  --enable-static=no  --with-acl-support  --with-aio-support  --with-pam  --with-winbind  --enable-nss-wrapper --with-readline  --with-ads  --with-ldap  --with-automount  --with-dnsupdate=no  --with-krb5=/opt/krb5client  --with-privatedir=/var/opt/samba3/private  --with-configdir=/etc/opt/samba3  --with-lockdir=/var/opt/samba3/locks  --with-statedir=/var/opt/samba3/locks  --with-cachedir=/var/opt/samba3/locks  --with-piddir=/var/opt/samba3/locks  --with-logfilebase=/var/opt/samba3/log  ac_cv_lib_rt_fdatasync=no  ac_cv_have_fdatasync_decl=no ac_cv_lib_ext_rt_fdatasync=no CPPFLAGS='-I/opt/krb5client/include' LDFLAGS=' -L/opt/krb5client/lib -L/opt/krb5client/lib/gss'

 Samba3 hpux-11.31

same error.

 

Compiling smbd/msg_idmap.c
Linking bin/smbd
ld: Can't find library for -lgssapi

 



Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 7 of 13 (553 Views)

Re: Compile samba with krb5

On Solaris 10 someone make samba package working fine with ssl,ldap and kerberos

they use mit krb5,so i try to compile it but

 

cm.c:43: warning: no previous prototype for ‘k5_getcurtime’
        gcc -fPIC -DSHARED  -DLIBDIR=\"/opt/krb5mit/lib\" -I../../../include -I../../../include -I../../../util/profile  -DKRB5_DEPRECATED=1  -DKRB5_PRIVATE   -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -pedantic -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Werror=declaration-after-statement -Werror=variadic-macros -Werror-implicit-function-declaration -D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L -c dnsglue.c -o dnsglue.so.o && mv -f dnsglue.so.o dnsglue.so
dnsglue.c: In function ‘krb5int_dns_init’:
dnsglue.c:106: error: implicit declaration of function ‘res_init’
dnsglue.c:126: error: implicit declaration of function ‘res_search’
dnsglue.c: In function ‘krb5int_dns_expand’:
dnsglue.c:211: error: implicit declaration of function ‘dn_expand’
dnsglue.c: In function ‘krb5int_dns_nextans’:
dnsglue.c:318: warning: comparison is always false due to limited range of data type
*** Codice di uscita errore 1

Stop.

 No way?

:(

Acclaimed Contributor
Dennis Handly
Posts: 25,296
Registered: ‎03-06-2006
Message 8 of 13 (548 Views)

Re: Compile samba with krb5

[ Edited ]

>dnsglue.c:106: error: implicit declaration of function ‘res_init’

 

res_init, res_search and dn_expand are mentioned in resolver(3N) but I don't see any actual declarations in resolv.h.

They seem to be defined in libc.so.

 

So either you need to modify resolv.h to add the prototypes or remove -Werror-implicit-function-declaration from your build.

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 9 of 13 (541 Views)

Re: Compile samba with krb5

Ok,i will try it

Thanks

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 10 of 13 (537 Views)

Re: Compile samba with krb5

I have remove implicit-function-declaration
from makefile
Compile.same error
Acclaimed Contributor
Dennis Handly
Posts: 25,296
Registered: ‎03-06-2006
Message 11 of 13 (530 Views)

Re: Compile samba with krb5

>I have remove implicit-function-declaration from makefile Compile.  same error

 

What does the makefile output fragment and error look like?

I'm not sure if you need to remove -pedantic too?

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 12 of 13 (79 Views)

Re: Compile samba with krb5

Removed pedantic and Werror

 

:(

 

In file included from ../../../include/k5-int.h:182,
                 from dnsglue.h:51,
                 from dnsglue.c:30:
../../../include/k5-trace.h:93:20: warning: anonymous variadic macros were introduced in C99
dnsglue.c: In function ‘krb5int_dns_init’:
dnsglue.c:138: error: implicit declaration of function ‘res_init’
dnsglue.c:152: error: implicit declaration of function ‘res_search’
dnsglue.c: In function ‘krb5int_dns_expand’:
dnsglue.c:233: error: implicit declaration of function ‘dn_expand’
dnsglue.c: In function ‘krb5int_dns_nextans’:
dnsglue.c:340: warning: comparison is always false due to limited range of data type
*** Codice di uscita errore 1

 

Frequent Advisor
uxbeginner22
Posts: 50
Registered: ‎11-25-2013
Message 13 of 13 (21 Views)

Re: Compile samba with krb5

Whoops!

My fault: i have edited only Makefile on top src,i have to edit also Makefile on gssglue dir(os)

Compile fine with gcc and gnu make.

With hpux compiler fail.

Now i try samba...

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.