Public bug reported:

taffybar 4.1.1-1ubuntu5 has been stuck in stonking-proposed for 55 days.
It builds on amd64v3, arm64, riscv64 and s390x but fails on amd64 and
ppc64el. Both failures appear linked to the Ubuntu delta that builds
with -fllvm (the LP: #2144301 workaround).

== amd64: haddock step fails ==
https://launchpad.net/ubuntu/+source/taffybar/4.1.1-1ubuntu5/+build/33476676

With -fllvm, the main build works: all 66 modules compile and the
taffybar binary links. The failure is in the haddock step. amd64 is the
only build that also builds the Architecture: all libghc-taffybar-doc
package (dpkg-buildpackage -b; the other architectures use -B). Haddock
recompiles the Template Haskell modules (DBus.Client.Util,
DBus.Client.Params) into /tmp/ghc*/ without -fllvm, but still with
Ubuntu's LTO link flags, which brings back the exact error from LP:
#2144301:

  /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/ghc19243_0/ghc_12.dyn_o: relocation 
R_X86_64_PC32 against symbol 
`taffybarzm4zi1zi1zm..._SystemziTaffybarziDBusziClientziUtil_..._closure' can 
not be used when making a shared object; recompile with -fPIC
  /usr/bin/x86_64-linux-gnu-ld.bfd: final link failed: bad value
  `x86_64-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1)

So the -fllvm workaround covers the main build but not haddock.

== ppc64el: GHC crashes with signal 11 ==
https://launchpad.net/ubuntu/+source/taffybar/4.1.1-1ubuntu5/+build/33476680

  [ 4 of 66] Compiling System.Taffybar.DBus.Client.UPowerDevice ...
  dh_auto_build: error: debian/hlibrary.setup build --builddir=dist-ghc died 
with signal 11

UPowerDevice is the first module that runs Template Haskell splices,
which load the -fllvm-compiled Util/Params objects into GHC's runtime
linker. Debian builds ppc64el fine without -fllvm (4.1.1-1+b2), so
-fllvm is the most likely cause, but this has not been confirmed.

== Root cause and suggested fix ==

haskell-devscripts turns Ubuntu's LTO LDFLAGS into GHC options (from the
configure line in the amd64 log):

  --ghc-option=-optl-flto=auto --ghc-option=-optl-ffat-lto-objects

GHC's native code generator output cannot be linked that way, which is
the original LP: #2144301 failure. Instead of switching to the LLVM
backend, disabling LTO for this package should match Debian's build:

  export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
  export DEB_SETUP_GHC_CONFIGURE_ARGS := --datasubdir=taffybar

dropping -fllvm, and probably the llvm-21/clang-21 build dependencies.
This has NOT been test-built. Check in the build log that -optl-
flto=auto really disappears from the configure line, since LP: #2144301
said the LTO flag was hard to override.

Fallbacks if that does not work:
- amd64: keep -fllvm and also pass it to haddock (e.g. 
--haddock-options=--optghc=-fllvm).
- ppc64el: only use -fllvm on architectures where it builds.

If the LTO opt-out works, it may also be a better fix for the other
Haskell packages affected by LP: #2144301 (e.g. haskell-x11-xft).

Note: armhf is in dependency wait on libghc-gtk-sni-tray-dev and libghc-
status-notifier-item-dev. Debian has the same situation (BD-
Uninstallable), so this is expected and not the blocker.

** Affects: taffybar (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169223

Title:
  taffybar FTBFS on amd64 (haddock: LTO relocation error) and ppc64el
  (GHC signal 11) with the -fllvm workaround

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/taffybar/+bug/2169223/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to