emerged truecrypt-5.1a (note, there should probably be a comment on the failed fetch restriction that the file you download needs to be renamed.) which threw a bunch of linker errors, then installed (!). I then tried to run truecrypt as an unprivileged user and as root. I got a SegFault in both cases. Yes, I did load the fuse module. Here's the linker error: ### Begin ################################################################## /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemExceptionC1ERKSsS2_+0xba): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemException8CloneNewEv[TrueCrypt::SystemException::CloneNew()]+0x73): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemExceptionD0Ev[TrueCrypt::SystemException::~SystemException()]+0x50): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemExceptionD0Ev[TrueCrypt::SystemException::~SystemException()]+0xd1): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemExceptionD0Ev[TrueCrypt::SystemException::~SystemException()]+0xee): unresolvable relocation against symbol `__cxa_call_unexpected@@CXXABI_1.3' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZNK9TrueCrypt15SystemException5ThrowEv[TrueCrypt::SystemException::Throw() const]+0x7e): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(SystemException.o)(.text._ZN9TrueCrypt15SystemExceptionC1ERKSsRKSbIwSt11char_traitsIwESaIwEE+0x65): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(Thread.o)(.text._ZN9TrueCrypt6Thread5StartEPFPvS1_ES1_+0x394): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(Thread.o)(.text._ZN9TrueCrypt6Thread5StartEPFPvS1_ES1_+0x3f1): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(Thread.o)(.text._ZN9TrueCrypt6Thread5StartEPFPvS1_ES1_+0x4ec): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Platform/Platform.a(Thread.o)(.text._ZN9TrueCrypt6Thread5StartEPFPvS1_ES1_+0x509): unresolvable relocation against symbol `std::exception::~exception()@@GLIBCXX_3.4' make[1]: Leaving directory `/var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Main' >>> Source compiled. >>> Test phase [not enabled]: app-crypt/truecrypt-5.1a >>> Install truecrypt-5.1a into /var/tmp/portage/app-crypt/truecrypt-5.1a/image/ category app-crypt >>> Completed installing truecrypt-5.1a into /var/tmp/portage/app-crypt/truecrypt-5.1a/image/ strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment usr/bin/truecrypt * checking 4 files for package collisions >>> Merging app-crypt/truecrypt-5.1a to / --- /lib64/ --- /lib64/rcscripts/ --- /lib64/rcscripts/addons/ >>> /lib64/rcscripts/addons/truecrypt-stop.sh --- /usr/ --- /usr/bin/ >>> /usr/bin/truecrypt --- /usr/share/ --- /usr/share/doc/ >>> /usr/share/doc/truecrypt-5.1a/ >>> /usr/share/doc/truecrypt-5.1a/Readme.txt.bz2 >>> /usr/share/doc/truecrypt-5.1a/TrueCrypt User Guide.pdf.bz2 >>> app-crypt/truecrypt-5.1a merged. >>> Recording app-crypt/truecrypt in "world" favorites file... >>> No packages selected for removal by clean >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. ### End #################################################################### There's more to it than that, but I can only scroll back so far. Reproducible: Always Steps to Reproduce: 1.echo "app-crypt/truecrypt" >>/etc/portage/package.keywords 2.emerge -av truecrypt 3.truecrypt Actual Results: Segmentation fault Expected Results: running truecrypt Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r5 x86_64) ================================================================= System uname: 2.6.22-gentoo-r5 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz Timestamp of tree: Sun, 13 Apr 2008 06:00:01 +0000 app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.4.4-r6, 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 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 sys-devel/binutils: 2.16.1-r3, 2.17-r1, 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="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=nocona -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=nocona -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo " 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/portage/local/layman/sajinet" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt cups doc dri fortran gdbm gnome gpm gtk hal iconv isdnlog ithreads jpeg midi mmx mpeg mplayer mudflap multislot multitarget mysql ncurses nls nptl nptlonly opengl openmp pam pcre perl png pppd python readline reflection samba session spl sse sse2 ssl static svg tcpd threads tiff transcode truetype unicode vcd vorbis xine xml xorg zlib" ALSA_CARDS="hda-intel" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
These errors should not be, many people built it using 64bit and got none. Aron, can you please try to reproduce?
Created attachment 149681 [details, diff] removes -Wl,--gc-sections and -f{data,function}-sections from Makefile I found this bug [1] which located the problem flags. From the conversation, it seemed to be a static/dynamic thing, so I tried setting '-static' first. That didn't fix it. The attached patch fixes the error. Just add the following line to the ebuild: src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}/${P}-symbols.patch" epatch "${FILESDIR}/${P}-external-wx.patch" epatch "${FILESDIR}/${PN}-5.1-64bit.patch" epatch "${FILESDIR}/${PN}-5.0-bool.patch" truecrypt now seemd to work fine. I'm not sure why I get the error and no one else does, though... [1] - http://libtorrent.rakshasa.no/ticket/940
I'll rebuild this tonight and see if I can reproduce it. I am running ~amd64 as opposed to Jason, who is running stable.
Builds fine here without any modifications. [ebuild Rf ] app-crypt/truecrypt-5.1a USE="X" 0 kB Portage 2.1.5_rc3 (default/linux/amd64/2008.0/desktop, gcc-4.2.3, glibc-2.7-r2, 2.6.24-gentoo-r5 x86_64) ================================================================= System uname: 2.6.24-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5600+ Timestamp of tree: Mon, 14 Apr 2008 21:15:03 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.5.1-r5 sys-apps/baselayout: 1.12.12 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 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.24 ABI="amd64" ACCEPT_KEYWORDS="amd64 ~amd64" ALSA_CARDS="hda-intel" 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="" ARCH="amd64" ASFLAGS_x86="--32" AUTOCLEAN="yes" CAMERAS="directory sierra" CBUILD="x86_64-pc-linux-gnu" CDEFINE_amd64="__x86_64__" CDEFINE_x86="__i386__" CFLAGS="-march=native -O2 -msse3 -pipe" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x86="i686-pc-linux-gnu" CLASSPATH="." CLEAN_DELAY="5" COLORTERM="" 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/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CVS_RSH="ssh" CXXFLAGS="-march=native -O2 -msse3 -pipe" DEFAULT_ABI="amd64" DISPLAY=":0.0" DISTDIR="/usr/portage/distfiles" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--verbose" EMERGE_WARNING_DELAY="10" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" GCC_SPECS="" GDK_USE_XFT="1" GENERATION="2" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo" HOME="/root" INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.3/info" INPUT_DEVICES="keyboard mouse" JAVAC="/opt/blackdown-jdk-1.4.2.03/bin/javac" JAVA_HOME="/opt/blackdown-jdk-1.4.2.03" JDK_HOME="/opt/blackdown-jdk-1.4.2.03" KDEDIRS="/usr:/usr/local:/usr/kde/3.5" KDEWM="/usr/bin/fusion-icon" KDE_IS_PRELINKED="1" KERNEL="linux" LANG="en_US.UTF-8" LCD_DEVICES="ncurses text" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" LDFLAGS_x86="-m elf_i386" LESS="-R -M --shift 5" LESSOPEN="|lesspipe.sh %s" LIBDIR_amd64="lib64" LIBDIR_ppc="lib32" LIBDIR_ppc64="lib64" LIBDIR_x86="lib32" LINGUAS="en en_US" LOGNAME="root" LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:" MAKEOPTS="-j3" MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.3/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man" MULTILIB_ABIS="amd64 x86" MULTILIB_STRICT_DENY="64-bit.*shared object" MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib" MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)" OPENGL_PROFILE="nvidia" PAGER="/usr/bin/less" PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/home/aron/bin:/root/bin" PKGDIR="/usr/portage/packages" PKG_CONFIG_PATH="/usr/qt/3/lib64/pkgconfig" PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha hppa sparc-fbsd" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib64/portage/bin" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="log warn error" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save_summary echo" PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5" PORTAGE_FETCH_RESUME_MIN_SIZE="350K" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_NICENESS="10" PORTAGE_PYM_PATH="/usr/lib64/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/font-overlay /usr/portage/local/layman/sunrise /home/aron/linux/overlay" PRELINK_PATH_MASK="/usr/lib64/klibc" PWD="/home/aron" PYTHONPATH="/usr/lib64/portage/pym" QMAKESPEC="linux-g++" QTDIR="/usr/qt/3" RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" ROOT="/" ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.3:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin" RPMDIR="/usr/portage/rpm" SANE_CONFIG_DIR="/etc/sane.d" SHELL="/bin/bash" SHLVL="1" STAGE1_USE="multilib nptl nptlonly unicode" SUDO_COMMAND="/bin/bash" SUDO_GID="100" SUDO_UID="1000" SUDO_USER="aron" SYMLINK_LIB="yes" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" TERM="xterm" USB_DEVFS_PATH="/dev/bus/usb" USE="3dnow X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo cdr cli cracklib cups curl dbus dri dts dvd dvdr dvdread emboss encode exif fam firefox flac gdbm gif gpm gtk hal iconv ipod isdnlog jpeg kde lame libnotify mad midi mikmod mmx mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses newspr nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba scanner sdl session spell spl sqlite sse sse2 ssl startup-notification svg symlink theora threads tiff truetype unicode usb vim-syntax vorbis x264 xcb xcomposite xml xorg xv xvid xvmc zeroconf zlib" ALSA_CARDS="hda-intel" 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" CAMERAS="directory sierra" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia" USER="root" USERLAND="GNU" USERNAME="root" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d" VIDEO_CARDS="nvidia" VMHANDLE="blackdown-jdk-1.4.2" XDG_DATA_DIRS="/usr/share:/usr/kde/3.5/share:/usr/local/share" _="/usr/bin/emerge"
Created attachment 149930 [details] a.cxx Thank you Aron. Jason: Please try to reproduce these errors. Attached is a sample program. Compile using: g++ -fdata-sections -ffunction-sections -Wl,--gc-sections a.cxx Modify it until you get the same errors as you get with truecrypt.
News?
Sorry for the delay. Work has had me running in circles on other fires. I compiled the sample code as follows: g++ -fdata-sections -ffunction-sections -Wl,--gc-sections a.cxx No errors, no warnings. Compile: PASS Exec: PASS So I tried: x86_64-pc-linux-gnu-g++ -fdata-sections -ffunction-sections -Wl,--gc-sections a.cxx Same results. So I tried as root: x86_64-pc-linux-gnu-g++ -fdata-sections -ffunction-sections -Wl,--gc-sections a.cxx Also, no errors. So I did some hunting on gcc flags: -ffunction-sections -fdata-sections http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Optimize-Options.html#Optimize%20Options -Wl--gc-sections http://www.motherboardpoint.com/t96687-optimizing-with-gcc.html And the gnu ld manual http://sourceware.org/binutils/docs-2.18/ld/Options.html#Options Basically, it looks like truecrypt is trying to optimize the sections and then have the linker do garbage collection. Which seems to be removing 'unused' sections which are, in fact, needed. I'm attaching the full build log. It looks the the error starts here: #### Begin ################################################################# Linking truecrypt x86_64-pc-linux-gnu-g++ -o truecrypt -Wl,--gc-sections Application.o CommandL ineInterface.o FavoriteVolume.o LanguageStrings.o StringFormatter.o TextUserInte rface.o UserInterface.o UserPreferences.o Xml.o Unix/Main.o Resources.o FatalErr orHandler.o GraphicUserInterface.o Hotkey.o VolumeHistory.o Forms/AboutDialog.o Forms/ChangePasswordDialog.o Forms/DeviceSelectionDialog.o Forms/EncryptionOptio nsWizardPage.o Forms/FavoriteVolumesDialog.o Forms/Forms.o Forms/InfoWizardPage. o Forms/KeyfilesDialog.o Forms/KeyfilesPanel.o Forms/LegalNoticesDialog.o Forms/ MainFrame.o Forms/MountOptionsDialog.o Forms/PreferencesDialog.o Forms/ProgressW izardPage.o Forms/SelectDirectoryWizardPage.o Forms/SingleChoiceWizardPage.o For ms/VolumePasswordPanel.o Forms/VolumePropertiesDialog.o Forms/VolumeCreationIntr oWizardPage.o Forms/VolumeCreationProgressWizardPage.o Forms/VolumeCreationWizar d.o Forms/VolumeFormatOptionsWizardPage.o Forms/VolumeLocationWizardPage.o Forms /VolumePasswordWizardPage.o Forms/VolumeSizeWizardPage.o Forms/WizardFrame.o /va r/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Core/Core.a /v ar/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Driver/Fuse/D river.a /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-source/Vol ume/Volume.a /var/tmp/portage/app-crypt/truecrypt-5.1a/work/truecrypt-5.1a-sourc e/Platform/Platform.a -pthread -lfuse -lrt -ldl -L/usr/lib64 -pthread -L/us r/lib64 -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk 2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_ xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: A pplication.o(.text._ZN20wxThreadHelperThreadD0Ev[wxThreadHelperThread::~wxThread HelperThread()]+0xc): unresolvable relocation against symbol `wxThread::~wxThrea d()@@WXU_2.8' #### End ################################################################### I'll admit I'm at a loss... It definitely has to do with the optimization flags listed above, since removing them fixed the issue. I just have no idea why (or how to fix it short of removing the flags). But I'm really retarded when it comes to C++. ;-)
Created attachment 150294 [details] log of truecrypt v5.1a failing during emerge Forgot to attach this, oops.
I get exactly the same behavior (build with link errors, segfault when trying to run). I use ACCEPT_KEYWORDS=amd64. The patch proposed above solves the problem. $ gcc --version | head -1 gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3) $ ld --version | head -1 GNU ld version 2.16.1
has been removed