Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547182 - sys-fs/loop-aes-3.7c :make error (kernel 4.0)
Summary: sys-fs/loop-aes-3.7c :make error (kernel 4.0)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-20 12:46 UTC by Toralf Förster
Modified: 2015-05-06 19:58 UTC (History)
2 users (show)

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


Attachments
emerge log (sys-fs-loop-aes-3.7c-20150420-122659.log,4.04 KB, text/plain)
2015-04-20 12:46 UTC, Toralf Förster
Details
Modified loop-aes ebuild to add support for 4.0.x kernels. (loop-aes-3.7c-r1.ebuild,2.33 KB, text/plain)
2015-05-06 18:17 UTC, Hank Leininger
Details
Patch needed for loop-aes-3.7c on 4.0.x kernels (kernel-4.0.patch,405 bytes, patch)
2015-05-06 18:18 UTC, Hank Leininger
Details | Diff
Diff of ebuild changes (loop-aes-3.7c.ebuild-linux-4.0.x.patch,372 bytes, patch)
2015-05-06 19:00 UTC, Hank Leininger
Details | Diff
loop-aes-3.7c-linux4.patch (loop-aes-3.7c-linux4.patch,1.19 KB, patch)
2015-05-06 19:56 UTC, Alon Bar-Lev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-04-20 12:46:29 UTC
Created attachment 401666 [details]
emerge log

* Package:    sys-fs/loop-aes-3.7c
 * Repository: gentoo
 * Maintainer: crypto@gentoo.org
 * USE:        abi_x86_64 amd64 cpu_flags_x86_aes elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.0.0-gentoo/build
 * Found sources for kernel version:
 *     4.0.0-gentoo
>>> Unpacking source...
>>> Unpacking loop-AES-v3.7c.tar.bz2 to /var/tmp/portage/sys-fs/loop-aes-3.7c/work
>>> Source unpacked in /var/tmp/portage/sys-fs/loop-aes-3.7c/work
>>> Preparing source in /var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c ...
ln: failed to create symbolic link ‘Module.symvers’: File exists
 * Preparing loop module
make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' V=1 LINUX_SOURCE=/usr/src/linux KBUILD_OUTPUT= USE_KBUILD=y MODINST=n RUNDM=n INTELAES=y all 
rm -r -f *.ko tmp-d-kbuild 
mkdir tmp-d-kbuild
echo 'obj-m:=' >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../loop-h-version.h ../loop.h-4.x.patched .
cd tmp-d-kbuild && ln -s ../loop.c-4.x.patched patched-loop.c && ln -s ../glue.c ../aes.h ../md5.h .
echo 'obj-m += loop.o' >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../aes-amd64.S ../md5-amd64.S ../md5-2x-amd64.S .
echo 'loop-y:=patched-loop.o glue.o aes-amd64.o md5-amd64.o md5-2x-amd64.o' >>tmp-d-kbuild/Makefile
cd tmp-d-kbuild && ln -s ../aes-intel64.S .
echo 'loop-y += aes-intel64.o' >>tmp-d-kbuild/Makefile
echo 'ccflags-y:=  -DAMD64_ASM -DCONFIG_BLK_DEV_LOOP_INTELAES=1' >>tmp-d-kbuild/Makefile
echo 'ccflags-m:=  -DAMD64_ASM -DCONFIG_BLK_DEV_LOOP_INTELAES=1' >>tmp-d-kbuild/Makefile
cd /usr/src/linux && make SUBDIRS=/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild modules 
make[1]: Entering directory '/usr/src/linux-4.0.0-gentoo'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo >&2 ;							\
/bin/false)
mkdir -p /var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild/.tmp_versions ; rm -f /var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild
make[2]: *** No rule to make target '/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild/patched-loop.c', needed by '/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild/patched-loop.o'.  Stop.
Makefile:1390: recipe for target '_module_/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild' failed
make[1]: *** [_module_/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c/tmp-d-kbuild] Error 2
make[1]: Leaving directory '/usr/src/linux-4.0.0-gentoo'
Makefile:222: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: sys-fs/loop-aes-3.7c::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-fs/loop-aes-3.7c::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/loop-aes-3.7c::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-fs:loop-aes-3.7c:20150420-122659.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-fs/loop-aes-3.7c/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/loop-aes-3.7c/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c'
 * S: '/var/tmp/portage/sys-fs/loop-aes-3.7c/work/loop-AES-v3.7c'

 * GNU info directory index is up-to-date.

