Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 103074

Summary: www-servers/lighttpd-1.4.0 linking error
Product: Gentoo Linux Reporter: Jaak Ristioja <jaak>
Component: New packagesAssignee: www-servers Herd (OBSOLETE) <www-servers+disabled>
Status: VERIFIED FIXED    
Severity: normal CC: benoit.boissinot
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: home-brew patch to fix it (hopefully)
An ebuild to go with the patch.
another patch to correct the linking error
patch for the ebuild to fix configure

Description Jaak Ristioja 2005-08-19 11:35:38 UTC
A typo in the stat_cache.c file results in an "undefined reference" linker error.

Reproducible: Always
Steps to Reproduce:
emerge =lighttpd-1.4.0



Reported upstream: http://trac.lighttpd.net/trac/ticket/210
Comment 1 Jaak Ristioja 2005-08-19 11:41:30 UTC
Created attachment 66337 [details, diff]
home-brew patch to fix it (hopefully)

Just renamed the "stat_cache_entry_attr_get" function to "stat_cache_attr_get".
Comment 2 Jaak Ristioja 2005-08-19 11:42:52 UTC
Created attachment 66338 [details]
An ebuild to go with the patch.

Added epatch to src_unpack
Comment 3 Jaak Ristioja 2005-08-19 11:48:28 UTC
Comment on attachment 66337 [details, diff]
home-brew patch to fix it (hopefully)

At least it compiles!
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2005-08-19 17:57:08 UTC
emerge --info please.
Comment 5 Jaak Ristioja 2005-08-20 00:48:01 UTC
Here you go, Aaron!

Portage 2.0.51.22-r2 (default-linux/amd64/2004.3, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre6
ccache version 2.4 [enabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-O2 -fomit-frame-pointer -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O2"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="X aac acl adns alsa amd64 apm avi bitmap-fonts bzip2 cairo cdr cjk crypt
cups curl directfb eds encode fam fbcon ffmpeg flac foomaticdb gif gimpprint gpm
gstreamer gtk gtk2 gtkhtml hal imagemagick imlib ithreads jpeg kde libwww lirc
lzw lzw-tiff mad mikmod mmap mng mozilla mp3 mpeg multilib ncurses nogcj nomotif
ogg oggvorbis opengl pam pdflib perl pic png python qt quicktime sdl sqlite ssl
svg sysfs tcltk tcpd theora threads truetype truetype-fonts type1-fonts unicode
usb userlocales vhosts vorbis wmf xinerama xml xml2 xmms xpm xprint xscreensaver
xv xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LINGUAS
Comment 6 Benoit Boissinot 2005-08-20 06:53:02 UTC
Created attachment 66400 [details, diff]
another patch to correct the linking error

I think this fix is more correct since the function takes a stat_cache_entry as
parameter (and not a stat_cache).
Comment 7 Benoit Boissinot 2005-08-20 06:57:11 UTC
i had this problem without having the xattr use flag. The configure phase in the
ebuild should be fix (patch follows).

regards,

Benoit
Comment 8 Benoit Boissinot 2005-08-20 06:58:18 UTC
Created attachment 66401 [details, diff]
patch for the ebuild to fix configure
Comment 9 Aaron Walker (RETIRED) gentoo-dev 2005-08-20 07:22:47 UTC
I can only reproduce this with USE=xattr.(In reply to comment #1)
> Created an attachment (id=66337) [edit]
> home-brew patch to fix it (hopefully)
> 
> Just renamed the "stat_cache_entry_attr_get" function to "stat_cache_attr_get".

Upstream has comfirmed this as the correct solution.  I have added it to cvs. 
Thanks.

(In reply to comment #7)
> i had this problem without having the xattr use flag. The configure phase in the
> ebuild should be fix (patch follows).

I am only able to reproduce it with USE=xattr.

(In reply to comment #8)
> Created an attachment (id=66401) [edit]
> patch for the ebuild to fix configure

This patch is incorrect.  You can plainly see by looking at the configure.in
that the option is --with-attr and not --with-libattr.

Line 158:
AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable extended attribute support]),
Comment 10 Jaak Ristioja 2005-08-20 07:47:08 UTC
Well... I didn't have the use flag set either, but it still seems to use it:

./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --build=x86_64-pc-linux-gnu --libdir=/usr/lib/lighttpd
--enable-lfs --disable-ipv6 --without-mysql --without-ldap --without-attr
--with-openssl

...
checking for extended attributes support... yes
checking for attr_get in -lattr... yes
checking attr/attributes.h usability... yes
checking attr/attributes.h presence... yes
checking for attr/attributes.h... yes
...
Comment 11 Benoit Boissinot 2005-08-20 07:51:23 UTC
I confirm the configure problem too without the xattr use:
[ebuild   R   ] www-servers/lighttpd-1.4.0  +ipv6 -ldap -mysql -php +ssl -xattr 0 kB

And changing attr too libattr solves the problem:
checking for extended attributes support... no
Comment 12 Aaron Walker (RETIRED) gentoo-dev 2005-08-20 09:51:23 UTC
Right, however that's a different problem.  I am closing this since this bug is
fixed.

The problem is that the logic in configure.in is flawed with regards to using
--without-OPTION, and thus even if something is disabled, it'll use it if it's
installed on the system.  I am currently working with upstream on this, so this
will be fixed shortly.
Comment 13 Aaron Walker (RETIRED) gentoo-dev 2005-08-20 10:04:47 UTC
(In reply to comment #11)

> And changing attr too libattr solves the problem:
> checking for extended attributes support... no

I'm pretty sure that's due to the fact that the --with-attr option defaults to
no so when you use libattr then having it unset passes --without-libattr (which
it ignores).  The reason it works is that --without-attr isn't specified like
before (since you used libattr) and therefore it defaulted to no.