git-annex 10.20230126-3 fails to build from source

Bug #2019992 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ghc (Ubuntu)
New
Undecided
Unassigned
git-annex (Ubuntu)
Confirmed
High
Unassigned

Bug Description

git-annex 10.20230126-3 fails to build from source:

```
[618 of 681] Compiling Assistant.WebApp.Types ( Assistant/WebApp/Types.hs, dist/build/git-annex/git-annex-tmp/Assistant/WebApp/Types.o, dist/build/git-annex/git-annex-tmp/Assistant/WebApp/Types.dyn_o )
/usr/bin/ld.gold: error: dist/build/git-annex/git-annex-tmp/Utility/Yesod.dyn_o: requires dynamic R_X86_64_PC32 reloc against 'UtilityziYesod_widgetFilezuw_closure' which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
`x86_64-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1)
```

Full amd64 build log: https://launchpadlibrarian.net/664477495/buildlog_ubuntu-mantic-amd64.git-annex_10.20230126-3_BUILDING.txt.gz

Benjamin Drung (bdrung)
Changed in git-annex (Ubuntu):
importance: Undecided → High
status: New → Confirmed
tags: added: update-excuse
Revision history for this message
Simon Chopin (schopin) wrote :

I looked at this issue for quite a while. The package does *not* FTBFS in Debian. I tried passing various combinations of PIC and PIE flags to ghc, to no avail. Sadly, I wasn't able to even determine that the flags I gave made their way down to the linker invocation, since it's not possible for ghc to be loud in its invocation.

However, comparing the results of the Debian and Ubuntu compilation, the .o file contains in both cases the R_X86_64_PC32 relocation, which makes me think that it's a difference in linker behaviour. I wasn't able to find anything suspicious in our binutils delta with Debian.

I'm assigning this to GHC because it seems clearly a toolchain issue to me.

For whoever picks it up again, note that build parallelism is disabled at the top of d/rules. For your builds you might want to enable it again (simply use -j instead of -j1).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.