net-fs/samba-3.0.1 fails to compile. The problem seems to be at quotas.c. Please see my upcoming portage log attachment. Portage 2.0.49-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.6.0) ================================================================= System uname: 2.6.0 i686 AMD Athlon(TM) XP 1800+ distcc 2.11 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.2 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -funroll-loops -fprefetch-loop -arrays -pipe -mmmx -msse -m3dnow -mfpmath=sse,387" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi g /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/co nfig" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -funroll-loops -fprefetch-lo op-arrays -pipe -mmmx -msse -m3dnow -mfpmath=sse,387" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox autoaddcvs buildpkg ccache notitles" GENTOO_MIRRORS="http://gentoo.noved.org/ http://mirrors.tds.net/gentoo http://cu dlug.cudenver.edu/gentoo/ http://mirror.tucdemonic.org/gentoo/ http://www.gtlib. cc.gatech.edu/pub/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups foomaticdb gif jpeg libg++ libwww mad mikmod mpe g ncurses nls png quicktime spell xml2 xv zlib alsa gdbm berkdb slang readline a alib svga java sdl tcpd pam ssl python imlib qt motif opengl mozilla ldap X gtk gtk2 gpm gnome 3dnow cdr dv encode kde mmx oggvorbis pdflib perl sse tiff truety pe xmms -arts -esd -ipv6"
Created attachment 22497 [details] portage log
In the portage log, I see this: configure: WARNING: linux/quota.h: present but cannot be compiled configure: WARNING: linux/quota.h: check for missing prerequisite headers? configure: WARNING: linux/quota.h: proceeding with the preprocessor's result configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to bug-autoconf@gnu.org. ## configure: WARNING: ## ------------------------------------ ## I realized that i had forgotten to change my /usr/src/linux symlink away from linux-2.6.0 , back to linux-2.4.23, recitfied this, and tried again. This did not solve the problem. Attaching new log.
Created attachment 22499 [details] portage log (using /usr/src/linux-2.4.23 instead of /usr/src/linux-2.6.0)
The warning about linux/quotas.h is in the second log, as well.
I have this problem as well.
same problem here as well
o/
same problem here running 2.6 on amd64
I have the same Problem as well. I searched a bit if this is problem is known anywhere and found this mail: http://article.gmane.org/gmane.network.samba.internals/11457 According to this mail it seems that the problem may come from possible differences between the kernel headers and the functions actually provided by the kernel. Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 2.4.22-gentoo-r1) ================================================================= System uname: 2.4.22-gentoo-r1 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=pentium3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -mcpu=pentium3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apm arts avi berkdb crypt cups curl dga directfb doc dvd emacs encode fbcon foomaticdb gd gdbm ggi gif gnome gphoto2 gpm gtk gtk2 gtkhtml imap imlib java jikes jpeg kde libg++ libwww lirc mad maildir matroska mbox mikmod mmx motif mpeg ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl png pnp python qt quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype trusted usb x86 xinerama xml xml2 xmms xv zlib"
same problem, but mine spit out a little more debugging info: Compiling smbd/quotas.c In file included from /usr/include/linux/quota.h:40, from smbd/quotas.c:65: /usr/include/linux/spinlock.h: In function `bit_spin_lock': /usr/include/linux/spinlock.h:413: error: invalid type argument of `->' /usr/include/linux/spinlock.h: In function `bit_spin_trylock': /usr/include/linux/spinlock.h:430: error: invalid type argument of `->' /usr/include/linux/spinlock.h:433: error: invalid type argument of `->' /usr/include/linux/spinlock.h:433: error: `TIF_NEED_RESCHED' undeclared (first use in this function) /usr/include/linux/spinlock.h:433: error: (Each undeclared identifier is reported only once /usr/include/linux/spinlock.h:433: error: for each function it appears in.) /usr/include/linux/spinlock.h: In function `bit_spin_unlock': /usr/include/linux/spinlock.h:451: error: invalid type argument of `->' /usr/include/linux/spinlock.h:451: error: `TIF_NEED_RESCHED' undeclared (first use in this function) smbd/quotas.c: In function `get_smb_linux_vfs_quota': smbd/quotas.c:135: error: storage size of `D' isn't known make: *** [smbd/quotas.o] Error 1 so what do we do about it?
I have experienced similar problems with quotas.c (storage size of D..). In my case a simple patch I created was enough to get samba to compile successfully. However, I had to disable rcptorture in the ebuild as they were name conflicts with global_myname (declared as pstring and as a function).
Created attachment 22515 [details, diff] The patch that fixed problems with quotas.c for me
for me updating linux-headers to 2.4.22 worked
I simply emerged the same version of linux-headers as my kernelversion. Previous: kernel gentoo-sources-2.4.22-r1 and linux-headers-2.4.21-r1. Now: kernel gentoo-sources-2.4.22-r1 and linux-headers-2.4.22. This solved my problems compiling samba-3.0.1 Like mentioned above I too noticed that there is a problem with rpctorture. It couldn't be build on my System but samba compiled anyway.
i'm using kernel 2.4.19 (nothing newer works on my system, either acpi or other stuff crashes) with linux-headers 2.4.19-r1, same error with quota.h... JG
*** Bug 36218 has been marked as a duplicate of this bug. ***
the patch worked fine for me
Updating kernel headers from 2.4.21 to 2.4.23 (my running kernel) fixed the problem here
Created attachment 22524 [details] emerge log (proto.h error) i guess there's also something wrong with the ebuild (or something else), because it still doesn't compile. but i can compile it with the same configure flags by hand. attached is my samba emerge log. proto.h isn't found when emerging samba with the ebuild, but it works when compiling by hand: # make everything Using FLAGS = -O -Iinclude -I/usr/portage/distfiles/samba-3.0.1/source/include -I/usr/portage/distfiles/samba-3.0.1/source/ubiqx -I/usr/portage/distfiles/samba-3.0.1/source/smbwrapper -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/portage/distfiles/samba-3.0.1/source LIBS = -lcrypt -lresolv -lnsl -ldl LDSHFLAGS = -shared LDFLAGS = Generating smbd/build_options.c Building include/proto.h creating /usr/portage/distfiles/samba-3.0.1/source/include/proto.h Building include/wrepld_proto.h creating /usr/portage/distfiles/samba-3.0.1/source/include/wrepld_proto.h Building include/build_env.h creating /usr/portage/distfiles/samba-3.0.1/source/nsswitch/winbindd_proto.h creating /usr/portage/distfiles/samba-3.0.1/source/web/swat_proto.h creating /usr/portage/distfiles/samba-3.0.1/source/client/client_proto.h creating /usr/portage/distfiles/samba-3.0.1/source/utils/net_proto.h Compiling dynconfig.c Compiling param/loadparm.c Compiling param/params.c Compiling smbd/files.c Compiling smbd/chgpasswd.c Compiling smbd/connection.c Compiling smbd/utmp.c [...] i also needed to apply the patch for quotas.c when compiling by hand. JG
Just emerging linux-headers-2.4.22 fixed this. Could ~x86 be added for this ebuild so people can compile samba again?
I downgraded headers to 2.4.22 and I see the same problem.
*** Bug 36275 has been marked as a duplicate of this bug. ***
Regarding my earlier comment: "I downgraded headers to 2.4.22 and I see the same problem."... I take care of my kernel sources and what not manually. I have in /usr/src/ linux-2.4.22 linux-2.4.23 linux-2.6.0 . I simply point the symlink linux at any one of those to get the headers I want. As far as I know this is the proper way. Or, am I wrong?
The problem I am seeing is the storage size of D. It's in this section of quotas.c of the smbd compile: #ifdef LINUX_QUOTAS_1 struct dqblk D; ZERO_STRUCT(D); dp->bsize = (SMB_BIG_UINT)1024; #else /* LINUX_QUOTAS_2 */ struct mem_dqblk D; ZERO_STRUCT(D); My /usr/include/linux/quota.h has a struct definition for dqblk but not for mem_dqblk (2.4.21-r1 linux-headers). However, it appears as though the config script is not properly recognizing that I don't have mem_dqblk because the compile fails on struct mem_dqblk D; (ie something should be defining LINUX_QUOTAS_1 and isn't) Dan
With respect to the patch from comment #12, how do I proceed from there, how do I prevent emerge from unpacking the unpatched source again?
> (ie something should be defining LINUX_QUOTAS_1 and isn't) Defining LINUX_QUOTAS_1 instead of LINUX_QUOTAS_2 is exactly what the patch does. It's also worth noting that in the comments in quotas.c it says: * This shouldn't be neccessary - it should be /usr/include/sys/quota.h * Unfortunately, RH7.1 ships with a different quota system using struct mem_dqblk * rather than the struct dqblk defined in /usr/include/sys/quota.h. Since we are not RH7.1, changing the default LINUX_QUOTAS_2 to _1 seems to be the right thing to do.
Don't like what I see, but Samba builds fine after changing LINUX_QUOTAS_2 to LINUX_QUOTAS_1 in quotas.c Anybody worried about rpctorture not compiling?
No. You see it failing because I changed the ebuild to show me it failing. It hasnt built correctly in a while but I wanted to keep informed about whats happening with it. As for the quota patch; I personally flipped my headers around so I could compile, before I released. If people really want to see the submitted patch included I guess I'll do that... but it's kind of a bummer.
I was getting this same error. I'm running vanilla 2.6.0_beta8. I upgraded linux-headers to 2.6.0_beta11. I recompiled glibc and then samba. It compiled quotas.c without a hitch.
*** Bug 36387 has been marked as a duplicate of this bug. ***
Hmm, so maybe that wasn't the way to go. <snip> Compiling utils/ntlm_auth.c Compiling libsmb/spnego.c libsmb/spnego.c: In function `read_negTokenInit': libsmb/spnego.c:51: warning: passing arg 2 of `asn1_read_OID' from incompatible pointer type libsmb/spnego.c: In function `read_negTokenTarg': libsmb/spnego.c:186: warning: passing arg 2 of `asn1_read_OID' from incompatible pointer type libsmb/spnego.c: In function `free_spnego_data': libsmb/spnego.c:321: warning: passing arg 1 of `free' discards qualifiers from pointer target type libsmb/spnego.c:330: warning: passing arg 1 of `free' discards qualifiers from pointer target type Linking bin/ntlm_auth Compiling utils/smbcquotas.c Linking bin/smbcquotas Compiling client/smbmount.c In file included from /usr/include/linux/fs.h:9, from /usr/include/linux/smb_fs.h:15, from client/smbmount.c:27: /usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory In file included from /usr/include/linux/fs.h:16, from /usr/include/linux/smb_fs.h:15, from client/smbmount.c:27: /usr/include/linux/list.h:576:2: warning: #warning "don't include kernel headers in userspace" make: *** [client/smbmount.o] Error 1 !!! ERROR: net-fs/samba-3.0.1 failed. !!! Function src_compile, Line 164, Exitcode 2 !!! SAMBA pieces
Created attachment 22596 [details] Ebuild that applies the patch This ebuild will apply the already posted patch. Just make sure the patch is in the files folder.
I get the same problem: Compiling smbd/quotas.c smbd/quotas.c: In function `get_smb_linux_vfs_quota': smbd/quotas.c:135: error: storage size of `D' isn't known make: *** [smbd/quotas.o] Error 1 !!! ERROR: net-fs/samba-3.0.1 failed. !!! Function src_compile, Line 164, Exitcode 2 !!! SAMBA pieces Some info that might help: ls -al /usr/src/ total 33 drwxr-xr-x 5 root root 240 Dec 23 11:46 . drwxr-xr-x 15 root root 520 Dec 4 17:07 .. -rw-r--r-- 1 root root 25328 Dec 2 00:31 .config -rw-r--r-- 1 root root 0 Dec 1 20:27 .keep lrwxrwxrwx 1 root root 19 Dec 2 00:18 linux -> linux-2.4.22-gentoo drwxr-xr-x 16 root root 808 Dec 2 00:51 linux-2.4.22-gentoo drwxr-xr-x 16 root root 808 Dec 2 15:31 linux-2.4.22-gentoo-r1 drwxr-xr-x 16 root root 624 Dec 23 12:01 linux-2.4.22-gentoo-r2 I do not use quotas but have it built into the kernel: # cd /usr/src/linux-`uname -r` # grep -i quota .config CONFIG_QUOTA=y CONFIG_XFS_QUOTA=y
#define LINUX_QUOTAS_1 patch added to samba-3.0.1-r1 Many thanks to all, Greetings.
It now compiles for me. Thanks a lot, great work!