You are not logged in.

#1 2024-09-21 12:54:27

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,877

strip breaks lto build

Recently mesa-git required a newer version of directx-headers that the one in repos, so as co-maintainer I switched the dependency from directx-headers to aur directx-headers-git

Build tests on my own systems worked fine, but several users reported build failures I couldn't reproduce .
The users were asked to build in clean chroots, but this didn't solve the issue.

I investigated and realised the directx-headers-git I used was build on my live system.
Building it with pkgctl did give the same error during building mesa-git that users reported .

I looked very close at the build logs, but didn't see anything suspicious.
The terminal output however did give an important clue .

  -> Stripping unneeded symbols from binaries and libraries...
strip: ./usr/lib/stADczKO/src_dxguids.cpp.o: plugin needed to handle lto object
strip: ./usr/lib/stXo3DY8/src_dxguids.cpp.o: plugin needed to handle lto object
strip: ./usr/lib/stkCTnDj/src_d3dx12_property_format_table.cpp.o: plugin needed to handle lto object
strip: ./usr/lib/stgptr0C/src_d3dx12_property_format_table.cpp.o: plugin needed to handle lto object
  -> Compressing man and info pages...

On my live system makepkg.conf disables lto unconditionally* .
Adding options=(!lto) solved the buiold failure for mesa-git and gave this as terminal output .

  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
$ type strip
strip is /usr/bin/strip
$ pacman -Qo /usr/bin/strip
/usr/bin/strip is owned by binutils 2.43+r4+g7999dae6961-1
$ 

Should i file a bugreport against arch binutils package or upstream ?

While the cause is now known, the lack of logging in makepkg for such cases makes it very easy to miss the problem.

Would a bugreport to add logging a good idea ?
If so, should the BR be filed against archlinux pacman package or upstream ?



*packages I maintain that do work with lto explicilty enable it.

Last edited by Lone_Wolf (2024-09-21 12:56:01)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#2 2024-09-21 14:52:25

seth
Member
Registered: 2012-09-03
Posts: 58,119

Offline

#3 2024-09-21 15:31:32

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,877

Re: strip breaks lto build

Building with CXXFLAGS+=" -ffat-lto-objects" does have the same effect as disabling lto :
- no errors when building directx-headers-git
- mesa-git finds what it needs

Seems I need to read up on (dis)advantages of fat-lto-objects.
(There must be  a reason why it's not set by default)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2024-09-21 16:07:55

seth
Member
Registered: 2012-09-03
Posts: 58,119

Offline

#5 2024-09-21 16:13:35

loqs
Member
Registered: 2014-03-06
Posts: 17,985

Re: strip breaks lto build

Why are object files being packaged in directx-headers-git?

Offline

#6 2024-09-21 16:21:06

seth
Member
Registered: 2012-09-03
Posts: 58,119

Re: strip breaks lto build

https://gitlab.archlinux.org/archlinux/ … type=heads has two static objects and !lto

usr/lib/libDirectX-Guids.a
usr/lib/libd3dx12-format-properties.a

Offline

Board footer

Powered by FluxBB