The log is stored in /var/log/portage/_emerge_20150420-142705.log.
quick search: https://bugs.gentoo.org/buglist.cgi?quicksearch=sys-fs%2Floop-aes
Maintainer :  crypto@gentoo.org
maintainer : 
herd       : crypto

This is an unstable amd64 chroot image (named amd64-unstable-libtool_20150416) at a hardened host acting as a tinderbox.

Portage 2.2.18 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.2, glibc-2.20-r2, 3.19.4-hardened x86_64)
=================================================================
System uname: Linux-3.19.4-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16164756 total,   2717276 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 20 Apr 2015 11:30:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           3.2.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.8.4::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

toralf
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /opt/openfire/resources/security/ /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/i2pd/certificates"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --tree --quiet-build --jobs 1"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aes-ni alsa amd64 apache2 avx avx2 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit corefonts cracklib crypt cups cxx dbus declarative designer dnssec dot dri drmkms dts dvd dvdr ecc emboss encode exif extraengine fam ffmpeg firefox flac fontconfig fortran fpm gd gdbm gif glamor gpm gtk gudev gui iconv icu isag jadetex jpeg kde kipi kvm lapack lcms libkms libnotify libvirtd logrotate mad mbox minizip mmx mmxext mng modules mp3 mp4 mpeg multilib mysql ncurses nls nptl ogg opengl openmp openssl pam pango pax_kernel pcre pcre16 pdf phonon plasma png policykit ppds pwquality python qemu qt3support qt4 readline scrpyt sdl session spell spice sqlite sse sse2 sse4 sse4_1 sse4_2 ssh-askpass ssl ssse3 startup-notification svg tcpd theora thinkpad threads tiff tk tls truetype udev udisks uml unicode upower usb usbredir uxa v4l v4l2 video vorbis wxwidgets x264 xa xcb xcomposite xinerama xkb xml xmp xscreensaver xslt xv xvfb xvid xvmc zenmap zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom  oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Hank Leininger 2015-05-06 18:17:04 UTC
I encountered this too; pinged the loop-aes author who promptly replied.

The loop-aes code still works with kernel 4.0.x, but because the build process keys off the kernel major version, some tweaks are needed.  I'll attach a modified .ebuild and .patch file that make loop-aes usable for me on a system with sys-kernel/gentoo-sources-4.0.1
Comment 2 Hank Leininger 2015-05-06 18:17:53 UTC
Created attachment 402770 [details]
Modified loop-aes ebuild to add support for 4.0.x kernels.
Comment 3 Hank Leininger 2015-05-06 18:18:43 UTC
Created attachment 402772 [details, diff]
Patch needed for loop-aes-3.7c on 4.0.x kernels
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2015-05-06 18:18:57 UTC
Thanks!
Next time, please submit only diffs.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2015-05-06 18:24:46 UTC
can you please try symlink instead of copy?
Comment 6 Hank Leininger 2015-05-06 19:00:04 UTC
Created attachment 402774 [details, diff]
Diff of ebuild changes

Diff of the existing ebuild instead of a new ebuild.
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2015-05-06 19:01:41 UTC
thanks!

is symlink works?

if it does, we can add it to the diff and avoid doing so in the ebuild.
Comment 8 Hank Leininger 2015-05-06 19:46:06 UTC
> is symlink works?

I tried using ln -s instead of cp in sys_prepare, works fine.

> if it does, we can add it to the diff and avoid doing so in the ebuild.

Not sure what you mean by this, do you mean patching the Makefile and various .c and .h files so the logic doesn't have to be in the ebuild?  No reason that couldn't work, but sounds like inviting errors for something that is currently pretty straightforward (and follows upstream's recommendation)...?
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2015-05-06 19:56:29 UTC
Created attachment 402784 [details, diff]
loop-aes-3.7c-linux4.patch

I mean this.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2015-05-06 19:58:35 UTC
I updated loop-aes-3.7c.
thanks!