[Samba] Compiling Samba 3.0.37 --with-afs (Steve Linehan)

Alex Domoradov alex.hha at gmail.com
Tue Jun 1 04:16:49 MDT 2010


> I do not know how to proceed.  I tried to comment out the line in the spec
file to no avail.
this is bad idea ;)

> Any suggestions?

OpenAFS is not supplied directly by CentOS/RHEL. You would have had to get
it from a 3rd party repo such as ATrpms/DAG or install from
http://openafs.org/release/1.4.12/index-rhel5.html

# cd /tmp/
# wget http://samba.org/samba/ftp/stable/samba-3.4.8.tar.gz
# tar -zxvf samba-3.4.8.tar.gz
# cd samba-3.4.8/packaging/RHEL

Edit samba.spec (add --with-afs and --with-fake-kaserver) and then execute

# sh makerpms.sh

But I can't compile with afs support on CentOS box :( I have the following
error

...
...
...
checking whether to use AFS clear-text auth... yes
checking whether to use AFS fake-kaserver... yes
checking for DES_pcbc_encrypt in -lcrypto... yes
checking for /usr/include/afs... yes
checking afs.h usability... no
checking afs.h presence... no
checking for afs.h... no
checking afs/afs.h usability... no
checking afs/afs.h presence... yes
configure: WARNING: afs/afs.h: present but cannot be compiled
configure: WARNING: afs/afs.h:     check for missing prerequisite headers?
configure: WARNING: afs/afs.h: see the Autoconf documentation
configure: WARNING: afs/afs.h:     section "Present But Cannot Be Compiled"
configure: WARNING: afs/afs.h: proceeding with the preprocessor's result
configure: WARNING: afs/afs.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ---------------------------------------- ##
configure: WARNING:     ## Report this to samba-technical at samba.org ##
configure: WARNING:     ## ---------------------------------------- ##
checking for afs/afs.h... yes
....
...
...
Compiling auth/pass_check.c
In file included from /usr/include/afs/kautils.h:35,
                 from auth/pass_check.c:89:
/usr/include/rx/xdr.h:155: error: nested redefinition of ‘enum xdr_op’
/usr/include/rx/xdr.h:155: error: redeclaration of ‘enum xdr_op’
/usr/include/rx/xdr.h:156: error: redeclaration of enumerator ‘XDR_ENCODE’
/usr/include/rpc/xdr.h:84: error: previous definition of ‘XDR_ENCODE’ was
here
/usr/include/rx/xdr.h:157: error: redeclaration of enumerator ‘XDR_DECODE’
/usr/include/rpc/xdr.h:85: error: previous definition of ‘XDR_DECODE’ was
here
/usr/include/rx/xdr.h:159: error: redeclaration of enumerator ‘XDR_FREE’
/usr/include/rpc/xdr.h:87: error: previous definition of ‘XDR_FREE’ was here
/usr/include/rx/xdr.h:179: error: conflicting types for ‘xdrproc_t’
/usr/include/rpc/xdr.h:154: error: previous declaration of ‘xdrproc_t’ was
here
/usr/include/rx/xdr.h:194: error: redefinition of ‘struct xdr_ops’
/usr/include/rx/xdr.h:223: error: conflicting types for ‘XDR’
/usr/include/rpc/xdr.h:111: error: previous declaration of ‘XDR’ was here
/usr/include/rx/xdr.h:299: error: redefinition of ‘struct xdr_discrim’
In file included from /usr/include/rx/xdr.h:334,
                 from /usr/include/afs/kautils.h:35,
                 from auth/pass_check.c:89:
