samba-3.0.1-r1 fails to compile, especailly at quotas.c. Excerpt below; Compiling lib/sysquotas.c Compiling smbd/change_trust_pw.c Compiling smbd/fake_file.c 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:131: error: storage size of `D' isn't known make: *** [smbd/quotas.o] Error 1 !!! ERROR: net-fs/samba-3.0.1-r1 failed. !!! Function src_compile, Line 169, Exitcode 2 !!! SAMBA pieces Reproducible: Always Steps to Reproduce: 1. emerge sync 2. emerge samba 3. Actual Results: It fails to compile. Expected Results: Expected samba to compile successfully. Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 2.6.0) ================================================================= System uname: 2.6.0 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-w -pipe -fforce-addr -fomit-frame-pointer -march=athlon -Os -s" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/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="-w -pipe -fforce-addr -fomit-frame-pointer -march=athlon -Os -s" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs cvs digest fixpackages sandbox userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j1 -s" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="3dnow X aalib alsa apm avi berkdb bonobo cdr crypt cups doc encode esd foomaticdb gdbm ggi gif gnome gpm gtk gtk2 guile imlib java jpeg libg++ libwww mad mikmod mmx mozilla mpeg nas ncurses nptl oggvorbis opengl oss pam pdflib perl pic png python quicktime readline sdl slang spell ssl svga tcpd tetex truetype vanilla x86 xml2 xv zlib"
I'm seeing exactly the same: 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:131: error: storage size of `D' isn't known make: *** [smbd/quotas.o] Error 1 !!! ERROR: net-fs/samba-3.0.1-r1 failed. !!! Function src_compile, Line 169, Exitcode 2 !!! SAMBA pieces I'm on gentoo-dev-sources kernel 2.6.0 with 2.6.0 kernel headers, my emerge info: Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 2.6.0-gentoo) ================================================================= System uname: 2.6.0-gentoo i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -mcpu=pentium3 -O3 -pipe -mfpmath=sse -mmmx -msse" 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 /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -mcpu=pentium3 -O3 -pipe -mfpmath=sse -mmmx -msse" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.uninett.no/pub/linux/Gentoo http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://212.219.247.10/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bonobo crypt cups curl directfb encode esd foomaticdb gd gdbm gif gnome gpm gtk gtk2 imap imlib java jpeg kde libg++ libwww mad maildir mcal mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang sse ssl svga tcltk tcpd truetype x86 xml xml2 xmms xv zlib"
Any resolution for the problem?
Try replacing the sed statement in src_install() with this one instead: #Bug #36200; sys-kernel/linux-headers dependent sed -i -e 's:#define LINUX_QUOTAS_2:#define LINUX_QUOTAS_1:' \ -e 's:<linux/quota.h>:<sys/quota.h>:' \ ${S}/source/smbd/quotas.c and see if that does it. Note it just adds an additional expression.
This new sed expression fixed the error for me.
Yes, same thing here : compiled fine with the new expression. Thanks !
Same here. Thank you.
Will there be an -r2 with Donny's (#3) patch?
I'll try to do it this weekend.
no need to rev bump, just to add that extra -e in
Spanky; thanks for the help with the added expression. I've been hesitant on committing though, as I'm not entirely positive what it's all going to do with existing installs out there. I tried asking mjc; but got little help from him. Anybody else have additional comments on what going with the new sed-fu in there is going to do to the world out there? Regards.
well, on all my 2.6.x boxes, samba fails to build i can tell you that :) here's what i have to suggest that this fix wont break anything: sys/linux.h has this comment: This just represents the non-kernel parts of <linux/quota.h>. soure/smbd/quotas.c has this comment: This shouldn't be neccessary - it should be /usr/include/sys/quota.h [but because on some redhat machines linux/quota.h and sys/quota.h is different] looking through the source of linux/quota.h and sys/quota.h, the prototypes and structs are pretty much the same, and the file compiles just fine with using sys/quota.h i compiled this on my hppa which is a 2.4.x kernel with 2.4.x headers and it seems to work just fine with my 2.6.x boxes in the end, it's your call ;)
Spany; ok, thanks for the input... I'll really try to make a new release this week then, with other fixes. Regards.
got it, thanks. applied in samba-3.0.2a.ebuild.