Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34807 - lufs0.9.7 doesn't compile on 2.6 kernels
Summary: lufs0.9.7 doesn't compile on 2.6 kernels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Wout Mertens (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-01 03:45 UTC by Alexander Isacson
Modified: 2004-05-15 13:10 UTC (History)
7 users (show)

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


Attachments
lufs-0.9.7-r1.ebuild (lufs-0.9.7-r1.ebuild,2.04 KB, text/plain)
2004-01-13 12:57 UTC, Ed Catmur
Details
For TGL's comments. (lufs-0.9.7-r1.ebuild,2.50 KB, text/plain)
2004-02-27 19:40 UTC, Ed Catmur
Details
Oops: fixed ebuild. (lufs-0.9.7-r1.ebuild,2.50 KB, text/plain)
2004-02-27 19:42 UTC, Ed Catmur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Isacson 2003-12-01 03:45:43 UTC
There seem to be a problem with this ebuild. Bugs 32296 and 34193 are also 
about lufs but they don't report the same problem.




Reproducible: Always
Steps to Reproduce:
1. emerge lufs
Actual Results:  
###############################################################################
 supported filesystems: localfs locasefs ftpfs gnetfs sshfs gvfs
 suid files: lufsmnt & lufsumount.
###############################################################################
make  all-recursive
make[1]: Entering directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7'
Making all in kernel
make[2]: Entering directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel'
Making all in Linux
make[3]: Entering directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel/Linux'
Making all in 2.6
make[4]: Entering directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel/Linux/2.6'
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make[5]: Entering directory `/mnt/tmp/src/linux-2.6.0-test10-gentoo'
Makefile:405: /mnt/tmp/src/linux-2.6.0-test10-gentoo/arch/x86/Makefile: No such 
file or directory
make[5]: *** No rule to make target `/mnt/tmp/src/linux-2.6.0-test10-
gentoo/arch/x86/Makefile'.  Stop.
make[5]: Leaving directory `/mnt/tmp/src/linux-2.6.0-test10-gentoo'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel/Linux/2.6'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel/Linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-
0.9.7/kernel'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/tmp/portage/portage/lufs-0.9.7/work/lufs-0.9.7'
make: *** [all] Error 2

!!! ERROR: sys-fs/lufs-0.9.7 failed.
!!! Function src_compile, Line 391, Exitcode 2
!!! emake failed


Expected Results:  
Successful merge.

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.4.3.10
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[enabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
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/te
xmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs distcc buildpkg"
GENTOO_MIRRORS="http://gentoo.linux.no/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod 
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb 
gtkhtml alsa gdbm berkdb slang readline tetex bonobo tcltk java guile mysql 
postgres X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome 
gtk motif opengl mozilla ldap cdr acpi altivec amd apache2 athena atlas dga dnd 
dvd emacs ethereal evo faad fam fbcon ffmpeg flac flash gstreamer gtk2 hostap-
nopci hostap-noplx imagemagick imap imlib2 irmc joystick justify lirc 
lufsusermount maildir matroska mmx moznoirc moznomail mozsvg offensive openssh 
pcmcia pda pnp samba slp sse tiff type1 unicode usb v4l videos wmf wxwindows 
xml xosd xvid -kde -arts -svga -qt"
Comment 1 SpanKY gentoo-dev 2003-12-01 07:26:15 UTC
/mnt/tmp/src/linux-2.6.0-test10-gentoo/arch/x86/Makefile

looks like your kernel source needs some looking at
what is your current kernel source ?
Comment 2 Alexander Isacson 2003-12-01 09:45:22 UTC
They are in /usr/src/linux which is a symlink to linux-2.6.0-test11-gentoo/
Comment 3 Andreas Eriksson 2003-12-01 10:18:11 UTC
I can veryfy this. I get the same thing.
My soulution was to compile it manually with --with-kernel=2.6 added to the configure. Then it got past that error and the kernel related things worked, but, it failed with another one later when building the tools. :(
Comment 4 David Ripton 2003-12-01 11:25:53 UTC
Same problem with 2.6.0-test11.  It can't find /usr/src/linux-2.6.0-test11/arch/x86/Makefile

I think that path should be /usr/src/linux-2.6.0-test11/arch/i386/Makefile

I added a symlink of i386 to x86 in the kernel source tree, which got me past this point, to a Portage sandbox violation.

make[5]: Entering directory `/usr/src/linux-2.6.0-test11'
  MKELF   scripts/elfconfig.h
ACCESS DENIED  open_wr:   /usr/src/linux-2.6.0-test11/scripts/elfconfig.h
/bin/sh: line 1: scripts/elfconfig.h: Permission denied

