Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19994 - findutils doesn't compile on systems using AFS because of bad configure params
Summary: findutils doesn't compile on systems using AFS because of bad configure params
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
: 47444 (view as bug list)
Depends on: 23700
Blocks:
  Show dependency tree
 
Reported: 2003-04-26 06:30 UTC by Joerg Anders
Modified: 2004-08-11 15:54 UTC (History)
7 users (show)

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


Attachments
patches the latest findutils ebuild to disable afs within the configure if afs is not in the USE vars. (findutils.patch,301 bytes, patch)
2004-01-28 10:07 UTC, Ryan Phillips (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Anders 2003-04-26 06:30:53 UTC
There is a problem in sys-apps/findutils (4.1.7-r4) 
 
which is only recognized by users with openafs installation: 
 
In: 
 
findutils-4.1.7/find/Makefile is a line: 
 
LDADD = ../lib/libfind.a 
 
Perhaps this works on non-AFS systems. But if  
AFS is present ("#define  AFS 1" in "config.h") 
the correct line should be: 
 
LDADD = ../lib/libfind.a  /usr/local/lib/afs/libsys.a /usr/local/lib/librx.a 
/usr/local/lib/liblwp.a 
 
I assume here is a "./configure" parameter missing. 
 

Reproducible: Always
Steps to Reproduce:
1. Search for a Gentoo Linux with installed AFS clienet 
2. Do "emerge --update findutils" 
3. Look frustrated at the linker output "pioctl not found" 
Actual Results:  
The linker fails because the AFS libraries are missing. 

Expected Results:  
The linker should work and build the program "find". 

Portage 2.0.47-r10 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r8) 
================================================================= 
System uname: 2.4.20-gentoo-r2 i686 Pentium III (Coppermine) 
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share 
/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/co 
nfig /opt/quake3/cpma/server.cfg" 
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="" 
USE="x86 oss 3dnow apm avi crypt cups encode jpeg libg++ mikmod mmx mpeg 
ncurses 
 pdflib quicktime spell truetype xml2 xmms xv alsa arts berkdb cdr esd gdbm gif  
gnome gnome-libs gpm gtk guile imlib java kde libwww motif nls oggvorbis opengl  
pam perl png python qt readline sdl slang ssl svga tcltk tcpd tetex tiff X" 
COMPILER="" 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-O2 -mcpu=i686 -pipe" 
CXXFLAGS="-O2 -mcpu=i686 -pipe" 
ACCEPT_KEYWORDS="x86" 
MAKEOPTS="-j2" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
FEATURES="sandbox ccache"
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2003-05-26 14:39:41 UTC
This was assigned to me a while ago but I have no way to test/verify since I'm not running afs.  Perhaps should be assigned to somebody that uses openafs?  Ryan Phillips is the obvious one but I think he's on hiatus right now...
Comment 2 Chris Snyder 2003-06-08 12:52:34 UTC
The configure script for findutils does not work correctly. To check whether or not to include  
AFS, it looks for the presence of the /afs mountpoint. If it exists, AFS support is added. If not, it  
is not. This means that even if you unmerge openafs and have -afs in your USE variable, afs  
support will still be added if the /afs mountpoint is not removed.  This is not the way it should be 
done - there should be a --with-afs configure script option  
instead. 
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-09 07:53:18 UTC
chris, can you patch up the configure?
Comment 4 Chris Snyder 2003-06-13 20:23:45 UTC
I can patch up configure, but that's more of a hack, since running autoconf would overwrite my 
changes. The ideal solution would be to submit a bugreport upstream to GNU and have them fix 
it so that we don't always have to patch it. Let me know if you still want me to patch the 
configure file, though I'm not familiar at all with Autoconf, and it'd be better to patch the source 
file than the configure script itself. 
Comment 5 Bernhard Schmidt 2003-06-29 08:35:35 UTC
The ebuild already has some tweaks for use with AFS.
The main problem is that installing AFS does not set the "afs" use flag automatically due to a missing line in /etc/make.profile/use.defaults

Add the line

afs             net-fs/openafs

to /etc/make.profile/use.defaults or emerge findutils with the afs-flag set

USE="afs" emerge -u findutils

Comment 6 Stephen Bosch 2004-01-26 16:14:12 UTC
Comment #5 is not a solution -- you are saddled with this problem if you install OpenAFS for any reason and then try to revert. If you emerge OpenAFS, then unmerge it, you are left with the findutils error every time you do an etc-update:

root@wopr:/usr/portage/sys-apps/findutils# etc-update
Scanning Configuration files...
find: error while loading shared libraries: /usr/afsws/lib/pam_afs.so.1: cannot open shared object file: No such file or directory
Exiting: Nothing left to do; exiting. :)
root@wopr:/usr/portage/sys-apps/findutils#

If you try and remerge findutils without flags, it fails, because it's looking for that afs library again. The ebuild ignores USE="-afs" and the configure script is incorrectly called.
Comment 7 Stephen Bosch 2004-01-26 16:30:14 UTC
findutils 4.1.7-r5:

There is still something wrong with either the ebuild or the configure script. I presumed a workaround was introduced back when this bug was first reported. At any rate:

