[Bug 283134] lang/ldc: build against llvm 15 only

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 04 Dec 2024 20:38:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283134

            Bug ID: 283134
           Summary: lang/ldc: build against llvm 15 only
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: acm@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(acm@FreeBSD.org)
          Assignee: acm@FreeBSD.org

During the exp-run for bug 283013 ("update LLVM_DEFAULT to 18") it
turned out that lang/ldc fails to build, with an error similar
to:

-- Found LLVM: /usr/local/llvm18 (found suitable version "18.1.8", minimum
required is "15.0")
-- Using LLVM Version 18.1
-- LDC version identifier: 1.39.0
-- -- Building LDC with dynamic compilation support (LDC_DYNAMIC_COMPILE): OFF
-- -- Building LDC with integrated LLD linker (LDC_WITH_LLD): ON
-- -- Building LDC with enabled assertions (LDC_ENABLE_ASSERTIONS): OFF
CMake Error at cmake/Modules/ExtractDMDSystemLinker.cmake:42 (message):
  Failed to link empty D program using
  '/wrkdirs/usr/ports/lang/ldc/work/ldc2-1.39.0-freebsd-x86_64/bin/ldmd2
  -wi':

  ld-elf.so.1: Shared object "libLLVM-15.so" not found, required by "ldmd2"
Call Stack (most recent call first):
  CMakeLists.txt:630 (include)

The issue is that the prebuilt bootstrap D compiler is linked against
libLLVM-15.so:

$ ldd /wrkdirs/usr/ports/lang/ldc/work/ldc2-1.39.0-freebsd-x86_64/bin/ldc2
/wrkdirs/usr/ports/lang/ldc/work/ldc2-1.39.0-freebsd-x86_64/bin/ldc2:
        libLLVM-15.so => /usr/local/llvm15/lib/libLLVM-15.so (0x2643fb200000)
        libthr.so.3 => /lib/libthr.so.3 (0x2643f91d6000)
        libm.so.5 => /lib/libm.so.5 (0x2643faa83000)
        libc++.so.1 => /lib/libc++.so.1 (0x2643f9b25000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x264403214000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x264403624000)
        libc.so.7 => /lib/libc.so.7 (0x264403837000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x264404122000)
        librt.so.1 => /lib/librt.so.1 (0x2644021d0000)
        libz.so.6 => /lib/libz.so.6 (0x26440493d000)
        libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0x264405463000)
        libsys.so.7 => /lib/libsys.so.7 (0x264406507000)
        libelf.so.2 => /lib/libelf.so.2 (0x2644071b8000)
        [vdso] (0x2643f8a63000)

Therefore, this port cannot really build against any other package than
devel/llvm15.

-- 
You are receiving this mail because:
You are the assignee for the bug.