[Bug 1141188] New: [Build 20190709] mkisofs failure when built with LTO
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188 Bug ID: 1141188 Summary: [Build 20190709] mkisofs failure when built with LTO Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other URL: https://openqa.opensuse.org/tests/981008/modules/autof s/steps/8 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: dimstar@opensuse.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- ## Observation openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-extra_tests_filesystem@64bit fails in [autofs](https://openqa.opensuse.org/tests/981008/modules/autofs/steps/8) ## Test suite description Maintainer: okurz@suse.de Filesystem related tests, for example snapper and btrfs features. ## Reproducible Fails since (at least) Build [20190709](https://openqa.opensuse.org/tests/980092) ## Expected result Last good: [20190708](https://openqa.opensuse.org/tests/978570) (or more recent) ## Further details Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=extra_tests_filesystem&version=Tumbleweed) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
Dominique Leuenberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c1
--- Comment #1 from Dominique Leuenberger
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
Guillaume GARDET
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c2
Martin Liška
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
Martin Liška
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c3
Jörg Schiling
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c4
--- Comment #4 from Martin Liška
How is this related to LTO tape drives?
Thank you for the stack trace!
How do you set up things when it works and what differs when it does not work?
Please see: https://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c1
When the problem occurs, you are obviously using a defective linker.
It's about how LTO works, please see a probably explanation: https://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c2
Background:
The error() function has been defined in 1980 by Charles River Data Systems by a group of former AT&T developers for the first real time UNIX clone. Libschily implements a UNOS-complient error() function and it seems that your libc defines a non-compliant variant that causes problems.
If your linker would correctly honor the official link order rules, there still was no problem, since libschily is mentioned on the linker command line before libc.
That's fine, but problem is that you have a translation units that have a definition of the error function from a glibc header and so that it does dot correspond to libshily's signature. The attributes like __printflike__(1, 2); are definitely not part of symbol resolution.
Since this kind of ambiguity for symbol names is quite frequent, I expect many more similar problems when using this linker.
It's rare that you override a standard function like in our case. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c5
--- Comment #5 from Jörg Schiling
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c6
--- Comment #6 from Martin Liška
If you were correct, mkisofs would not compile, but fortunately, mkisofs.c does not include /usr/include/error.h where glibc tries to overwrite the standard error() function defined in
by a private glibc specific signature.
And is it possible that other source file include the system error.h header? Maybe it happens transitively?
Conclusion is still -> defective linker.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c7
--- Comment #7 from Jörg Schiling
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c8
Kristyna Streitova
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c9
--- Comment #9 from Jörg Schiling
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c10
--- Comment #10 from Martin Liška
As mentioned for bug https://bugzilla.suse.com/show_bug.cgi?id=1141105 already, the important issue is that both bug reports miss the needed information on what non-standard build procedure has been used to compile the failing binary.
Ok, the build procedure is to add -flto to C{,XX}FLAGS.
There has not been any report about a similar problem when the unmodified schily build system is in use on Linux.
This is a proof that there is no problem in my software and as long as you do not document how you caused that problem, there is no way to help you.
The problem may have been caused by using an unusual compiler or by enforcing unusual linker flags when compiling/linking the binary.
Yes, LTO is a cutting edge technology but has been thoroughly tested and used by the various projects during the last couple of years.
BTW: This is linker bug with the linker used on the target platform and the best way to deal with this bug report is to forward it to a person with skill for the related link sub system.
Yes, that's possible, but without a small test-case reproducer nobody will help us. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188
http://bugzilla.opensuse.org/show_bug.cgi?id=1141188#c11
--- Comment #11 from Jörg Schiling
Ok, the build procedure is to add -flto to C{,XX}FLAGS.
Thank you, this allows to reproduce the bug and to identify it as a gcc bug.
Yes, LTO is a cutting edge technology but has been thoroughly tested and used by the various projects during the last couple of years.
You are mistaken, this is obviously in pre-alpha state and if it had been properly tested, then this bug would never have been in a public release of gcc. See tests with that flag below...that show completely different results.
BTW: This is linker bug with the linker used on the target platform and the best way to deal with this bug report is to forward it to a person with skill for the related link sub system.
Yes, that's possible, but without a small test-case reproducer nobody will help us.
You are mistaken again: I am sorry to see that you refuse to forward the bug to the responsible people and that you even did not yet run the simple test posted by Jan Engelhardt in the other related bug. If you like to get a fix, just forward the bug report to the GCC people and I can grant you that they do not need additional information to what we already have. Let me explain why this is a problem of an untested pre-alpha feature in gcc: cc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 together with the proposed test case from Jan Engelhardt results in: binding file /tmp/T/bin/mkisofs/tmp [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `error' [GLIBC_2.2.5] but the unexpected result is that my test binary /tmp/T/bin/mkisofs behaves correct even though ldd claims that error() is linked against the non-standard error() function in glibc. In other words: this feature causes unpredictable results - do not use it before it has been at least put into a beta state. If you like a smaller example than mkisofs, I recommend to use the command "p" from schilytools. Now to the other bugs in gcc caused by using -flto: static libraries that are project specific and that are not intended to be published as separate .a files are not linked at all: smake LINKMODE=dynamic INS_BASE=/tmp/T COPTX=-flto C++OPTX=-flto LDOPTX=-flto ... ==> MAKING "all" ON SUBDIRECTORY "SRCROOT/obosh" ==> LINKING "OBJ/x86_64-linux-gcc/obosh" /tmp/ccNsUg91.ltrans9.ltrans.o: In function `main': <artificial>:(.text+0x60b): undefined reference to `opt_sp' /tmp/ccNsUg91.ltrans14.ltrans.o: In function `optget': <artificial>:(.text+0x2c): undefined reference to `opt_sp' <artificial>:(.text+0x56): undefined reference to `opt_sp' <artificial>:(.text+0x89): undefined reference to `opt_sp' <artificial>:(.text+0xb6): undefined reference to `opt_sp' collect2: error: ld returned 1 exit status A similar problem exists with SCCS that links against the AT&T internal libs libcassi.a libcomobj.a libmpw.a and with SunPro Make, that links aginst internal libs from Sun: libvroot.a libmksh.a libbsd.a Let me give the background for the Bourne Shell mentioned with error outout above: The Bourne Shell and SCCS need a POSIX compliant getopt() that does not exist in glibc (GNU getopt() is definitely not POSIX compliant and before libgetopt has been created in late 2006, SCCS did not work on Linux). The Bourne Shell in addition needs AT&T specific extensions in getopt() to permit getopt() to be used repeated for the shell builtins and even mixed for the shell builtin "getopts(1)". To be able to support combined options like -abc, getopt() needs to be able to keep an internal state about which letter in a combined option string is currently parsed. To make this work with the shell builtin getopts(1), it needs to restore that state after calling getopt() for internal use. This feature is implemented with the additional external variable opt_sp that is flagged above even though present. The error message above shows that gcc does not link against libgetopt.a or is unable to link against libgetopt.a even though it is present in the linker search path and even though -lgetopt has been specified. See below for a statement on static linking with -flto. If this problem does not appear with your local GCC version, this is just another proof for the untested state of this gcc feature. BTW: If I use only static linking with schilytools internal libraries and call: smake COPTX=-flto C++OPTX=-flto LDOPTX=-flto at top level after the libs/*/ directory has been emptied, none of the comands links and all linker calls complain about the missing entries that are expected from the libraries in $SRCROOT/libs. It is obvious that this gcc feature still needs a lot of work before it may become useful. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com