Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933286 - dev-build/libtool fail tests with lto on gcc
Summary: dev-build/libtool fail tests with lto on gcc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-05-31 21:53 UTC by Arniiiii
Modified: 2024-09-25 04:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
all my chrooted journey. (libtool.log.lz,46.40 KB, application/x-lzip)
2024-06-03 12:47 UTC, Arniiiii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniiiii 2024-05-31 21:53:58 UTC
I've got a lot of error like lto-type-mismatch, when downgrading from gcc-13 to gcc-11 and using lto flags and FEATURE="test" . I've disabled lto and tests seem to be passed.
Comment 1 Mike Gilbert gentoo-dev 2024-06-02 18:53:18 UTC
Please provide some logs.
Comment 2 Arniiiii 2024-06-03 12:47:36 UTC
Created attachment 894989 [details]
all my chrooted journey.

so, I've chrooted to downloaded and unpacked properly via root stage3-openrc , copied /etc/resolv.conf , placed my make.conf , removed gcc-graphite stuff because apparently gcc in stage is gcc[-graphite] , asked portage to just recompile the libtool with lto warnings and testing, and in the end I've `cat testsuite.log` and then `cat /etc/portage/make.conf` . No downgrading, just pure rebuild with testing and LTO.
Comment 3 Arniiiii 2024-06-03 12:48:22 UTC
lzip -dc libtool.log.lz | less 

the command to see the log.
Comment 4 Mike Gilbert gentoo-dev 2024-06-04 01:59:25 UTC
lzip? Really? Please use gzip, bzip2, or xz. lzip is pretty rare.
Comment 5 Arniiiii 2024-06-04 09:36:23 UTC
since backdoor in xz, it's going to be at least more known. Also, it has almost same properties as xz compression.
Comment 6 Mike Gilbert gentoo-dev 2024-06-04 13:57:26 UTC
(In reply to Arniii from comment #5)

It's inconvenient since nobody has it installed. Please use another alternative.
Comment 7 Eli Schwartz gentoo-dev 2024-06-04 21:35:22 UTC
(In reply to Arniii from comment #5)
> since backdoor in xz, it's going to be at least more known. Also, it has
> almost same properties as xz compression.

I used this:

```
curl -Ls "https://bugs.gentoo.org/attachment.cgi?id=894989" | xz -d | less -R
```

Works great. Not sure what it says about "avoiding the xz backdoor" though.



Test errors look like e.g. 



stderr:
libltdl/.libs/libltdlcS.c:27:12: error: type of 'dlopen_LTX_get_vtable' does not match original declaration [-Werror=lto-type-mismatch]
libltdl/loaders/dlopen.c:61:1: note: return value type mismatch
   61 | get_vtable (lt_user_data loader_data)
      | ^
libltdl/loaders/dlopen.c:61:1: note: 'dlopen_LTX_get_vtable' was previously declared here
libltdl/loaders/dlopen.c:61:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
.libs/mdemoS.c:34:13: error: type of 'libfoo2_LTX_nothing' does not match original declaration [-Werror=lto-type-mismatch]
foo2.c:12:5: note: type 'int' should match type 'char'
   12 | int nothing;
      |     ^
foo2.c:12:5: note: 'libfoo2_LTX_nothing' was previously declared here
.libs/mdemoS.c:31:13: error: type of 'foo1_LTX_nothing' does not match original declaration [-Werror=lto-type-mismatch]
foo1.c:12:5: note: type 'int' should match type 'char'
   12 | int nothing = FOO_RET;
      |     ^
foo1.c:12:5: note: 'foo1_LTX_nothing' was previously declared here
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:812: mdemo] Error 1
Comment 8 Eli Schwartz gentoo-dev 2024-09-25 04:40:14 UTC
commit c235441176385e7a096b85335b82cefa74968748
Author:     Sam James <sam@gentoo.org>
AuthorDate: Wed May 15 20:43:56 2024
Commit:     Sam James <sam@gentoo.org>
CommitDate: Wed May 15 20:49:59 2024

    dev-build/libtool: add 2.5.0 (unkeyworded)
    
    It fails one test for me that was newly added in https://lists.gnu.org/archive/html/libtool-commit/2024-04/msg00003.html.
    
    Bug: https://bugs.gentoo.org/884767
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-build/libtool/Manifest                                      |  1 +
 dev-build/libtool/{libtool-9999.ebuild => libtool-2.5.0.ebuild} | 36 +++++++++++++++++++++++++++++++-----
 dev-build/libtool/libtool-9999.ebuild                           | 36 +++++++++++++++++++++++++++++++-----
 3 files changed, 63 insertions(+), 10 deletions(-)
 copy dev-build/libtool/{libtool-9999.ebuild => libtool-2.5.0.ebuild} (78%)



 src_test() {
-	emake check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
+	(
+		# The testsuite is sensitive to warnings, expects static
+		# archives to really be archives (not compiler IR), etc.
+		strip-flags
+		filter-flags -fno-semantic-interposition
+		filter-flags '-Wstrict-aliasing=*' '-Werror=*'
+		filter-lto