Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36454 - Samba-3.0.1-r1 still fails to compile; quotas.h issues.
Summary: Samba-3.0.1-r1 still fails to compile; quotas.h issues.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 36200
Blocks:
  Show dependency tree
 
Reported: 2003-12-24 17:14 UTC by Mystilleef
Modified: 2004-02-15 00:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mystilleef 2003-12-24 17:14:45 UTC
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"
Comment 1 Daath 2003-12-25 08:30:57 UTC
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"
Comment 2 Mystilleef 2003-12-28 06:34:32 UTC
Any resolution for the problem?
Comment 3 Donny Davies (RETIRED) gentoo-dev 2003-12-28 15:01:49 UTC
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.

Comment 4 Andreas Simon 2003-12-29 02:08:56 UTC
This new sed expression fixed the error for me.
Comment 5 jack_mort 2003-12-29 02:58:26 UTC
Yes, same thing here : compiled fine with the new expression. Thanks !
Comment 6 Mystilleef 2003-12-29 05:37:59 UTC
Same here. Thank you. 
Comment 7 Daath 2004-01-02 12:27:05 UTC
Will there be an -r2 with Donny's (#3) patch?
Comment 8 Donny Davies (RETIRED) gentoo-dev 2004-01-02 13:13:04 UTC
I'll try to do it this weekend.
Comment 9 SpanKY gentoo-dev 2004-01-18 23:45:59 UTC
no need to rev bump, just to add that extra -e in
Comment 10 Donny Davies (RETIRED) gentoo-dev 2004-01-19 07:52:59 UTC
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.
Comment 11 SpanKY gentoo-dev 2004-01-19 18:14:19 UTC
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 ;)
Comment 12 Donny Davies (RETIRED) gentoo-dev 2004-01-20 05:48:22 UTC
Spany; ok, thanks for the input... I'll really try to make a new release this week then, with other fixes.

Regards.
Comment 13 Donny Davies (RETIRED) gentoo-dev 2004-02-15 00:13:01 UTC
got it, thanks.  applied in samba-3.0.2a.ebuild.