Bug 264100 - lang/ldc: Fails to link on 13.1-RELEASE: ld: error: undefined hidden symbol: __start___minfo
Summary: lang/ldc: Fails to link on 13.1-RELEASE: ld: error: undefined hidden symbol: ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks: 264030
  Show dependency treegraph
 
Reported: 2022-05-20 12:41 UTC by Jason W. Bacon
Modified: 2022-11-16 00:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (acm)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2022-05-20 12:41:50 UTC
Running Lang-speed benchmark, ldc works fine on 13.0-RELEASE, but fails with the following link error on 13.1-RELEASE:

https://github.com/outpaddling/Lang-speed

Compiling with ldc2...
LDC - the LLVM D compiler (1.23.0):
  based on DMD v2.093.1 and LLVM 10.0.1
  built with LDC - the LLVM D compiler (0.17.6)
  Default target: x86_64-portbld-freebsd13.0
  Host CPU: ivybridge
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore
ld: error: undefined hidden symbol: __start___minfo
>>> referenced by selsort.d
>>>               selsort-d.o:(ldc.register_dso)

ld: error: undefined hidden symbol: __stop___minfo
>>> referenced by selsort.d
>>>               selsort-d.o:(ldc.register_dso)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Error: /usr/bin/cc failed with status: 1
Comment 1 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2022-11-15 00:13:44 UTC
Please, could you try new version of ldc (1.30.0)?
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2022-11-15 12:41:05 UTC
Build succeeds now, thanks.  Still has a couple cosmetic issues:

-- Installing: /usr/ports/lang/ldc/work/stage/usr/local/include/d/ldc/gccbuiltins_s390.di
-- Installing: /usr/ports/lang/ldc/work/stage/usr/local/include/d/ldc/gccbuiltins_x86.di
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
Warning: 'bin/ldmd2' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'bin/ldc-build-runtime' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Warning: 'bin/ldc-prune-cache' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
Error: /usr/local/bin/ldc-build-runtime is linked to /usr/local/lib/gcc11/libgphobos.so.2 from lang/gcc11 but it is not declared as a dependency
Comment 3 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2022-11-15 16:27:25 UTC
(In reply to Jason W. Bacon from comment #2)
I  have committed new changes to lang/ldc. It should fix stage-qa messages. Thanks for your PR
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2022-11-15 20:51:48 UTC
Great, thanks.  Still some portlint issue, FYI.  I hadn't run portlint before the last check.

WARN: Makefile: [16]: BROKEN messages should begin with a lowercase letter and end without a period.
FATAL: Makefile: DISTVERSIONSUFFIX appears out-of-order.
FATAL: Makefile: order must be PORTNAME/PORTVERSION/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX/PORTREVISION/PORTEPOCH/CATEGORIES/MASTER_SITES/MASTER_SITE_SUBDIR/PROJECTHOST/PKGNAMEPREFIX/PKGNAMESUFFIX/DISTNAME/EXTRACT_SUFX/DISTFILES(_\w+)?/DIST_SUBDIR/EXTRACT_ONLY.
WARN: Makefile: new ports should not set PORTREVISION.
WARN: /usr/ports/lang/ldc/files/patch-runtime_CMakeLists.txt: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
2 fatal errors and 3 warnings found.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-11-16 00:29:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=faab0eb2bebff16152b11515792d1953301fdbde

commit faab0eb2bebff16152b11515792d1953301fdbde
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2022-11-16 00:26:27 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2022-11-16 00:26:27 +0000

    lang/ldc: Make portlint friendly

    PR:             264100
    Reported by:    jwb

 lang/ldc/Makefile                             | 2 +-
 lang/ldc/files/patch-driver_linker-gcc.cpp    | 8 ++++----
 lang/ldc/files/patch-driver_targetmachine.cpp | 4 ++--
 lang/ldc/files/patch-runtime_CMakeLists.txt   | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)