[Bug 1191473] New: rpath related failures on x86_64
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 Bug ID: 1191473 Summary: rpath related failures on x86_64 Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: openSUSE Tumbleweed Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: christophe@krop.fr QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Some packages started failing after september, 19 with rpath errors: https://build.opensuse.org/packages/AppCSXCAD/job_history/openSUSE:Factory/s... https://build.opensuse.org/packages/libqt5-creator/job_history/KDE:Qt5/openS... In both cases, only x86_64 fails, i586 is fine. for libqt5-creator, it's even stranger, the package only fails in the devel project. For AppCSXCAD : [ 67s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/AppCSXCAD-0.2.2-2.9.x86_64/usr/bin/AppCSXCAD [ 67s] CMake Error at cmake_install.cmake:55 (file): [ 67s] file RPATH_CHANGE could not write new RPATH: [ 67s] [ 67s] /usr/lib64 [ 67s] [ 67s] to the file: [ 67s] [ 67s] /home/abuild/rpmbuild/BUILDROOT/AppCSXCAD-0.2.2-2.9.x86_64/usr/bin/AppCSXCAD [ 67s] [ 67s] No valid ELF RPATH or RUNPATH entry exists in the file; for qtcreator: [ 4291s] -- Installing: /home/abuild/rpmbuild/BUILDROOT/libqt5-creator-5.0.1-1.8.x86_64/usr/libexec/qtcreator/qtpromaker [ 4291s] CMake Error at src/tools/qtpromaker/cmake_install.cmake:55 (file): [ 4291s] file RPATH_CHANGE could not write new RPATH: [ 4291s] [ 4291s] $ORIGIN/../../lib64/qtcreator:$ORIGIN/../../lib64/Qt/lib:$ORIGIN/../../lib64/qtcreator/plugins [ 4291s] [ 4291s] to the file: [ 4291s] [ 4291s] /home/abuild/rpmbuild/BUILDROOT/libqt5-creator-5.0.1-1.8.x86_64/usr/libexec/qtcreator/qtpromaker [ 4291s] [ 4291s] The current RUNPATH is: [ 4291s] [ 4291s] $ORIGIN/../../lib64/qtcreator: [ 4291s] [ 4291s] which does not contain: [ 4291s] [ 4291s] $ORIGIN/../../lib64/qtcreator::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: [ 4291s] [ 4291s] as was expected. --- Trying to rollback the cmake and binutils packages to older revisions didn't improve the situation. But, unsetting SUSE_IGNORED_RPATHS which is used in https://build.opensuse.org/package/view_file/devel:gcc/binutils/binutils-ski... fixes both builds (visible here: https://build.opensuse.org/package/show/home:cgiboudeaux:bisect/AppCSXCAD and here: https://build.opensuse.org/package/show/home:cgiboudeaux:branches:home:cgibo...) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 Christophe Giboudeaux <christophe@krop.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.liska@suse.com Assignee|screening-team-bugs@suse.de |matz@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenther@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c2 --- Comment #2 from Martin Li��ka <martin.liska@suse.com> ---
not sure which rpath cmake uses to check whether adding a rpath works, but if it is /tmp or the like that will definitely fail.
The ignored locations are listed here: https://github.com/openSUSE/post-build-checks/blob/master/suse-ignored-rpath... so using /tmp/ or a /home as a RPATH would work. But as seen here: [ 67s] CMake Error at cmake_install.cmake:55 (file): [ 67s] file RPATH_CHANGE could not write new RPATH: [ 67s] [ 67s] /usr/lib64 ... it's using RPATH that is listed in (suse-ignored-rpaths.conf). So we think the cmake checking code should be adjusted. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 Max Lin <mlin@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simonf.lees@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c3 Michael Matz <matz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz@suse.com Assignee|matz@suse.com |simonf.lees@suse.com --- Comment #3 from Michael Matz <matz@suse.com> --- Yeah, not a problem of binutils. We consciously disallow setting certain RPATHs, and we always did so. So this is a problem in cmake or those packages using cmake, which seemingly only now gets exposed by the typo fix in cmake. Assigning to cmake maintainer to check this. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c4 --- Comment #4 from Christophe Giboudeaux <christophe@krop.fr> --- (In reply to Michael Matz from comment #3)
Yeah, not a problem of binutils. We consciously disallow setting certain RPATHs, and we always did so. So this is a problem in cmake or those packages using cmake, which seemingly only now gets exposed by the typo fix in cmake. Assigning to cmake maintainer to check this.
The typo fix in the CMake package only concerned Leap (which is not affected by this issue) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c5 --- Comment #5 from Christophe Giboudeaux <christophe@krop.fr> --- (In reply to Christophe Giboudeaux from comment #4)
(In reply to Michael Matz from comment #3)
Yeah, not a problem of binutils. We consciously disallow setting certain RPATHs, and we always did so. So this is a problem in cmake or those packages using cmake, which seemingly only now gets exposed by the typo fix in cmake. Assigning to cmake maintainer to check this.
The typo fix in the CMake package only concerned Leap (which is not affected by this issue)
Besides, I also tried using an older CMake revision with the same result. (to factory revision 203, so just after sr#917065 and before 917935, 920705 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c6 Stefan Br�ns <stefan.bruens@rwth-aachen.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan.bruens@rwth-aachen.d | |e --- Comment #6 from Stefan Br�ns <stefan.bruens@rwth-aachen.de> --- For AppCSXCAD, the failure reason is quite obscure: On Leap 15.{2,3}, neither x86_64 nor aarch64 have an RUNPATH or RPATH entry, but CMAKE_SKIP_INSTALL_RPATH is set, so cmakes `file(CHANGE_RPATH ...)` is not invoked. No possibility to fail ... On TW, i586 and aarch64 have a RUNPATH entry, 0x0000001d (RUNPATH) Library runpath: [::::::::] while x86_64 on TW has not. The latter seems incorrect to me, as the final linker command contains "-Wl,-rpath,::::::::::" for all architectures on TW. CMake adds this option to have a sufficiently large RUNPATH string entry (containing only padding from a semantic view point) which can be overwritten during install. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c7 Stefan Br�ns <stefan.bruens@rwth-aachen.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(rguenther@suse.co | |m), | |needinfo?(martin.liska@suse | |.com), | |needinfo?(matz@suse.com) --- Comment #7 from Stefan Br�ns <stefan.bruens@rwth-aachen.de> --- Is the architecture dependent behavior of the linker expected? Why does the linker accept "-Wl,-rpath,::::::::::" on i586 and aarch64, but ignores it on x86_64? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c8 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(rguenther@suse.co | |m), | |needinfo?(martin.liska@suse | |.com), | |needinfo?(matz@suse.com) | --- Comment #8 from Martin Li��ka <martin.liska@suse.com> --- I don't see any architecture difference: x86_64: $ echo 'int main() {}' | gcc -Wl,-rpath,:::::::::: -x c - && readelf -d a.out | grep RUNPATH 0x000000000000001d (RUNPATH) Library runpath: [::::::::::] $ file a.out a.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=82eeb6341bfc136f30e4e1fc175b796db4a70308, for GNU/Linux 3.2.0, with debug_info, not stripped i586: $ echo 'int main() {}' | gcc -Wl,-rpath,:::::::::: -x c - && readelf -d a.out | grep RUN 0x0000001d (RUNPATH) Library runpath: [::::::::::] $ file a.out a.out: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=1e80fad8c9d80b8606d9f79b3063a8385a23f81c, for GNU/Linux 3.2.0, with debug_info, not stripped -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c9 --- Comment #9 from Martin Li��ka <martin.liska@suse.com> ---
Why does the linker accept "-Wl,-rpath,::::::::::" on i586 and aarch64, but ignores it on x86_64?
Hmm, but it really skips it in our case: $ readelf -d AppCSXCAD | grep RUN (empty output) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c10 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|simonf.lees@suse.com |martin.liska@suse.com --- Comment #10 from Martin Li��ka <martin.liska@suse.com> --- Got it, I know the root cause, working on that. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c11 --- Comment #11 from Martin Li��ka <martin.liska@suse.com> --- ==21699== Invalid read of size 1 ==21699== at 0x48441F4: strlen (vg_replace_strmem.c:469) ==21699== by 0x48EE727: __vfprintf_internal (vfprintf-internal.c:1647) ==21699== by 0x48EEEEE: buffered_vfprintf (vfprintf-internal.c:2295) ==21699== by 0x48D98F9: fprintf (fprintf.c:32) ==21699== by 0x42D8CB: ldelf_before_allocation (ldelf.c:1659) ==21699== by 0x416F41: lang_process (ldlang.c:8220) ==21699== by 0x403B2A: main (ldmain.c:497) ==21699== Address 0x56dd0d9 is 0 bytes after a block of size 153 alloc'd ==21699== at 0x483E70F: malloc (vg_replace_malloc.c:380) ==21699== by 0x4F3BBB: xmalloc (xmalloc.c:147) ==21699== by 0x42D48F: ldelf_before_allocation (ldelf.c:1648) ==21699== by 0x416F41: lang_process (ldlang.c:8220) ==21699== by 0x403B2A: main (ldmain.c:497) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c12 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #12 from Martin Li��ka <martin.liska@suse.com> --- I've just made a SR: https://build.opensuse.org/request/show/928530 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c13 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED --- Comment #13 from Martin Li��ka <martin.liska@suse.com> --- Fixed in devel project. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c14 --- Comment #14 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1191473) was mentioned in https://build.opensuse.org/request/show/928669 Factory / binutils -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c15 Jan Engelhardt <jengelh@inai.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jengelh@inai.de --- Comment #15 from Jan Engelhardt <jengelh@inai.de> ---
the final linker command contains "-Wl,-rpath,::::::::::" for all architectures on TW. CMake adds this option to have a sufficiently large RUNPATH string entry (containing only padding from a semantic view point) which can be overwritten during install.
If only cmake knew how to run chrpath, then such hack wouldn't be needed. Speaking of which, ld maybe should also just collapse empty paths. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1191473 http://bugzilla.opensuse.org/show_bug.cgi?id=1191473#c16 --- Comment #16 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1191473) was mentioned in https://build.opensuse.org/request/show/929013 Factory / binutils -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com