Bug 274146 - databases/tdb: fix build with lld 17
Summary: databases/tdb: fix build with lld 17
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: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-09-28 17:09 UTC by Dimitry Andric
Modified: 2023-10-15 16:03 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments
databases/tdb: fix build with lld 17 (788 bytes, patch)
2023-09-28 17:09 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-09-28 17:09:20 UTC
Building databases/tdb with lld 17 results in the following link errors:

11:57:13 runner ['cc', '-Wl,--version-script=/wrkdirs/usr/ports/databases/tdb/work/tdb-1.4.7/bin/default/tdb.vscript', '-shared', '-Wl,-h,libtdb.so.1', 'lib/replace/replace.c.2.o', 'lib/replace/strptime.c.2.o', 'lib/replace/xattr.c.2.o', 'common/check.c.1.o', 'common/error.c.1.o', 'common/tdb.c.1.o', 'common/traverse.c.1.o', 'common/freelistcheck.c.1.o', 'common/lock.c.1.o', 'common/dump.c.1.o', 'common/freelist.c.1.o', 'common/io.c.1.o', 'common/open.c.1.o', 'common/transaction.c.1.o', 'common/hash.c.1.o', 'common/summary.c.1.o', 'common/rescue.c.1.o', 'common/mutex.c.1.o', '-o/wrkdirs/usr/ports/databases/tdb/work/tdb-1.4.7/bin/default/libtdb.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lpthread', '-fstack-protector-strong', '-Wl,-no-undefined']
ld: error: version script assignment of 'TDB_1.2.1' to symbol 'tdb_do_delete' failed: symbol not defined
ld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined
ld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined
ld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)

Since the linker version scripts are generated dynamically, suppress
errors with lld >= 17 due to these undefined symbols.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-09-28 17:09:49 UTC
Created attachment 245310 [details]
databases/tdb: fix build with lld 17
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-10-15 15:46:35 UTC
A commit in branch main references this bug:

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

commit bc9cbb7a3ac19cd58f0e910cc3438a786c173c93
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-09-28 17:07:19 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-10-15 15:44:41 +0000

    databases/tdb: fix build with lld 17

    Building databases/tdb with lld 17 results in the following link errors:

      11:57:13 runner ['cc', '-Wl,--version-script=/wrkdirs/usr/ports/databases/tdb/work/tdb-1.4.7/bin/default/tdb.vscript', '-shared', '-Wl,-h,libtdb.so.1', 'lib/replace/replace.c.2.o', 'lib/replace/strptime.c.2.o', 'lib/replace/xattr.c.2.o', 'common/check.c.1.o', 'common/error.c.1.o', 'common/tdb.c.1.o', 'common/traverse.c.1.o', 'common/freelistcheck.c.1.o', 'common/lock.c.1.o', 'common/dump.c.1.o', 'common/freelist.c.1.o', 'common/io.c.1.o', 'common/open.c.1.o', 'common/transaction.c.1.o', 'common/hash.c.1.o', 'common/summary.c.1.o', 'common/rescue.c.1.o', 'common/mutex.c.1.o', '-o/wrkdirs/usr/ports/databases/tdb/work/tdb-1.4.7/bin/default/libtdb.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lpthread', '-fstack-protector-strong', '-Wl,-no-undefined']
      ld: error: version script assignment of 'TDB_1.2.1' to symbol 'tdb_do_delete' failed: symbol not defined
      ld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined
      ld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined
      ld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined
      cc: error: linker command failed with exit code 1 (use -v to see invocation)

    Since the linker version scripts are generated dynamically, suppress
    errors with lld >= 17 due to these undefined symbols.

    PR:             274146
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2023Q4

 databases/tdb/Makefile | 4 ++++
 1 file changed, 4 insertions(+)