/usr/include/rx/xdr_prototypes.h:36: error: conflicting types for
‘xdr_array’
/usr/include/rpc/xdr.h:312: error: previous declaration of ‘xdr_array’ was
here
/usr/include/rx/xdr_prototypes.h:44: error: conflicting types for ‘xdr_long’
/usr/include/rpc/xdr.h:292: error: previous declaration of ‘xdr_long’ was
here
/usr/include/rx/xdr_prototypes.h:45: error: conflicting types for
‘xdr_u_long’
/usr/include/rpc/xdr.h:293: error: previous declaration of ‘xdr_u_long’ was
here
/usr/include/rx/xdr_prototypes.h:46: error: conflicting types for ‘xdr_int’
/usr/include/rpc/xdr.h:290: error: previous declaration of ‘xdr_int’ was
here
/usr/include/rx/xdr_prototypes.h:47: error: conflicting types for
‘xdr_u_int’
/usr/include/rpc/xdr.h:291: error: previous declaration of ‘xdr_u_int’ was
here
/usr/include/rx/xdr_prototypes.h:48: error: conflicting types for ‘xdr_char’
/usr/include/rpc/xdr.h:320: error: previous declaration of ‘xdr_char’ was
here
/usr/include/rx/xdr_prototypes.h:49: error: conflicting types for
‘xdr_u_char’
/usr/include/rpc/xdr.h:321: error: previous declaration of ‘xdr_u_char’ was
here
/usr/include/rx/xdr_prototypes.h:50: error: conflicting types for
‘xdr_short’
/usr/include/rpc/xdr.h:288: error: previous declaration of ‘xdr_short’ was
here
/usr/include/rx/xdr_prototypes.h:51: error: conflicting types for
‘xdr_u_short’
/usr/include/rpc/xdr.h:289: error: previous declaration of ‘xdr_u_short’ was
here
/usr/include/rx/xdr_prototypes.h:52: error: conflicting types for ‘xdr_bool’
/usr/include/rpc/xdr.h:308: error: previous declaration of ‘xdr_bool’ was
here
/usr/include/rx/xdr_prototypes.h:53: error: conflicting types for ‘xdr_enum’
/usr/include/rpc/xdr.h:309: error: previous declaration of ‘xdr_enum’ was
here
/usr/include/rx/xdr_prototypes.h:54: error: conflicting types for
‘xdr_opaque’
/usr/include/rpc/xdr.h:315: error: previous declaration of ‘xdr_opaque’ was
here
/usr/include/rx/xdr_prototypes.h:56: error: conflicting types for
‘xdr_bytes’
/usr/include/rpc/xdr.h:314: error: previous declaration of ‘xdr_bytes’ was
here
/usr/include/rx/xdr_prototypes.h:58: error: conflicting types for
‘xdr_union’
/usr/include/rpc/xdr.h:319: error: previous declaration of ‘xdr_union’ was
here
/usr/include/rx/xdr_prototypes.h:59: error: conflicting types for
‘xdr_string’
/usr/include/rpc/xdr.h:316: error: previous declaration of ‘xdr_string’ was
here
/usr/include/rx/xdr_prototypes.h:60: error: conflicting types for
‘xdr_wrapstring’
/usr/include/rpc/xdr.h:330: error: previous declaration of ‘xdr_wrapstring’
was here
/usr/include/rx/xdr_prototypes.h:64: error: conflicting types for
‘xdr_float’
/usr/include/rpc/xdr.h:324: error: previous declaration of ‘xdr_float’ was
here
/usr/include/rx/xdr_prototypes.h:65: error: conflicting types for
‘xdr_double’
/usr/include/rpc/xdr.h:325: error: previous declaration of ‘xdr_double’ was
here
/usr/include/rx/xdr_prototypes.h:69: error: conflicting types for
‘xdrmem_create’
/usr/include/rpc/xdr.h:353: error: previous declaration of ‘xdrmem_create’
was here
/usr/include/rx/xdr_prototypes.h:78: error: conflicting types for
‘xdrrec_create’
/usr/include/rpc/xdr.h:363: error: previous declaration of ‘xdrrec_create’
was here
/usr/include/rx/xdr_prototypes.h:79: error: conflicting types for
‘xdrrec_skiprecord’
/usr/include/rpc/xdr.h:369: error: previous declaration of
‘xdrrec_skiprecord’ was here
/usr/include/rx/xdr_prototypes.h:80: error: conflicting types for
‘xdrrec_eof’
/usr/include/rpc/xdr.h:372: error: previous declaration of ‘xdrrec_eof’ was
here
/usr/include/rx/xdr_prototypes.h:81: error: conflicting types for
‘xdrrec_endofrecord’
/usr/include/rpc/xdr.h:366: error: previous declaration of
‘xdrrec_endofrecord’ was here
/usr/include/rx/xdr_prototypes.h:92: error: conflicting types for
‘xdr_pointer’
/usr/include/rpc/xdr.h:329: error: previous declaration of ‘xdr_pointer’ was
here
/usr/include/rx/xdr_prototypes.h:95: error: conflicting types for
‘xdr_vector’
/usr/include/rpc/xdr.h:323: error: previous declaration of ‘xdr_vector’ was
here
auth/pass_check.c: In function ‘afs_auth’:
auth/pass_check.c:108: warning: passing argument 7 of
‘ka_UserAuthenticateGeneral’ from incompatible pointer type
The following command failed:
gcc -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
-D_GNU_SOURCE -I. -I/usr/src/redhat/BUILD/samba-3.4.8/source3
-I/usr/src/redhat/BUILD/samba-3.4.8/source3/iniparser/src -Iinclude
-I./include  -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent
-I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude
-I./include -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent
-I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -I./../lib/popt
-DLDAP_DEPRECATED  -I/usr/src/redhat/BUILD/samba-3.4.8/source3/lib -I..
-I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -c auth/pass_check.c
-o auth/pass_check.o
make: *** [auth/pass_check.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.6296 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.6296 (%build)
makerpms.sh: Done.

# uname -a
Linux pdc.w3.lan 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:37:14 EDT 2010
i686 athlon i386 GNU/Linux

# cat /etc/redhat-release
CentOS release 5.4 (Final)

# rpm -qa | grep afs
openafs-devel-1.4.12-el5.1.1


More information about the samba mailing list