New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.18: alsa-lib build fails with LTO #6
Comments
Fixed in 5366bdb . Let me know, if it works for you. |
No, still it does not work. make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/alsa-lib-1.1.8/src' /bin/sh ../libtool --tag=CC --mode=link gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -version-info 2:0:0 -Wl,--version-script=Versions -Wl,--no-undefined -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin -o libasound.la -rpath /usr/lib64 conf.lo confmisc.lo input.lo output.lo async.lo error.lo dlmisc.lo socket.lo shmarea.lo userfile.lo names.lo control/libcontrol.la mixer/libmixer.la pcm/libpcm.la timer/libtimer.la rawmidi/librawmidi.la hwdep/libhwdep.la seq/libseq.la ucm/libucm.la topology/libtopology.la -lm -ldl -lpthread -lrt libtool: link: gcc -shared -fPIC -DPIC .libs/conf.o .libs/confmisc.o .libs/input.o .libs/output.o .libs/async.o .libs/error.o .libs/dlmisc.o .libs/socket.o .libs/shmarea.o .libs/userfile.o .libs/names.o -Wl,--whole-archive control/.libs/libcontrol.a mixer/.libs/libmixer.a pcm/.libs/libpcm.a timer/.libs/libtimer.a rawmidi/.libs/librawmidi.a hwdep/.libs/libhwdep.a seq/.libs/libseq.a ucm/.libs/libucm.a topology/.libs/libtopology.a -Wl,--no-whole-archive -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -flto -Wl,--version-script=Versions -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -flto -fuse-linker-plugin -lm -ldl -lpthread -lrt -Wl,-soname -Wl,libasound.so.2 -o .libs/libasound.so.2.0.0 /tmp/cc1Rv6SH.s: Assembler messages: /tmp/cc1Rv6SH.s: Error: invalid attempt to declare external version name as default in symbol `snd_dlopen@@ALSA_1.1.6' lto-wrapper: fatal error: gcc returned 1 exit status |
It's a known issue of gcc. LTO still doesn't support the versioned symbols. We may put some workaround, but I'd rather wait for the upstream resolution in the gcc side: |
@kloczek : Use hints from gitcompile: gcc: -flto -flto-partition=none export AR="gcc-ar" export RANLIB="gcc-ranlib" |
So what is the difference with using -flto -flto-partition=none and -flto -fuse-linker-plugin? |
I don't know. This magic can explain only a gcc developer. You may ask in the mentioned gcc bug. |
This issue can be closed now as -flto-partition=none seems is working now. |
Hi, I'd like to report that -flto-partition=one works fine, you don't have disable -flto-partition outright since you can use a single one. I guess it probably doesn't matter in the case of GCC if using no partition or a single partition, so long as external symbol versioning can be seen. On the Clang side of things, you have to use -flto=full for single threaded LTO since when using multithreaded -flto=thin you get a similar problem. Clang can't see everything using split and threaded LTO unlike when using a single threaded and not split code generation during LTO. Adding some Gentoo build logs. alsa-lib-clang-flto-full.log |
The text was updated successfully, but these errors were encountered: