<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.freebsd.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.freebsd.org/bugzilla/"
          
          maintainer="bugmeister@FreeBSD.org"
>

    <bug>
          <bug_id>274337</bug_id>
          
          <creation_ts>2023-10-07 16:52:31 +0000</creation_ts>
          <short_desc>devel/onetbb: fix build with lld 17</short_desc>
          <delta_ts>2023-10-09 10:20:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Ports &amp; Packages</product>
          <component>Individual Port(s)</component>
          <version>Latest</version>
          <rep_platform>Any</rep_platform>
          <op_sys>Any</op_sys>
          <bug_status>Closed</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>Affects Some People</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>273753</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dimitry Andric">dim</reporter>
          <assigned_to name="Ganael LAPLANCHE">martymac</assigned_to>
          
          

      

      

      <flag name="maintainer-feedback"
          id="76381"
          type_id="3"
          status="?"
          setter="bugzilla"
          requestee="martymac"
    />

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1278802</commentid>
    <comment_count>0</comment_count>
    <who name="Dimitry Andric">dim</who>
    <bug_when>2023-10-07 16:52:31 +0000</bug_when>
    <thetext>Building devel/onetbb with lld 17 results in the following link errors:

  : &amp;&amp; /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=&quot;/wrkdirs/share/dim/ports/devel/onetbb/work/oneTBB-2021.10.0/src/tbbmalloc/def/lin64-tbbmalloc.def&quot;  -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 &amp;&amp; :
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;ITT_DoOneTimeInitialization&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;TBB_runtime_interface_version&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;get_memcpy_largest_cachelinesize&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;get_memcpy_largest_cache_size&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;get_mem_ops_method&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;init_mem_ops_method&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;irc__get_msg&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;irc__print&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;override_mem_ops_method&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;set_memcpy_largest_cachelinesize&apos; failed: symbol not defined
  ld: error: version script assignment of &apos;local&apos; to symbol &apos;set_memcpy_largest_cache_size&apos; 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 &gt;=
17 due to these undefined symbols.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1278803</commentid>
    <comment_count>1</comment_count>
      <attachid>245488</attachid>
    <who name="Dimitry Andric">dim</who>
    <bug_when>2023-10-07 16:52:49 +0000</bug_when>
    <thetext>Created attachment 245488
devel/onetbb: fix build with lld 17</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279076</commentid>
    <comment_count>2</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2023-10-09 10:19:36 +0000</bug_when>
    <thetext>A commit in branch main references this bug:

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

commit 3677983542cc09a0e5f085e463a895e9e4dce9aa
Author:     Dimitry Andric &lt;dim@FreeBSD.org&gt;
AuthorDate: 2023-10-09 10:16:49 +0000
Commit:     Ganael LAPLANCHE &lt;martymac@FreeBSD.org&gt;
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 &gt;= 17 due to these undefined symbols.

    PR:     274337
    Reported by:    dim

 devel/onetbb/Makefile | 5 +++++
 1 file changed, 5 insertions(+)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279077</commentid>
    <comment_count>3</comment_count>
    <who name="Ganael LAPLANCHE">martymac</who>
    <bug_when>2023-10-09 10:20:03 +0000</bug_when>
    <thetext>Committed, thanks Dimitry!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>245488</attachid>
            <date>2023-10-07 16:52:49 +0000</date>
            <delta_ts>2023-10-07 16:52:49 +0000</delta_ts>
            <desc>devel/onetbb: fix build with lld 17</desc>
            <filename>devel__onetbb-fix-lld17-build-1.diff</filename>
            <type>text/plain</type>
            <size>604</size>
            <attacher name="Dimitry Andric">dim</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2RldmVsL29uZXRiYi9NYWtlZmlsZSBiL2RldmVsL29uZXRiYi9NYWtlZmls
ZQppbmRleCBhZTAwMjJhN2FlNzguLjRiNGVhY2NmMGJlMCAxMDA2NDQKLS0tIGEvZGV2ZWwvb25l
dGJiL01ha2VmaWxlCisrKyBiL2RldmVsL29uZXRiYi9NYWtlZmlsZQpAQCAtMTgsNiArMTgsMTEg
QEAgQ01BS0VfQVJHUys9CS1EVEJCX1NUUklDVDpCT09MPUZBTFNFIFwKIAkJLURDTUFLRV9IV0xP
Q18yX0xJQlJBUllfUEFUSDpQQVRIPSIke0xPQ0FMQkFTRX0vbGliL2xpYmh3bG9jLnNvIiBcCiAJ
CS1EQ01BS0VfSFdMT0NfMl9JTkNMVURFX1BBVEg6UEFUSD0iJHtMT0NBTEJBU0V9L2luY2x1ZGUi
CiAKKyMgTWFueSBzeW1ib2xzIGluIHRoZSBsaW5rZXIgdmVyc2lvbiBzY3JpcHRzIGFyZSB1bmRl
ZmluZWQgYmVjYXVzZSBsaW5rIHRpbWUKKyMgb3B0aW1pemF0aW9uICgtZmx0bz10aGluKSByZW1v
dmVzIHRoZW0uIFN1cHByZXNzIGVycm9ycyB3aXRoIGxsZCA+PSAxNyBkdWUgdG8KKyMgdGhlc2Ug
dW5kZWZpbmVkIHN5bWJvbHMuCitMREZMQUdTKz0JLVdsLC0tdW5kZWZpbmVkLXZlcnNpb24KKwog
Q09ORkxJQ1RTPQl0YmIKIAogVVNFX0dJVEhVQj0JeWVzCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>