[Bug 875474] Re: gcc-4.6: Undefined references when using -flto
Vladimir Kolesnikov
vladimir at free-sevastopol.com
Sun Oct 16 04:06:42 UTC 2011
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/875474
Title:
gcc-4.6: Undefined references when using -flto
Status in “gcc-defaults” package in Ubuntu:
New
Bug description:
Steps to reproduce:
$ sudo pbuilder create
$ sudo pbuilder --login
# apt-get install gcc-4.5 gcc libssl-dev
# cat test.c
#include <openssl/ssl.h>
int main(void)
{
SSL_library_init();
return 0;
}
# gcc test.c -flto -lcrypto -lssl
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libssl.so: undefined reference to `BIO_pop at OPENSSL_1.0.0'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libssl.so: undefined reference to `EVP_CipherInit_ex at OPENSSL_1.0.0'
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libssl.so: undefined reference to `BUF_memdup at OPENSSL_1.0.0'
... a lot of undefined references...
Same without -flto:
# gcc test.c -lcrypto -lssl
# ls a.out
a.out
This seems to be a bug introduced in gcc 4.6 as this succeeds:
# gcc-4.5 -flto test.c -lcrypto -lssl
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gcc 4:4.6.1-2ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-12.20-server 3.0.4
Uname: Linux 3.0.0-12-server x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Sat Oct 15 21:17:59 2011
ProcEnviron:
LANGUAGE=en
SHELL=/bin/bash
LANG=ru_UA.UTF-8
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to oneiric on 2011-08-21 (54 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/875474/+subscriptions
More information about the foundations-bugs
mailing list