When trying to emerge bestcrypt the compile stage returns the error: i686-pc-linux-gnu-gcc -c -D__KERNEL__ -DMODULE -I/usr/src/linux/include/asm/mach-default/ -D_NEED_THIS_MODULE -I/var/tmp/portage/bestcrypt-1.6_p5/work/bcrypt/mod/../include/ -I/usr/src/linux/include/ -march=pentium4 -O3 -pipe -mmmx -msse -msse2 -fomit-frame-pointer -fno-stack-protector-all -fno-stack-protector -DKBUILD_BASENAME=\"BestCrypt\" -DKBUILD_MODNAME=\"bc\" -D_KBUILD_QUOTES -o bc_dev26.o bc_dev26.c cc1: error: unrecognized command line option "-fno-stack-protector-all" make: *** [bc_dev26.o] Error 1 make: Leaving directory `/var/tmp/portage/bestcrypt-1.6_p5/work/bcrypt/mod' !!! ERROR: app-crypt/bestcrypt-1.6_p5 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile bestcrypt-1.6_p5.ebuild, line 66: Called die !!! compile failed !!! If you need support, post the topmost build error, and the call stack if relevant. I remebered reading in forums that stack-protectors have changed in gcc-4.1.1 so changing the ebuild to: # Don't put stack protection in the kernel - it just is bad - append-flags -fno-stack-protector-all -fno-stack-protector + append-flags -fno-stack-protector allows it to at least compile cleanly. Testing the new module has so far not thrown up any errors. FWIW my config is: # emerge --info Portage 2.1 (default-linux/x86/2005.1, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r7 i686) ================================================================= System uname: 2.6.16-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -mmmx -msse -msse2 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/mail/dspam /usr/NX/etc /usr/NX/home /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/run/dspam" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.iinet.net.au/pub/Gentoo/ " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/nx /usr/portage/local/layman/vmware" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="x86 X a52 aalib acpi alsa amarok amd apache2 apm arts asf avi bash-completion berkdb bidi bitmap-fonts bluetooth bzip2 cdda cddb cdio cdparanoia cdr cdrom cgi cli commercial crypt css cups curl dba dbus directfb divx4linux dlloader dri dts dvd dvdr dvdread eds encode esd examples exif expat fam fastcgi fat fbcon fbdev ffmpeg fglrx firefox flac fltk foomaticdb fortran freetype ftp gd gif glut gmail gmailtimestamps gmp gnome gnutls gpgme gpm gstreamer gtk gtk2 hal hardenedphp hpn httpd idn ieee1394 imagemagick imlib irmc isdnlog jack java javascript jikes jit jpeg jpg junit kde kdehiddenvisibility kernel_linux lcms libcaca libclamav libg++ libwww linguas-en_gb live lm_sensors logitech-mouse lzo mad mailbox maildir matroska mhash mjpeg mmx mmx2 mmxext mono motif mozilla mp3 mpeg mpeg2 mpeg4 mplayer mysql nas ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis opengl openssh openssl oss pam pam-mysql pcre pdflib pear perl php pic png pppd procmail python qt quicktime readline real reflection reiserfs ruby samba scp sdk sdl session sftp slang snmp snortsame spell spl sse sse2 ssl stream subtitles svg svga tcltk tcpd theora tiff truetype truetype-fonts type1 type1-fonts udev unicode usb userland_GNU vcd vhosts video_cards_nvidia vlm vorbis win32codecs wma wxwindows xine xinerama xml xml2 xmms xorg xprint xscreensaver xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
FWIW... so far 4 days of pretty solid testing with 2.6.16-gentoo-r7 and the slightly modified ebuild in #1 has not turned up any problems *at all*. Container creation with all algorithms works perfectly. Hidden containers work. Mounting, umounting and fsck after a forced unmount work as expected. Multiple containers have been mounted at the same time. Mount after a trialled power failure recovered as would be expected. All other ancillary functions work as expected. Alot of data has been copied in and out and between containers without any loss. Containers in files plus block devices on HDD and removable media (LS-120) have been tested. I am now going back to normal light use.
I did it slightly differently to maintain compatibility with gcc-3* users. I needed to remove -Werror from the CFLAGS for the kgsha{,256} directories otherwise I got the following warnings (treated as errors). Hopefully there is no effect with this. >>> Unpacking BestCrypt-1.6-5.tar.gz to /var/tmp/portage/bestcrypt-1.6_p5/work >>> Unpacking bcrypt-rc6-serpent.diff.gz to /var/tmp/portage/bestcrypt-1.6_p5/work * Applying bestcrypt-1.6_p5-makefile_fix.patch ... [ ok ] * Applying bestcrypt-1.6_p5-gcc41.patch ... [ ok ] * Applying bestcrypt-1.6_p2-path.patch ... [ ok ] * Applying bcrypt-rc6-serpent.diff ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/bestcrypt-1.6_p5/work/bcrypt ... make: Entering directory `/var/tmp/portage/bestcrypt-1.6_p5/work/bcrypt/kgsha' i686-pc-linux-gnu-g++ -fPIC -Wall -fno-strength-reduce -I../include -g [cut] i686-pc-linux-gnu-g++ -fPIC -Wall -fno-strength-reduce -I../include -g -march=athlon-xp -O2 -pipe -c -o random.o random.cpp random.cpp: In function 'void SHA1RandomUpdate(sSHA1Random*, byte*, int)': random.cpp:32: warning: dereferencing type-punned pointer will break strict-aliasing rules random.cpp:42: warning: dereferencing type-punned pointer will break strict-aliasing rules random.cpp: In function 'void SHA1RandomUpdateEx(sSHA1Random*, byte*, int)': random.cpp:57: warning: dereferencing type-punned pointer will break strict-aliasing rules random.cpp:66: warning: dereferencing type-punned pointer will break strict-aliasing rules random.cpp: In function 'void SHA1RandomReGenerate(sSHA1Random*)': random.cpp:78: warning: dereferencing type-punned pointer will break strict-aliasing rules random.cpp:86: warning: dereferencing type-punned pointer will break strict-aliasing rules sha1.cpp: In function 'int SHA1MakeDigest(byte*, int, byte*)': [cut] sha256.cpp: In function 'int SHA256_MakeDigest(byte*, int, byte*)': sha256.cpp:415: warning: dereferencing type-punned pointer will break strict-aliasing rules sha256.cpp:420: warning: dereferencing type-punned pointer will break strict-aliasing rules sha256.cpp:425: warning: dereferencing type-punned pointer will break strict-aliasing rules sha256.cpp:430: warning: dereferencing type-punned pointer will break strict-aliasing rules sha256.cpp:434: warning: dereferencing type-punned pointer will break [cut] bcmount.c: In function 'bcmount': bcmount.c:261: warning: pointer targets in passing argument 9 of 'CreateKeyHandleEx' differ in signedness bcpasswd.c: In function 'bcpasswd': bcpasswd.c:122: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness bcpasswd.c: In function 'bcpasswd_add': bcpasswd.c:247: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness bcpasswd.c: In function 'bcpasswd_del': bcpasswd.c:371: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness [cut] bccreate.c:206: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness bccreate.c: In function 'bccreate_hidden': bccreate.c:461: warning: pointer targets in passing argument 9 of 'CreateKeyHandleEx' differ in signedness bcformat.c: In function 'bcformat': bcformat.c:130: warning: pointer targets in passing argument 9 of 'CreateKeyHandleEx' differ in signedness bcreencrypt.c: In function 'bcreencrypt': bcreencrypt.c:552: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness bcreencrypt.c:597: warning: pointer targets in passing argument 9 of 'CreateKeyHandle' differ in signedness bcreencrypt.c:693: warning: pointer targets in passing argument 9 of [cut] -D_LARGEFILE64_SOURCE -L../lib -I../include/ -Wall -fno-strict-aliasing -g -march=athlon-xp -O2 -pipe -I../kgsha256 -c -o bcunlock.o bcunlock.c bclink.c: In function 'bclink_raw': bclink.c:117: warning: pointer targets in passing argument 1 of 'RandomGenerateKey' differ in signedness bclink.c:117: warning: pointer targets in passing argument 3 of 'RandomGenerateKey' differ in signedness bclink.c:131: warning: pointer targets in passing argument 1 of 'RandomGenerateKey' differ in signedness bclink.c:131: warning: pointer targets in passing argument 3 of 'RandomGenerateKey' differ in signedness bclink.c:143: warning: pointer targets in passing argument 2 of 'bc_set_fd64' differ in signedness bclink.c:143: warning: pointer targets in passing argument 4 of 'bc_set_fd64' differ in signedness bclink.c: In function 'bclink': bclink.c:247: warning: pointer targets in passing argument 9 of 'CreateKeyHandleEx' differ in signedness bclink.c:247: warning: pointer targets in passing argument 10 of 'CreateKeyHandleEx' differ in signedness emerge --info Portage 2.1.1_pre1-r5 (!/home/dan/gentoo/gentoo-x86/profiles/hardened/x86/2.6, gcc-4.1.0/hardened, glibc-2.3.6-r4, 2.6.16-gentoo-r9 i686) ================================================================= System uname: 2.6.16-gentoo-r9 i686 AMD Athlon(tm) Gentoo Base System version 1.12.1 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.17 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe" CHOST="i686-pc-linux-gnu" CXXFLAGS="-march=athlon-xp -O2 -pipe" FEATURES="autoconfig collision-protect cvs digest keepwork metadata-transfer nostrip sandbox sfperms sign strict stricter test userpriv usersandbox verify-rdepend" LDFLAGS=" -Wl,--as-needed" MAKEOPTS="-j3" Thanks for the bug report and hope I didn't break anything for you.