Bug 274337 - devel/onetbb: fix build with lld 17
Summary: devel/onetbb: 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: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-10-07 16:52 UTC by Dimitry Andric
Modified: 2023-10-09 10:20 UTC (History)
0 users

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


Attachments
devel/onetbb: fix build with lld 17 (604 bytes, patch)
2023-10-07 16:52 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-10-07 16:52:31 UTC
Building devel/onetbb with lld 17 results in the following link errors:

  : && /usr/bin/cc -fPIC -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -flto=thin  -fstack-protector-strong  -Wl,--version-script="/wrkdirs/share/dim/ports/devel/onetbb/work/oneTBB-2021.10.0/src/tbbmalloc/def/lin64-tbbmalloc.def"  -Wl,-z,relro,-z,now -shared -Wl,-soname,libtbbmalloc.so.2 -o clang_17.0_cxx11_64_release/libtbbmalloc.so.2.10 src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.o  -pthread && :
  ld: error: version script assignment of 'local' to symbol 'ITT_DoOneTimeInitialization' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'TBB_runtime_interface_version' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'get_memcpy_largest_cachelinesize' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'get_memcpy_largest_cache_size' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'get_mem_ops_method' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'init_mem_ops_method' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'irc__get_msg' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'irc__print' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'override_mem_ops_method' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'set_memcpy_largest_cachelinesize' failed: symbol not defined
  ld: error: version script assignment of 'local' to symbol 'set_memcpy_largest_cache_size' failed: symbol not defined
  cc: error: linker command failed with exit code 1 (use -v to see invocation)

Many symbols in the linker version scripts are undefined because link
time optimization (-flto=thin) removes them. Suppress errors with lld >=
17 due to these undefined symbols.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-10-07 16:52:49 UTC
Created attachment 245488 [details]
devel/onetbb: fix build with lld 17
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-10-09 10:19:36 UTC
A commit in branch main references this bug:

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

commit 3677983542cc09a0e5f085e463a895e9e4dce9aa
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-10-09 10:16:49 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2023-10-09 10:16:49 +0000

    devel/onetbb: fix build with lld 17

    Many symbols in the linker version scripts are undefined because link
    time optimization (-flto=thin) removes them. Suppress errors with
    lld >= 17 due to these undefined symbols.

    PR:     274337
    Reported by:    dim

 devel/onetbb/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Comment 3 Ganael LAPLANCHE freebsd_committer freebsd_triage 2023-10-09 10:20:03 UTC
Committed, thanks Dimitry!