After wrecking my system by doing some updates, I was forced to use revdep-rebuild again. So I went to bed for letting the PC work as it wouldn’t need me for compiling. The next morning I woke up and went to the screen and noticed an error message. Samba bailed out:
Compiling smbd/oplock_irix.c
Compiling smbd/oplock_linux.c
smbd/oplock_linux.c:38: error: conflicting types for ‘capget’
/usr/include/sys/capability.h:111: error: previous declaration of ‘capget’
was here
smbd/oplock_linux.c:40: error: conflicting types for ‘capset’
/usr/include/sys/capability.h:110: error: previous declaration of ‘capset’
was here
The following command failed:
gcc -I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source -march=native
-O2 -fomit-frame-pointer -pipe -D_SAMBA_BUILD_=3
-I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source/iniparser/src
-Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include
-I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-I/var/tmp/portage/net-fs/samba-3.0.28/work/samba-3.0.28/source/lib
-D_SAMBA_BUILD_=3 -fPIC -c smbd/oplock_linux.c -o smbd/oplock_linux.o
make: *** [smbd/oplock_linux.o] Error 1
Great, huh? Another night wasted. But why the hell doesn’t it build anymore? As I am doing a revdep-rebuild, it has been built before. Successfully. So let’s think back what broke my system. Updates.
One dependency (or more) has broken the packet. Regarding the error message it’s got to be libpcap, which was recently updated. So I got me some coffee and decided to do some useless brainjogging in the morning and opened the sourcecode file of samba, where I assumed the bug: smbd/oplock_linux.c
If I got it right, the error message wants to tell me, that the declaration of capset was done twice. Reading through the source code I have found the following passage:
struct cap_user_data {...}
extern int capget(struct cap_user_header * hdrp,
struct cap_user_data * datap);
extern int capset(struct cap_user_header * hdrp,
const struct cap_user_data * datap);static SIG_ATOMIC_T signals_received
Aren’t that some declarations of capset and capget we’re looking at? I guess by now I have said something equivalent to the word ‘fuck’ about a hundred times while reading the code.
As I am compiling in the gentoo sandbox, I might risk a shot by killing those declarations. It won’t kill me. So I removed them and recompiled…. successfully. Now that problem is history.