Sandbox log says open_wr:   /usr/src/linux-2.6.0-test11/scripts/elfconfig.h
Looks like it's trying to open a kernel header file read/write instead of read-only, and the sandbox doesn't like that.
Comment 5 Andreas Eriksson 2003-12-01 12:09:38 UTC
that symlink wouldn't be the right soulution, because it does that because it thinks its a 2.4 kernel. My guess is that the detection of what kernel is used fails.
Comment 6 Vlad Berditchevskiy 2003-12-01 17:33:47 UTC
The same problem here. Here is a dirty workaround I used to merge lufs:

cd /lib/modules
ln -s 2.6.0-test11-gentoo/ 2.6.0
USE="+lufsusermount" emerge -v sys-fs/lufs
cd /var/tmp/portage/lufs-0.9.7/work/lufs-0.9.7
make clean
./configure --prefix=/var/tmp/portage/lufs-0.9.7/image/usr --with-kernel=2.6.0
make -j2
make install
ebuild /usr/portage/sys-fs/lufs/lufs-0.9.7.ebuild qmerge
ebuild /usr/portage/sys-fs/lufs/lufs-0.9.7.ebuild postinst

The first two lines are probably the most interesting.
Comment 7 Vlad Berditchevskiy 2003-12-01 18:02:00 UTC
Sorry, my conclusion was too early: the user space probrams were installed, but the kernel module was not compiled at all. :-(
Comment 8 Vlad Berditchevskiy 2003-12-01 18:15:48 UTC
Actually, it was. :-) It just wasn't installed. Using lufs now. :-)
Comment 9 Daath 2003-12-02 03:30:32 UTC
As you can see in
http://bugs.gentoo.org/show_bug.cgi?id=32296
I have the same problem, it sounds to me like the bug isn't as severe as I thought... 
Is there a chance that we'll see a lufs-0.9.7-r1 ebuild soon? :)
Comment 10 Wout Mertens (RETIRED) gentoo-dev 2003-12-04 23:21:57 UTC
Ok, I'll see about getting those two lines in :)
Comment 11 Daath 2003-12-17 04:27:21 UTC
Is there any progress on this? I tried following Vlad's recipe, and I got it installed but there was no kernel module; everything else got installed :(
I really need it - or anything similar to this that will mount ftp or ssh...
Comment 12 Daath 2003-12-17 06:16:11 UTC
Actually I just got it to work (sort of), by not executing:

   ebuild /usr/portage/sys-fs/lufs/lufs-0.9.7.ebuild postinst

And going into /var/tmp/portage/lufs-0.9.7/work/lufs-0.9.7/kernel/Linux/2.6 
and doing:

   insmod lufs.ko

