# can not compile loop-aes-3.6b

## pine5514

hi,

I'm useing gentoo on kernel 3.2.1-gentoo-r2 and want to install loop-aes but got the following error.

```

emerge sys-fs/loop-aes

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

 * Last emerge --sync was 11d 1h 11m 27s ago.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-fs/loop-aes-3.6b

 * loop-AES-v3.6b.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                             [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.2.1-gentoo-r2/build

 * Found sources for kernel version:

 *     3.2.1-gentoo-r2

>>> Unpacking source...

>>> Unpacking loop-AES-v3.6b.tar.bz2 to /var/tmp/portage/sys-fs/loop-aes-3.6b/work

>>> Source unpacked in /var/tmp/portage/sys-fs/loop-aes-3.6b/work

>>> Preparing source in /var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b ...

ln: failed to create symbolic link `Module.symvers': File exists

 * Preparing loop module

make HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' LINUX_SOURCE=/usr/src/linux KBUILD_OUTPUT= USE_KBUILD=y MODINST=n RUNDM=n 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.c-3.2.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.c ../md5.c .

echo 'loop-y:=patched-loop.o glue.o aes.o md5.o' >>tmp-d-kbuild/Makefile

echo 'CFLAGS_aes.o := -DDATA_ALWAYS_ALIGNED=1' >>tmp-d-kbuild/Makefile

echo 'EXTRA_CFLAGS:= ' >>tmp-d-kbuild/Makefile

cd /usr/src/linux && make SUBDIRS=/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b/tmp-d-kbuild modules 

make[1]: Entering directory `/usr/src/linux-3.2.1-gentoo-r2'

make[2]: *** No rule to make target `/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b/tmp-d-kbuild/patched-loop.c', needed by `/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b/tmp-d-kbuild/patched-loop.o'.  Stop.

make[1]: *** [_module_/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b/tmp-d-kbuild] Error 2

make[1]: Leaving directory `/usr/src/linux-3.2.1-gentoo-r2'

make: *** [all] Error 2

emake failed

 * ERROR: sys-fs/loop-aes-3.6b failed (compile phase):

 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=-m elf_x86_64         LINUX_SOURCE="/usr/src/linux"       KBUILD_OUTPUT=""       USE_KBUILD=y MODINST=n RUNDM=n all

 * 

 * Call stack:

 *     ebuild.sh, line   85:  Called src_compile

 *   environment, line 2894:  Called linux-mod_src_compile

 *   environment, line 2155:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                   CROSS_COMPILE=${CHOST}-             LDFLAGS=\"$(get_abi_LDFLAGS)\"                   ${BUILD_FIXES}                   ${BUILD_PARAMS}       ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 * 

 * If you need support, post the output of 'emerge --info =sys-fs/loop-aes-3.6b',

 * the complete build log and the output of 'emerge -pqv =sys-fs/loop-aes-3.6b'.

 * The complete build log is located at '/var/tmp/portage/sys-fs/loop-aes-3.6b/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/loop-aes-3.6b/temp/environment'.

 * S: '/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b'

>>> Failed to emerge sys-fs/loop-aes-3.6b, Log file:

>>>  '/var/tmp/portage/sys-fs/loop-aes-3.6b/temp/build.log'

 * Messages for package sys-fs/loop-aes-3.6b:

 * ERROR: sys-fs/loop-aes-3.6b failed (compile phase):

 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=-m elf_x86_64         LINUX_SOURCE="/usr/src/linux"       KBUILD_OUTPUT=""       USE_KBUILD=y MODINST=n RUNDM=n all

 * 

 * Call stack:

 *     ebuild.sh, line   85:  Called src_compile

 *   environment, line 2894:  Called linux-mod_src_compile

 *   environment, line 2155:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                   CROSS_COMPILE=${CHOST}-             LDFLAGS=\"$(get_abi_LDFLAGS)\"                   ${BUILD_FIXES}                   ${BUILD_PARAMS}       ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 * 

 * If you need support, post the output of 'emerge --info =sys-fs/loop-aes-3.6b',

 * the complete build log and the output of 'emerge -pqv =sys-fs/loop-aes-3.6b'.

 * The complete build log is located at '/var/tmp/portage/sys-fs/loop-aes-3.6b/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/loop-aes-3.6b/temp/environment'.

 * S: '/var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b'

```

it seems that there is a problem with my kernel version...

loop-eas also created broken symlink named patched-loop.c to ../loop.c-3.2.patched file in   /var/tmp/portage/sys-fs/loop-aes-3.6b/work/loop-AES-v3.6b/tmp-d-kbuild/. I don't konw why loop.c-3.2.patched file is missing!

any help/idea will be appreciated.

----------

## Hu

Why do you want to install loop-aes?  There are better alternatives for new installations.

According to the ChangeLog of sys-fs/loop-aes, you need a newer version to compile with a 3.2 kernel.

----------

## tuber

I had a similar problem (see https://forums.gentoo.org/viewtopic-t-911100-highlight-loopaes.html) I ended up going with 3.6e.

----------

## pine5514

 *Hu wrote:*   

> Why do you want to install loop-aes?  There are better alternatives for new installations.
> 
> .

 

loop-aes is faster than Cryptoloop. but Loop-AES explicitly prohibits use of journaling filesystem and looking for good alternative !

 *tuber wrote:*   

> I had a similar problem (see https://forums.gentoo.org/viewtopic-t-911100-highlight-loopaes.html) I ended up going with 3.6e.

 

TNX, using  3.6e version fixed my problem ..  :Very Happy: 

----------

## tuber

 *Quote:*   

> but Loop-AES explicitly prohibits use of journaling filesystem

  That's not quite true. You can't use a journaling filesystem on top of a file backed loop device, but you can with a device backed loop device. See section 2.2 of the README: 

```
Don't use a journaling file system on top of file backed loop device. Device

backed loop device can be used with journaling file systems...
```

----------