findutils will not build without the afs flag set on my Gentoo 1.4. If I set the "afs", then portage tries to install openafs. If I let it, and then remove it, I get the error in Comment #6. If I attempt to build afs with either no flag, or with USE="-afs", it fails to build, with the following error:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../intl -DLOCALEDIR=\"/usr/share/locale\" -O3 -mcpu=athlon-xp -funroll-loops -pipe -c -o fstype.o `test -f fstype.c || echo './'`fstype.c
fstype.c:162:23: afs/venus.h: No such file or directory
fstype.c:170:24: sys/ioccom.h: No such file or directory
fstype.c: In function `in_afs':
fstype.c:178: storage size of `vi' isn't known
fstype.c:184: `VIOC_FILE_CELL_NAME' undeclared (first use in this function)
fstype.c:184: (Each undeclared identifier is reported only once
fstype.c:184: for each function it appears in.)
make[3]: *** [fstype.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/findutils-4.1.7-r5/work/findutils-4.1.7/find'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/findutils-4.1.7-r5/work/findutils-4.1.7/find'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/findutils-4.1.7-r5/work/findutils-4.1.7'
make: *** [all-redirect] Error 2

!!! ERROR: sys-apps/findutils-4.1.7-r5 failed.
!!! Function src_compile, Line 58, Exitcode 2
!!! (no error message) 

I can get it to build by adding "--without-afs" to the line calling configure in the ebuild, but that is an ugly kludge.
Comment 8 Ryan Phillips (RETIRED) gentoo-dev 2004-01-28 10:07:05 UTC
Created attachment 24546 [details, diff]
patches the latest findutils ebuild to disable afs within the configure if afs is not in the USE vars.
Comment 9 Ryan Phillips (RETIRED) gentoo-dev 2004-01-28 10:08:01 UTC
Does this patch work for everyone?
Comment 10 Kevin 2004-04-21 11:37:31 UTC
This bug (or something very closely related) is still present in the latest stable ebuild that I get from portage.

I discovered it while trying to do a stage 1 installation on a server that I plan on being (among other things) an OpenAFS server.  The only way I can get a successful outcome with "emerge findutils" is if I remove afs from my USE variable.

This popped up for me when doing the stage 1 install where afs was present in my USE variable while doing an emerge system.  But it also affects my Gentoo box that has been running for months.

In case it's any help, please see the thread on the gentoo-server list with subject: problems with stage 1 install: findutils won't emerge.

There I elaborate, but the crux of the matter seems to lie here:

manual:
===============================================================
configure:2109: checking for C compiler default output
configure:2112: gcc -O3 -march=pentium4 -fomit-frame-pointer -pipe 
-mcpu=pentium4   conftest.c  >&5
configure:2115: $? = 0
configure:2161: result: a.out
================================================================

emerge:
================================================================
configure:2109: checking for C compiler default output
configure:2112: gcc -O3 -march=pentium4 -fomit-frame-pointer -pipe 
-mcpu=pentium4 -I/usr/afsws/include -O3 -march=pentium4
-fomit-frame-pointer -pipe -mcpu=pentium4 -I/usr/afsws/include  
conftest.c /usr/afsws/lib/pam_afs.so.1 >&5
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_get_item'
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_set_data'
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_putenv'
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_set_item'
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_get_data'
/usr/afsws/lib/pam_afs.so.1: undefined reference to `pam_get_user'
collect2: ld returned 1 exit status
configure:2115: $? = 1
================================================================

Will this prevent me from implementing a Gentoo box as an OpenAFS server with a fully functional findutils package that supports afs?
Comment 11 Sebastian Celis 2004-04-26 15:05:09 UTC
I am having this exact same problem.  This is my first time installing gentoo and I am doing the entire shebang staring at phase 1.  With afs in my USE variable, findutils fails during the

`emerge system'

step.
Comment 12 Ryan Phillips (RETIRED) gentoo-dev 2004-04-26 22:03:33 UTC
findutils and afs hate each other.  does the findutils-4.1.20-r1 work?
Comment 13 Ryan Phillips (RETIRED) gentoo-dev 2004-04-26 22:04:32 UTC
Sebastian: Please post your emerge info. Thanks
Comment 14 Sebastian Celis 2004-04-27 12:14:31 UTC
For the most part, everything is set to the default settings.  I believe the only thing I changed was my make.conf file.  Here it is:

CFLAGS="-march=i686 -03 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
USE="afs alsa -cups ethereal flac -foomaticdb imagemagick ipv6 java kerberos krb4 mozilla mysql perl postgres tetex tiff unicode"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"


If you need anything else, please let me know.
Comment 15 Sebastian Celis 2004-04-27 13:10:10 UTC
It looks like mardin1234 is having similar problems as evidenced at the following forum link:

http://forums.gentoo.org/viewtopic.php?t=163851&highlight=findutils
Comment 16 Ryan Phillips (RETIRED) gentoo-dev 2004-04-27 20:07:23 UTC
Can everyone try changing the line in the ebuild:

export LIBS=/usr/afsws/lib/pam_afs.so.1

to

export LIBS="/usr/afsws/lib/pam_afs.so.1 -lpam"

and report back. Thanks!
Comment 17 Sebastian Celis 2004-04-29 09:59:19 UTC
Ryan: Changing that line in the findutils ebuild files fixes the problem for me.
Comment 18 Ryan Phillips (RETIRED) gentoo-dev 2004-04-29 15:47:47 UTC
I've commited the fix to the CVS... I'll keep the bug open for a few days if any new problems creep up.
Comment 19 SpanKY gentoo-dev 2004-06-29 08:35:01 UTC
still an issue with 4.1.20-r1 ?
Comment 20 SpanKY gentoo-dev 2004-06-29 08:36:23 UTC
*** Bug 47444 has been marked as a duplicate of this bug. ***
Comment 21 Ryan Phillips (RETIRED) gentoo-dev 2004-08-11 15:54:03 UTC
This bug should be resolved.