So, I picked it up from where Simon left off, and I managed to figure out what's causing the FTBFS. It's our use of -Wl,-Bsymbolic-functions. If we strip this flag from LDFLAGS, the build succeeds.
I would like to leave a few notes here, though.
- It's possible to obtain a verbose build from gch by passing "-v" to it. Because the build system is using cabal, we actually need to instruct it to pass the flag down to ghc. You can do it by:
export BUILDEROPTIONS += --ghc-option=-v
- By comparing the actual linker invocation between Debian and Ubuntu, I noticed that it isn't only -Wl,-Bsymbolic-functions (and LTO) that differs. Debian is building the package using "-no-pie -fno-PIC", while Ubuntu builds it using "-shared" (but no "-fPIC"). I tried finding the reason for this discrepancy, but everything other than the versions of the toolchain tools seems to be the same.
- Passing "-fPIC" to ghc (by using --ghc-option=-fPIC) doesn't solve the issue, either. There is something else at play here. Unfortunately, I don't have the time to dive deeper into the issue right now.
I'll upload a new version of git-annex with -Wl,-Bsymbolic-functions stripped soon, and will also propose the change to Debian.
Hey,
So, I picked it up from where Simon left off, and I managed to figure out what's causing the FTBFS. It's our use of -Wl,-Bsymbolic- functions. If we strip this flag from LDFLAGS, the build succeeds.
I would like to leave a few notes here, though.
- It's possible to obtain a verbose build from gch by passing "-v" to it. Because the build system is using cabal, we actually need to instruct it to pass the flag down to ghc. You can do it by:
export BUILDEROPTIONS += --ghc-option=-v
- By comparing the actual linker invocation between Debian and Ubuntu, I noticed that it isn't only -Wl,-Bsymbolic- functions (and LTO) that differs. Debian is building the package using "-no-pie -fno-PIC", while Ubuntu builds it using "-shared" (but no "-fPIC"). I tried finding the reason for this discrepancy, but everything other than the versions of the toolchain tools seems to be the same.
- Passing "-fPIC" to ghc (by using --ghc-option=-fPIC) doesn't solve the issue, either. There is something else at play here. Unfortunately, I don't have the time to dive deeper into the issue right now.
I'll upload a new version of git-annex with -Wl,-Bsymbolic- functions stripped soon, and will also propose the change to Debian.