1.28.0-1 FTBFS in Jammy - libldc-jit.so not built

Bug #1951845 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ldc (Debian)
Fix Released
Unknown
ldc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is FTFBS for 12 days now
https://launchpadlibrarian.net/569860671/buildlog_ubuntu-jammy-amd64.ldc_1%3A1.28.0-1_BUILDING.txt.gz

The same in Debian worked fine
https://buildd.debian.org/status/fetch.php?pkg=ldc&arch=amd64&ver=1%3A1.28.0-1%2Bb1&stamp=1636718694&raw=1

Our fail is:
   dh_install
dh_install: warning: Cannot find (any matches for) "usr/lib/libldc-jit.so.*" (tried in ., debian/tmp)

dh_install: warning: libphobos2-ldc-shared98 missing files: usr/lib/libldc-jit.so.*
dh_install: warning: Cannot find (any matches for) "usr/lib/libldc-jit.so" (tried in ., debian/tmp)

dh_install: warning: libphobos2-ldc-shared-dev missing files: usr/lib/libldc-jit.so
dh_install: warning: Cannot find (any matches for) "usr/lib/libldc-jit-rt.a" (tried in ., debian/tmp)

dh_install: warning: libphobos2-ldc-shared-dev missing files: usr/lib/libldc-jit-rt.a

And the reason those do not exists seems to be in our config step already.
We have llvm 13 (biggest difference to Debian which has 11 still).

...
-- -- Building LDC with dynamic compilation support (LDC_DYNAMIC_COMPILE): OFF
...

While Debian has ON at the same config step.

This is locally reproducible in sbuild (the good Debian and the bad ubuntu build) and there via:

mkdir buildtest; cd buildtest; cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DD_COMPILER=/usr/bin/gdmd -DBUILD_SHARED_LIBS=ON ..

tags: added: update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Well, the LDC code is rather straight forward on this:

CMakeLists.txt:452
set(LDC_DYNAMIC_COMPILE "AUTO" CACHE STRING "Support dynamic compilation (ON|OFF). Enabled by default; not supported for LLVM >= 12.")

It turns out this is due to the internal ORCv1 API (dropped with LLVM 12) vs ORCv2 (added with LLVM 7).

In LDC this is known-disabled since
https://github.com/ldc-developers/ldc/commit/d8bc064cfbc766347d563cb139a72d238312bd38#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a

This is known upstream
https://github.com/ldc-developers/ldc/issues/3747
https://github.com/ldc-developers/ldc/pull/3184

Not a Problem for Debian yet until LLVM>=12 is the default.

For now we should be able to get this working by forcing llvm-11-dev

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Test config works fine, local build still ongoing.
If it succeeds I'll upload this to jammy.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The Upstream Author confirmed that this was an experimental feature and the right way forward probably is to disable it:
=> https://github.com/ldc-developers/ldc/issues/3747#issuecomment-975690206

For now I'll build it with llvm-11 (= as before)
=> uploaded

But to resolve it mid term I filed a bug with the backgrounds and the suggestion to disable it with Debian.
=> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000431

Changed in ldc (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ldc - 1:1.28.0-1ubuntu1

---------------
ldc (1:1.28.0-1ubuntu1) jammy; urgency=medium

  * d/control: force llvm-11 as ldc dynamic compile (jit) isn't
    compatible with >=12 (LP: #1951845)

 -- Christian Ehrhardt <email address hidden> Mon, 22 Nov 2021 16:33:44 +0100

Changed in ldc (Ubuntu):
status: Fix Committed → Fix Released
Changed in ldc (Debian):
status: Unknown → New
Changed in ldc (Debian):
status: New → Fix Released
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.