>>> [1m [37mcfg-update-1.8.2-r1 [0m [0m: Creating checksum index... [32;01m* [0m Determining the location of the kernel source code [32;01m* [0m Found kernel source directory: [32;01m* [0m /usr/src/linux [32;01m* [0m Found kernel object directory: [32;01m* [0m /lib/modules/2.6.25-gentoo-r7/build [32;01m* [0m Found sources for kernel version: [32;01m* [0m 2.6.25-gentoo-r7 [32;01m* [0m Checking for suitable kernel configuration options... [A [182C [34;01m[ [32;01mok [34;01m ] [0m [32;01m* [0m Checking for suitable kernel configuration options... [A [182C [34;01m[ [32;01mok [34;01m ] [0m >>> Unpacking source... >>> Unpacking vhba-module-1.1.0.tar.bz2 to /var/tmp/portage/sys-fs/vhba-1.1.0/work >>> Source unpacked. >>> Compiling source in /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0 ... [32;01m* [0m Preparing vhba module make -C /lib/modules/`uname -r`/build M=/var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0 clean kat/kat /lib/modules/`uname -r`/build kernel.api.h kat/have_scsi_macros.c kat/scatterlist_has_page.c make -C /lib/modules/`uname -r`/build M=/var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0 modules KAT will test if C compiler works...ok Checking kat/have_scsi_macros.c... make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. true make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7' rm -fr vhba-module-1.1.0 kernel.api.h Checking kat/scatterlist_has_page.c... false CC [M] /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.o /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c: In function 'do_request': /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:429: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:429: error: 'struct scsi_cmnd' has no member named 'use_sg' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:441: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:446: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:446: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:458: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:472: error: 'struct scsi_cmnd' has no member named 'request_buffer' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c: In function 'do_response': /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:484: error: 'struct scsi_cmnd' has no member named 'use_sg' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:509: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:521: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:523: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:524: error: 'struct scsi_cmnd' has no member named 'request_bufflen' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:533: error: 'struct scsi_cmnd' has no member named 'use_sg' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:541: error: 'struct scsi_cmnd' has no member named 'request_buffer' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:555: error: 'struct scsi_cmnd' has no member named 'use_sg' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:590: error: 'struct scsi_cmnd' has no member named 'request_buffer' /var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.c:600: error: 'struct scsi_cmnd' has no member named 'resid' make[2]: *** [/var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0/vhba.o] Error 1 make[1]: *** [_module_/var/tmp/portage/sys-fs/vhba-1.1.0/work/vhba-module-1.1.0] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7' make: *** [modules] Error 2 [31;01m* [0m ERROR: sys-fs/vhba-1.1.0 failed. [31;01m* [0m Call stack: [31;01m* [0m ebuild.sh, line 49: Called src_compile [31;01m* [0m environment, line 3188: Called linux-mod_src_compile [31;01m* [0m environment, line 2446: Called die [31;01m* [0m The specific snippet of code: [31;01m* [0m 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}"; [31;01m* [0m The die message: [31;01m* [0m Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CC=x86_64-pc-linux-gnu-gcc LDFLAGS= KERNELDIR=/usr/src/linux clean all [31;01m* [0m If you need support, post the topmost build error, and the call stack if relevant. [31;01m* [0m A complete build log is located at '/var/tmp/portage/sys-fs/vhba-1.1.0/temp/build.log'. [31;01m* [0m The ebuild environment file is located at '/var/tmp/portage/sys-fs/vhba-1.1.0/temp/environment'. Reproducible: Always
Please post your `emerge --info' too.
$ sudo emerge emerge --info Password: WARNING: repository at /usr/local/portage/layman/oss-overlay is missing a repo_name entry Portage 2.2_rc6 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.25-gentoo-r7-x86_64-Intel-R-_Xeon-R-_CPU_E3110_@_3.00GHz-with-glibc2.2.5 Timestamp of tree: Mon, 04 Aug 2008 17:45:01 +0000 app-shells/bash: 3.2_p39 dev-lang/python: 2.5.2-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.62-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://de-mirror.org/distro/gentoo/ " LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j3" 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/local/portage/layman/oss-overlay" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X acl acpi amd64 berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread eds emboss encode evo fam firefox flac fortran gdbm gif gpm hal iconv isdnlog jpeg kde kerberos ldap mad midi mikmod mmx mp3 mpeg mudflap multilib music ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg symlink sysfs tcpd tiff truetype unicode usb vorbis wav wavpack xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
vhba-1.1.0 build fails at x86 on 2.6.25-gentoo-r7 -kernel too. It seems though, that some or all of errors are fixed on dev svn. vhba.c (currently r395) has a log entry at r295 about this issue. Hope they'll release a new version soon. :)
I have now compiled the vhba-module taken directly from svn trunk at r395 (via sf.net www-interface). It ("virtually") compiles with 1.1.0 -ebuild; only changed things as I was lazy, were S-path (${WORKDIR}/vhba-module-${PV} -> ${WORKDIR}/vhba-module), SRC_URI's tarball compression (.bz2 -> .gz) and executing chmod u+x ${S}/kat/kat since it hadn't x-bit at that snapshot. Haven't tried, if the module actually works... Also, I have no slightest idea, what revision of vhba-module is in 1.1.0 -release. Probably the things i checked for my last post were entirely wrong, and that the svn log is sane.
While taking a close look at the build-process I wondered where the following line comes from: rm -fr vhba-module-1.1.0 kernel.api.h The ebuild invokes make clean and make parallel so the needed file kernel.api.h is deleted while compiling vhba.c. This may result in the errors seen above or just a missing header-file kernel.api.h. The problem could be solved by removing the "CLEAN"-target from BUILD_TARGETS which leads to leaving out the clean-process. The resolution should be to invoke both processes after each other but I dont know how to do that because I dont have any experience with creating ebuilds ;) So, this patch would work but isnt really nais: --- vhba-1.1.0.ebuild 2008-08-13 16:46:09.000000000 +0000 +++ vhba-1.1.0-r1.ebuild 2008-08-13 16:45:57.000000000 +0000 @@ -18,7 +18,7 @@ S="${WORKDIR}/vhba-module-${PV}" MODULE_NAMES="vhba(block:${S})" -BUILD_TARGETS="clean all" +BUILD_TARGETS="all" pkg_setup() { CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
I have the same problem, though i noticed that it sometimes is able to compile without problems.
(In reply to comment #6) > I have the same problem, though i noticed that it sometimes is able to compile > without problems. > Now it seems to compile for me too. Whatever anyone did, it worked. Thanks for whatever you did. ;-)
This bug is still relevant. It won't compile for me. Suspending the process, backing kernel.api.h and writing it back after it gets deleted allows for successful compilation tho.
Same problem here. Ripping the "clean" target allowed me to compile it without problems, it seems.
Why hasn't this been fixed yet? It's simple. Just add a patch to the ebuild that removes the clean target.
Even then, it doesn't work *always*. It seems to work sometimes and not some others. It's some kind of race condition. If it fails, just run emerge again until it works. It's actually what I do each time I have to recompile against a newer kernel.
clean target removed in cvs, even though it is not a permanent solution.
Error returns on gentoo-sources-2.6.28
Created attachment 183518 [details, diff] Patch for 2.6.28 kernel (maybe 2.6.27 too)
Thanks, but almost all hunks seem to fail for me :(
That should be fixed with the vhba-1.2.1 I just put in the tree. Please test and reopen if problem still persists.
Created attachment 184940 [details] Build log 1.2.1 still fails for me. Build log attached gentoo-sources 2.6.28-r3, AMD64, GCC 4.3.2 Can't reopen bug myself
Hmm, damn...
Whoops. After a Reboot (rarely do that) all seems to work fine. Is it possible that the build needs the running kernel to be the same it is built for? Sorry for bothering you :(
(In reply to comment #19) > Whoops. > After a Reboot (rarely do that) all seems to work fine. Is it possible that the > build needs the running kernel to be the same it is built for? > Of course. After all vhba is a kernel module, you can't expect to modprobe correctly a module compiled for -let's say- 2.6.26 or a running 2.6.28 kernel.
@i92guboj: The issue wasn't that the module could not be loaded, but that it could not be built. @haarp: The problem seems to lie within the kernel checks the Makefile does: it compiles stuff and checks whether they run/compile cleanly. This seems to happen using the headers from the running kernel, while the module itself will be built for the kernel the /usr/src/linux symlink is pointing to. So, according to your log both tests failed, but at least the scatterlist-attribute for the struct should be available on 2.6.28 kernels. So, which kernel did you run before rebooting?
(In reply to comment #21) > @haarp: The problem seems to lie within the kernel checks the Makefile does: it > compiles stuff and checks whether they run/compile cleanly. This seems to > happen using the headers from the running kernel, while the module itself will > be built for the kernel the /usr/src/linux symlink is pointing to. So, > according to your log both tests failed, but at least the scatterlist-attribute > for the struct should be available on 2.6.28 kernels. So, which kernel did you > run before rebooting? > I am certain that it was a 2.6.28 series kernel with gentoo patches. Most probably -r2, maybe -r1 Thanks for investigating this btw.
(In reply to comment #21) > @haarp: The problem seems to lie within the kernel checks the Makefile does: it > compiles stuff and checks whether they run/compile cleanly. This seems to > happen using the headers from the running kernel, while the module itself will > be built for the kernel the /usr/src/linux symlink is pointing to. Adding kat/Makefile to the sed in src_prepare lets the tests run against the proper kernel sources. diff -u /usr/portage/sys-fs/vhba/vhba-1.2.1.ebuild vhba-1.2.1.ebuild --- /usr/portage/sys-fs/vhba/vhba-1.2.1.ebuild 2009-04-05 03:08:24.000000000 -0500 +++ vhba-1.2.1.ebuild 2009-06-04 13:00:21.395479958 -0500 @@ -33,7 +33,7 @@ epatch "${FILESDIR}/${PV}-parallel_build.patch" sed -i \ -e "s:/lib/modules/\$(KERNELRELEASE)/build:${KERNEL_DIR}:g" \ - Makefile || die "sed failed" + kat/Makefile Makefile || die "sed failed" } src_install() {
(In reply to comment #23) > Adding kat/Makefile to the sed in src_prepare lets the tests run against the > proper kernel sources. > > diff -u /usr/portage/sys-fs/vhba/vhba-1.2.1.ebuild vhba-1.2.1.ebuild > --- /usr/portage/sys-fs/vhba/vhba-1.2.1.ebuild 2009-04-05 03:08:24.000000000 > -0500 > +++ vhba-1.2.1.ebuild 2009-06-04 13:00:21.395479958 -0500 > @@ -33,7 +33,7 @@ > epatch "${FILESDIR}/${PV}-parallel_build.patch" > sed -i \ > -e "s:/lib/modules/\$(KERNELRELEASE)/build:${KERNEL_DIR}:g" \ > - Makefile || die "sed failed" > + kat/Makefile Makefile || die "sed failed" > } > > src_install() { > This work-around did the job for me when installing vhba-1.2.1 with linux-2.6.29-gentoo-r5. What's strange is that i had installed vhba-1.2.1 with the same kernel just two days ago without a hitch. Today i rebuilt the kernel to personalize the boot splash image and make some inbuilt options as modules. after vhba then failed i did a distclean and used the original config from the other day, but vhba still failed. gremlins.
I just upgraded from 2.6.30-gentoo-r4 to r5 and now I encounter this bug again.
Created attachment 203683 [details, diff] Patch Makefile to allow specifying a kernel directory This Makefile patch allows to specify a kernel directory. Ebuild also has to be changed.
Created attachment 203684 [details] Updated ebuild to work with above patch With the above patch and this ebuild, vhba compiles properly if the kernel dir of the running kernel does not exist (e.g. in a chroot).
Thanks Ambroz for the patch. I committed a shorter variant of it to the tree since I was finally able to reproduce the problem.
Created attachment 215579 [details, diff] makes vhba happy with 2.6.33 kernel autoconf.h isn't in include/linux kernel directory anymore