Summary: | app-crypt/truecrypt-7.1a - ld: .../work/truecrypt-7.1a-source/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | PM <mitaspiotr> |
Component: | Current packages | Assignee: | Crypto team [DISABLED] <crypto+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alonbl, anton.kochkov, bugs+gentoo, chris, kripton, martin, steven, zeekec, zerochaos |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Add -ldl to default LFLAGS |
Description
PM
2013-08-14 15:48:30 UTC
I can confirm that. Tried also some different LDFLAGS mentioned in some forums but didn't help. As good as I remember the compilation didn't work for some weeks now, don`t exactly know if it stopped working by a special kernel version update or some other updates it may depend on. I tried GCC 4.7.3, binutils 2.23.2 and glibc 2.17. I seem to have a similar issue: Linking truecrypt /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlopen@@GLIBC_2.1' /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line /lib/libdl.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[1]: *** [truecrypt] Error 1 make: *** [all] Error 2 I can install truecrypt using LDFLAGS="-ldl" emerge truecrypt yeah, LDFLAGS="-ldl" emerge truecrypt works. Adding -ldl into the LDFLAGS in make.conf doesn't work directly, you also have to ensure to remove "--as-needed". So I can now emerge truecrypt with my custom LDFLAGS="-Wl,--hash-style=gnu,--sort-common,-ldl" But what exactly is -ldl doing? And what's the next step? Is someone modifying the ebuild to add -ldl and remove --as-needed only for truecrypt? It builds fine for me with --as-needed: x86_64-pc-linux-gnu-g++ -o truecrypt -Wl,--gc-sections -Wl,--hash-style=sysv -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu Application.o CommandLineInterface.o FavoriteVolume.o LanguageStrings.o StringFormatter.o TextUserInterface.o UserInterface.o UserPreferences.o Xml.o Unix/Main.o Resources.o FatalErrorHandler.o GraphicUserInterface.o VolumeHistory.o Forms/AboutDialog.o Forms/BenchmarkDialog.o Forms/ChangePasswordDialog.o Forms/DeviceSelectionDialog.o Forms/EncryptionOptionsWizardPage.o Forms/EncryptionTestDialog.o Forms/FavoriteVolumesDialog.o Forms/Forms.o Forms/InfoWizardPage.o Forms/KeyfileGeneratorDialog.o Forms/KeyfilesDialog.o Forms/KeyfilesPanel.o Forms/LegalNoticesDialog.o Forms/MainFrame.o Forms/MountOptionsDialog.o Forms/NewSecurityTokenKeyfileDialog.o Forms/PreferencesDialog.o Forms/ProgressWizardPage.o Forms/RandomPoolEnrichmentDialog.o Forms/SecurityTokenKeyfilesDialog.o Forms/SelectDirectoryWizardPage.o Forms/VolumePasswordPanel.o Forms/VolumePropertiesDialog.o Forms/VolumeCreationProgressWizardPage.o Forms/VolumeCreationWizard.o Forms/VolumeFormatOptionsWizardPage.o Forms/VolumeLocationWizardPage.o Forms/VolumePasswordWizardPage.o Forms/VolumeSizeWizardPage.o Forms/WizardFrame.o /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Core/Core.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Driver/Fuse/Driver.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Volume/Volume.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Platform/Platform.a -lfuse -pthread -L/usr/lib64 -pthread -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -L/usr/lib64 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu-2.8 Works to me as well: x86_64-pc-linux-gnu-g++ -o truecrypt -Wl,--gc-sections -Wl,--hash-style=sysv -Wl,-O1 -Wl,--as-needed Application.o CommandLineInterface.o FavoriteVolume.o LanguageStrings.o StringFormatter.o TextUserInterface.o UserInterface.o UserPreferences.o Xml.o Unix/Main.o Resources.o FatalErrorHandler.o GraphicUserInterface.o VolumeHistory.o Forms/AboutDialog.o Forms/BenchmarkDialog.o Forms/ChangePasswordDialog.o Forms/DeviceSelectionDialog.o Forms/EncryptionOptionsWizardPage.o Forms/EncryptionTestDialog.o Forms/FavoriteVolumesDialog.o Forms/Forms.o Forms/InfoWizardPage.o Forms/KeyfileGeneratorDialog.o Forms/KeyfilesDialog.o Forms/KeyfilesPanel.o Forms/LegalNoticesDialog.o Forms/MainFrame.o Forms/MountOptionsDialog.o Forms/NewSecurityTokenKeyfileDialog.o Forms/PreferencesDialog.o Forms/ProgressWizardPage.o Forms/RandomPoolEnrichmentDialog.o Forms/SecurityTokenKeyfilesDialog.o Forms/SelectDirectoryWizardPage.o Forms/VolumePasswordPanel.o Forms/VolumePropertiesDialog.o Forms/VolumeCreationProgressWizardPage.o Forms/VolumeCreationWizard.o Forms/VolumeFormatOptionsWizardPage.o Forms/VolumeLocationWizardPage.o Forms/VolumePasswordWizardPage.o Forms/VolumeSizeWizardPage.o Forms/WizardFrame.o /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Core/Core.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Driver/Fuse/Driver.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Volume/Volume.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Platform/Platform.a -lfuse -pthread -L/usr/lib64 -pthread -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu-2.8 As there is no special ldscript and no special ldflag, I can only guess that at your system some dependency is linked against older dl.so, some leftover after upgrading system package. i have also problem to comiple this package: -D TC_ARCH_X64 -DTC_UNIX -DTC_LINUX -fdata-sections -ffunction-sections -Wall -Wno-unused-parameter -march=corei7 -O2 -pipe -DCKR_NEW_PIN_MODE=0x000001B0 -DCKR_NEXT_OTP=0x000001B1 -I/var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Main -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -c Forms/WizardFrame.cpp -o Forms/WizardFrame.o Linking truecrypt x86_64-pc-linux-gnu-g++ -o truecrypt -Wl,--gc-sections -Wl,--hash-style=sysv -Wl,-O1 -Wl,--as-needed Application.o CommandLineInterface.o FavoriteVolume.o LanguageStrings.o StringFormatter.o TextUserInterface.o UserInterface.o UserPreferences.o Xml.o Unix/Main.o Resources.o FatalErrorHandler.o GraphicUserInterface.o VolumeHistory.o Forms/AboutDialog.o Forms/BenchmarkDialog.o Forms/ChangePasswordDialog.o Forms/DeviceSelectionDialog.o Forms/EncryptionOptionsWizardPage.o Forms/EncryptionTestDialog.o Forms/FavoriteVolumesDialog.o Forms/Forms.o Forms/InfoWizardPage.o Forms/KeyfileGeneratorDialog.o Forms/KeyfilesDialog.o Forms/KeyfilesPanel.o Forms/LegalNoticesDialog.o Forms/MainFrame.o Forms/MountOptionsDialog.o Forms/NewSecurityTokenKeyfileDialog.o Forms/PreferencesDialog.o Forms/ProgressWizardPage.o Forms/RandomPoolEnrichmentDialog.o Forms/SecurityTokenKeyfilesDialog.o Forms/SelectDirectoryWizardPage.o Forms/VolumePasswordPanel.o Forms/VolumePropertiesDialog.o Forms/VolumeCreationProgressWizardPage.o Forms/VolumeCreationWizard.o Forms/VolumeFormatOptionsWizardPage.o Forms/VolumeLocationWizardPage.o Forms/VolumePasswordWizardPage.o Forms/VolumeSizeWizardPage.o Forms/WizardFrame.o /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Core/Core.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Driver/Fuse/Driver.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Volume/Volume.a /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Platform/Platform.a -lfuse -pthread -L/usr/lib64 -pthread -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu-2.8 /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[1]: *** [truecrypt] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-crypt/truecrypt-7.1a/work/truecrypt-7.1a-source/Main' make: *** [all] Error 2 * ERROR: app-crypt/truecrypt-7.1a::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-crypt/truecrypt-7.1a::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-crypt/truecrypt-7. cant not be missing linking? revdep-rebuild is emty I can't replicate this at all, but maybe it is either -Wl,--gc-sections or -Wl,--hash-style=sysv , can you try disabling individually and seeing what happens? I recompiled my whole @world now and still can't emerge truecrypt with --as-needed. I always depclean and revdep-rebuild after @world updates so I guess there is nothing wrong with my system. Additional this emerge truecrypt error happens on all my Gentoo systems (4 x x64, 2 x x86) on nearly the same package versions. All use GCC 4.7.3, binutils 2.23.2 and glibc 2.17. *** Bug 486130 has been marked as a duplicate of this bug. *** I also had a problem after I did a world rebuild. Adding LDFLAGS="-Wl,--as-needed" to make.conf did not work but LDFLAGS="-Wl,-ldl" emerge... did. Created attachment 364788 [details, diff]
Add -ldl to default LFLAGS
I can confirm the bug when rebuilding the liveCD through catalyst. GCC 4.8.2, glibc 2.17, binutils 2.23.2. I attached a simple patch to be used with the ebuild, that adds -ldl to the default Makefile LFLAGS. Added dl, thanks! |