sys-cluster/pvfs2-2.7.1 fails to build when there is no .config in /usr/src/linux even when KBUILD_OUTPUT is set in /etc/make.conf step to reproduce results Reproducible: Always Steps to Reproduce: 1) USE="symlink" emerge gentoo-sources 2) insert a line in the format 'KBUILD_OUTPUT="/home/user/tmp/gentoo-2.6.24-r8"' in /etc/make.conf 3) build a kernel in /home/user/tmp/gentoo-2.6.24-r8 4) emerge pvfs2 Actual Results: pvfs2 does no build citing a missing kernel config. Expected Results: pvfs2 should build and install This is a problem with the ebuild not passing the value of KBUILD_OUTPUT to pvfs2s ./configure . My tests suggest that passing the argument '--with-kernel=$KBUILD_OUTPUT' would cause pvfs2 to build/install correctly. I'll work on an ebuild in a bit
Created attachment 154425 [details] New ebuild Added conditionals by JamesB192 then fixed the conditionals with the significant help of technicalpickles
Actually I use pmerge (sys-apps/pkgcore-0.4.7.2) Portage 2.1.4.4 (hardened/x86/2.6, gcc-4.2.4, glibc-2.6.1-r0, 2.6.24-gentoo-r8-prescott-splat i686) ================================================================= System uname: 2.6.24-gentoo-r8-prescott-splat i686 Intel(R) Celeron(R) CPU 2.66GHz Timestamp of tree: Tue, 27 May 2008 01:16:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13, 2.5.2-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 9999 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium2 -mtune=prescott -O2 -pipe -g -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=pentium2 -mtune=prescott -O2 -pipe -g -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="candy ccache distlocks metadata-transfer nostrip parallel-fetch sandbox severe sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://mirror.usu.edu/mirrors/gentoo/ ftp://ftp.wwc.edu/pub/mirrors/ftp.gentoo.org " PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/openrc /usr/portage/local/jamesb /usr/portage/local/upstart-overlay" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa arts artworkextra avahi berkdb branding bzip2 cddb cdr cdrom cgi cracklib crypt curl dbus debug debug-freelist debug-malloc debugger dga dmi double-precision dri dvd dvdr dvdread dvi eds examples exif exiv2 fam ffmpeg flac freeimage fuse gcc64 gcj gdbm gif glibc-compat20 glitz gnome gnome-print gnomecanvas gnomedb gnustep gnutls gpm gtk gtk2 gtkhtml gtkspell hal hardened ipv6 java javascript jpeg jpeg2k kdrive kerberos lcms ldap logrotate mad midi mikmod mmx motif mp3 mp4 mpeg mpeg2 msn msnextras nautilus ncurses net nls nntp nptl nptlonly numeric objhc offensive ogg opengl openssl oscar pampam_chroot pam_timestamp pango paste64 patch pda pdf perl pic pie pmu png python qt3 qt3support qt4 quicktime quotas rdesktop readline real rogue sdl slp spell sse sse2 ssl svg sysfs t1lib tcl tcpd theora threads threadsafe threadsonly tiff tk truetype truetype-fonts urandom usb utempter v4l v4l2 vorbis win32codecs winpopup x86 xcomposite xinerama xorg yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev i810 radeon trident v4l vesa vga" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS and now 'pmerge'ing I get the following error ::snip:: make -C /usr/src/linux-2.6.24-gentoo-r8 O=/home/jamesb/tmp/gentoo-r8-prescott-splat modules CC [M] /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.o In file included from /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.c:7: /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-kernel.h:1277: error: conflicting types for 'kzalloc' /usr/src/linux-2.6.24-gentoo-r8/include/linux/slab.h:270: error: previous definition of 'kzalloc' was here /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.c: In function `pvfs2_inode_removexattr': /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.c:1000: error: `XATTR_REPLACE' undeclared (first use in this function) /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.c:1000: error: (Each undeclared identifier is reported only once /var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.c:1000: error: for each function it appears in.) make[5]: *** [/var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6/pvfs2-utils.o] Error 1 make[4]: *** [_module_/var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/work/pvfs-2.7.1/src/kernel/linux-2.6] Error 2 make[3]: *** [sub-make] Error 2 make[2]: *** [all] Error 2 make[1]: *** [default] Error 2 make: *** [just_kmod] Error 2 * * ERROR: sys-cluster/pvfs2-2.7.1-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3676: Called linux-mod_src_compile * environment, line 2895: Called die * The specific snippet of code: * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CC=\"$(get-KERNEL_CC)\" LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"; * The die message: * Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS= just_kmod * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-cluster/pvfs2-2.7.1-r1/temp/environment'. * ::snip:: which look like an upstream bug. ::sigh::
The new ebuild (see previous attachment) works provided '/etc/make.conf's KBUILD_OUTPUT points to a properly prepared linux source and build tree. It should also work for people who don't set that variable, but I have not tested it. It is past my modest abilties to make it work when KBUILD_OUTPUT points to a properly configure linux build tree sans source. This can probably have its status changed.
Created attachment 154539 [details] pvfs2-2.7.1-r1.ebuild Can you try this ebuild instead? I think we should be using KV_OUT_DIR in this ebuild which pretty much does what you're doing with the if statements. I'll play with the build error in a bit, but let me know if the new ebuild works so we can at least get that in the tree? Thanks
Yes, it works great, it's also probably how I might have implemented it if I knew what (the heck) I was doing.
(In reply to comment #5) > Yes, it works great, it's also probably how I might have implemented it if I > knew what (the heck) I was doing. > Well I implemented it wrong first :) This fix has been committed to the tree without a revbump as it won't affect anyone who already have pvfs2 installed. For your other problem, the issue can be blamed on you building out of the kernel tree again. Pvfs2 uses the m4 macros in maint/config/kernel.m4 to deal with the moving internal API of the kernel. This works well enough typically until someone starts using KBUILD_OUTPUT. I asked Daniel Drake for advice, and basically the best way to fix this is to go through the check in kernel.m4, figure out which version of the kernel they were implemented in, and use the preprocessor instead of the macros to deal with this stuff (not too bad if you know the versions as this code is already wrapped in preprocessor statements). If you're ambitious, this is probably a good project and something I'll try to eventually get around to myself if no one else does it. Until then, KBUILD_OUTPUT isn't going to work with pvfs2. If you have less ambition than the above, but want a fix soon, you could report this to upstream via their users mailing list :)
saw this when I ran 'emerge -pv pvfs2' checked my old bug tracker entries. Since pvfs2 is going away today I'll preemptively close this. The following mask changes are necessary to proceed: #required by pvfs2 (argument) # /Daemon/packager/portage/tree/profiles/package.mask: # Justin Bronder <jsbronder@gentoo.org> (09 May 2011) # # Out of tree kernel module and upstream does not closely # track kernel release (current 2.8.2 only supports up to # 2.6.32). There are alternatives already accepted in # the kernel such as Ceph or OCFS2. (#337374) # # Removal on 2011-07-09 >=sys-cluster/pvfs2-2.7.1-r1