ftpfs works for me now, but not sshfs. I get "connection reset by peer" and syslog says: "kernel: (lu_execute) - error executing command!"
Bummer :( But I can live with ftpfs for the time being...
I wonder if I have to insmod again after reboot?... Hmm
Comment 13 Christopher Eineke 2003-12-27 12:37:00 UTC
I too have problems building lufs-0.9.7 witj kernel-2.6.0, but I noticed the following in the build process:

Makefile:405: /usr/src/linux-2.6.0/arch/x86/Makefile: No such file or directory
make[5]: *** No rule to make target `/usr/src/linux-2.6.0/arch/x86/Makefile'.  Stop.

Shouldn't that be `/usr/src/linux-2.6.0/arch/i386/Makefile`?
Comment 14 Ed Catmur 2004-01-13 11:10:27 UTC
ARCH is set by the Gentoo build process to `x86'.
This overrides the setting in the kernel Makefile.
Thus it must be unset in the ebuild:

src_compile () {
	econf
	addwrite /usr/src/linux-$(uname -r)
	env -u ARCH emake
}

The addwrite covers another problem wrt sandboxing, which is that lufs makes 
itself in the kernel build dir and thus needs write access there for temp files.

The same applies for install (ARCH and addwrite):

src_install () {
	dodoc AUTHORS COPYING ChangeLog Contributors INSTALL \
		NEWS README THANKS TODO
	dohtml docs/lufs.html
	addwrite /usr/src/linux-$(uname -r)
	env -u ARCH make DESTDIR=${D} install

	dosym /usr/bin/auto.sshfs /etc/auto.sshfs
	dosym /usr/bin/auto.ftpfs /etc/auto.ftpfs
	dodir /sbin
	dosym /usr/bin/lufsd /sbin/mount.lufs
	use lufsusermount && chmod +s ${D}/usr/bin/lufs{mnt,umount}
	if expr match $(uname -r) 2.6; then
		insinto /lib/modules/$(uname -r)/kernel/fs/lufs
		doins kernel/Linux/2.6/lufs.ko
	fi
}

Also, lufs does not appear capable of installing the kernel module itself for 
the 2.6 kernel, hence the doins.

Finally, the postinst stage appears to require a depmod:

pkg_postinst() {
	depmod
	/usr/sbin/update-modules
	if ! use lufsusermount
	then
		einfo If you want regular users to be able to mount lufs filesystems,
		einfo you need to run the following command as root:
		einfo \# chmod +s /usr/bin/lufsmnt /usr/bin/lufsumount
		einfo You can also set the lufsusermount USE flag to do this
		einfo automatically.
	fi
}

Will post an updated ebuild.
Comment 15 Ed Catmur 2004-01-13 12:57:11 UTC
Created attachment 23751 [details]
lufs-0.9.7-r1.ebuild

Compiles (with a few warnings), installs and merges on my machine:
Linux 2.6.1-rc2-gentoo i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux

Have tested with sshfs only.
Comment 16 Daath 2004-01-17 21:07:07 UTC
Thanks Ed, that works! I can't seem to get it to work with sshfs though (the servers I tried was using public/private key authentication) - but ftpfs works fine! 
I wonder why sshfs won't work though! It just reports "could not mount filesystem" - I can log in with ssh fine though...
Comment 17 Aiko Barz 2004-01-25 07:19:47 UTC
Thanks Ed,

sshfs is working here too. I hope it will go into the portage-tree soon.
Comment 18 Graeme Humphries 2004-01-30 19:35:05 UTC
I get the following error with this ebuild:

>>> Unpacking lufs-0.9.7.tar.gz to /var/tmp/portage/lufs-0.9.7-r1/work
 
 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /usr/local/portage/sys-fs/lufs/files/gentoo-gcc332fix-0.9.7.patch
 
 
!!! ERROR: sys-fs/lufs-0.9.7-r1 failed.
!!! Function epatch, Line 214, Exitcode 0
!!! Cannot find $EPATCH_SOURCE!


Where did this patch come from?
Comment 19 Gen Zhang 2004-02-04 03:20:59 UTC
Don't put this ebuild into your overlay tree -- it requires files from ${FILESDIR} (i.e. the patch mentioned above). Also, an ebuild /usr/portage/sys-fs/lufs/lufs-0.9.7-r1.ebuild digest will also be needed.

Why isn't this in the portage tree outright? It solves the problems. It should probably be x86 too by now.
Comment 20 TGL 2004-02-04 04:23:29 UTC
I've seen the following issues trying this ebuild (on a 2.6 kernel):

 - it doesn't build with feature "userpriv". I don't see how to fix this, the kernel makefile need write access to a few files from kernel source tree that user portage doesn't have. A workaround would be to add:
   RESTRICT="nouserpriv"

- it builds against the currently running kernel. I think modules packages are supposed to build against /usr/src/linux (ie. linux-${KV}), whatever the running kernel is, but i'm not sure there is a strict a strict policy about this. Anyone can confirm?

 - the "emake" call lacks a "|| die". I've seen that trying the userpriv mode: the make process failed, but the package was silently merged whereas it was completly broken.

Otherwise, it works fine here too.
Comment 21 Ed Catmur 2004-02-27 19:40:36 UTC
Created attachment 26496 [details]
For TGL's comments.

Thanks.

A few more tests, and RESTRICT="nouserpriv".

Re compiling against the running kernel: I have no idea how to change what the
package compiles against. It could be useful to have lufs compiled under the
old kernel and ready for a quick reboot, but if /lib/modules/$((readlink -f
/usr/src/linux | sed 's/.*linux-//') does not exist (recently merged sources),
what then?
Comment 22 Ed Catmur 2004-02-27 19:42:08 UTC
Created attachment 26497 [details]
Oops: fixed ebuild.
Comment 23 Bill Cavalieri 2004-03-02 23:53:59 UTC
 Ed, your ebuild works very good, any news on getting it in portage?
Comment 24 Gustavo Michels 2004-03-06 12:07:36 UTC
Is it possible to add an USE variable to this ebuild so it won't build the kernel module? It's only a matter of adding --disable-kernel-support to the configure script.

I am asking this because I had to manually patch the kernel, since I use supermount and the patch won't apply cleanly if supermount was previously patched.
Comment 25 Daniel Armyr 2004-03-30 14:06:18 UTC
Just wanted to say I used Ed's latest ebuild from #22 and it works without a hitch.
Comment 26 Jason Cox (RETIRED) gentoo-dev 2004-04-16 21:20:52 UTC
I think I fixed this. Please try the new lufs-0.9.7-r1 ebuild. If that errors, please reopen this bug.
Comment 27 ishman 2004-05-15 13:10:27 UTC
How do you install the patch, I get the same error as in #18.

I copied the ebuild to /usr/portage/ and /usr/portage/usr/lufs/lufs-0.9.7-r1/ 

And then did an ebuild /usr/portage/lufs-0.9.7-r1.ebuild digest
And then a merge and I get the gcc error.