| Summary: | media-video/vlc-2.1.4 - ld: error: .../temp/cchbdDZp.ltrans0.ltrans.o: requires dynamic R_X86_64_PC32 reloc against 'pw_1' which may overflow at runtime; recompile with -fPIC | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Marcin Mirosław <bug> |
| Component: | Current packages | Assignee: | Tom Wijsman (TomWij) (RETIRED) <tomwij> |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | normal | CC: | media-video |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | build.log.bz2 | ||
|
Description
Marcin Mirosław
2014-02-25 09:21:59 UTC
Created attachment 371208 [details]
build.log.bz2
+ 26 Mar 2014; Tom Wijsman <TomWij@gentoo.org> vlc-2.0.8.ebuild, + vlc-2.1.4.ebuild, vlc-2.1.9999.ebuild, vlc-9999.ebuild: + Append -fPIC temporarily for bug #502394, reported by Marcin Mirosław. Thank you for reporting. (In reply to Tom Wijsman (TomWij) from comment #2) > + 26 Mar 2014; Tom Wijsman <TomWij@gentoo.org> vlc-2.0.8.ebuild, > + vlc-2.1.4.ebuild, vlc-2.1.9999.ebuild, vlc-9999.ebuild: > + Append -fPIC temporarily for bug #502394, reported by Marcin Mirosław. > > Thank you for reporting. What? Did you look at his *FLAGS: LDFLAGS="-Wl,-O1 -Wl,--as-needed -z relro -Wl,--sort-common" ^^^^^^^^ CFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -frecord-gcc-switches -fno-unwind-tables -fno-asynchronous-unwind-tables -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization -fuse-linker-plugin -flto=2" lto? linker plugin? relro? Reopen as appending -fPIC is just wrong, and the build (or system) is broken per-user, likely not a fault of the VLC Appending -fPIC adds major overhead https://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3#doc_chap6 "In this case, globally adding -fPIC to C[XX]FLAGS resolves the issue, although this practice is discouraged because the executables end up being PIC-enabled, too." major overhead from adding -fPIC needlessly (In reply to Samuli Suominen from comment #3) > lto? linker plugin? relro? > > Reopen as appending -fPIC is just wrong, and the build (or system) is broken > per-user, likely not a fault of the VLC > Appending -fPIC adds major overhead Thanks. Right; as this is less common, I forgot to check for that in this case. + 26 Mar 2014; Tom Wijsman <TomWij@gentoo.org> vlc-2.0.8.ebuild, + vlc-2.1.4.ebuild, vlc-2.1.9999.ebuild, vlc-9999.ebuild: + Remove temporary -fPIC per ssuominen's comments in bug #502394. Marcin; if you still want this to work, you can try to be supported upstream. What is wrong with using "lto? linker plugin? relro?"? They are unsupported on Gentoo at the moment; in other words, it is either the responsibility of upstream (if they support it) or the user to address build errors as the result of using these flags. Can you try with sane flags, like '-O2 -march=native -pipe' and '-Wl,-O1 -Wl,--as-needed'? Some flags look safe, like -frecord-gcc-switches, but others like -ftree- vectorize (generates bad code for eg. zlib), -fweb (generates bad code for eg. x264 and possibly other media related codecs where ASM is involved), LTO (known to not be ready for system wide use yet), ... It shouldn't be the job of the maintainer to bisect the users flags, rather, if you have chosen to use complex flag combination like this, it should be the user who provides the exact information what flag causes the problem and then bisect that even futher down to specific objects, ... So this is really a case for 'RESOLVED, NEEDINFO' Doing bisection of user flag isn't necessary. I know that compilation error comes from using "lto". Phrase "lto? linker plugin? relro?" sounds like all of mentioned option are widely known as making broken code at least. As far as I know relro is safe[1], "linker plugin" is needed to use gold linker (I'm not sure if it interpolate with lto). What is the status of lto? Some times ago there were a warning that it's unsupported by Gentoo. Is lto still punished like e.g "-ftree- vectorize"? [1] - https://wiki.gentoo.org/wiki/Hardened/Toolchain#Issues_arising_from_default_RELRO |