<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - unexpected lld error: undefined symbol: clntudp_create"
   href="https://bugs.llvm.org/show_bug.cgi?id=45318">45318</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>unexpected lld error: undefined symbol: clntudp_create
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pawel_sikora@zoho.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>hi,
the lld (targeting aarch64) reports unexepcted errors for glibc symbols used by
sigar library (e.g.: clntudp_create).

% readelf -sW sysroot/lib/libc-2.26.so|grep clntudp_create
  1954: 00000000000f8b50    40 FUNC    GLOBAL DEFAULT   11
<a href="mailto:clntudp_create@GLIBC_2.17">clntudp_create@GLIBC_2.17</a>
  7217: 00000000000f8b50    40 FUNC    LOCAL  DEFAULT   11 __EI_clntudp_create
  8092: 00000000000f8b50    40 FUNC    LOCAL  DEFAULT   11 __GI_clntudp_create
  9911: 00000000000f8b50    40 FUNC    GLOBAL DEFAULT   11
<a href="mailto:clntudp_create@GLIBC_2.17">clntudp_create@GLIBC_2.17</a>

% ./bugme.sh
clang version 10.0.0 (/home/pawels/src/toolchain/llvm/llvm-project/clang
b406eab888021ade8b4e680d2cf45b82fca17a98)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/pawels/dvm/devel/toolchain/llvm/sysroot/bin
 "/home/pawels/dvm/devel/toolchain/llvm/sysroot/bin/ld.lld" --sysroot=./sysroot
-EL --hash-style=gnu --eh-frame-hdr -m aarch64linux -shared -o libhes_au.so
./sysroot/lib/crti.o ./sysroot/lib/crtbeginS.o -L./sysroot/lib -z origin -rpath
"\$ORIGIN" --no-undefined -soname libhes_au.so --verbose
sources/au/auMemoryMonitor.cpp.o sources/au/auFmt.cpp.o
sources/au/auFormat.cpp.o sources/au/auException.cpp.o
sources/au/auString.cpp.o sources/au/auStringUnix.cpp.o
sources/au/auSystem.cpp.o sources/au/auSystemUnix.cpp.o
sources/au/auNumberParser.cpp.o sources/au/auRandom.cpp.o
sources/au/auContract.cpp.o sources/au/auPlatform.cpp.o ./libsigar.a -ldl -lc++
-lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc ./sysroot/lib/crtendS.o
./sysroot/lib/crtn.o
ld.lld: ./sysroot/lib/crti.o
ld.lld: ./sysroot/lib/crtbeginS.o
ld.lld: sources/au/auMemoryMonitor.cpp.o
ld.lld: sources/au/auFmt.cpp.o
ld.lld: sources/au/auFormat.cpp.o
ld.lld: sources/au/auException.cpp.o
ld.lld: sources/au/auString.cpp.o
ld.lld: sources/au/auStringUnix.cpp.o
ld.lld: sources/au/auSystem.cpp.o
ld.lld: sources/au/auSystemUnix.cpp.o
ld.lld: sources/au/auNumberParser.cpp.o
ld.lld: sources/au/auRandom.cpp.o
ld.lld: sources/au/auContract.cpp.o
ld.lld: sources/au/auPlatform.cpp.o
ld.lld: ./libsigar.a
ld.lld: ./sysroot/lib/libdl.so
ld.lld: ./sysroot/lib/libc++.so
ld.lld: ./sysroot/lib/libc++.so.1
ld.lld: ./sysroot/lib/libc++abi.so
ld.lld: ./sysroot/lib/libm.so
ld.lld: ./sysroot/lib/libgcc_s.so
ld.lld: ./sysroot/lib/libgcc.a
ld.lld: ./sysroot/lib/libpthread.so
ld.lld: ./sysroot/lib/libpthread.so.0
ld.lld: ./sysroot/lib/libpthread_nonshared.a
ld.lld: ./sysroot/lib/libc.so
ld.lld: ./sysroot/lib/libc.so.6
ld.lld: ./sysroot/lib/libc_nonshared.a
ld.lld: ./sysroot/lib/ld-linux-aarch64.so.1
ld.lld: ./sysroot/lib/libgcc_s.so
ld.lld: ./sysroot/lib/libgcc.a
ld.lld: ./sysroot/lib/crtendS.o
ld.lld: ./sysroot/lib/crtn.o
ld.lld: error: undefined symbol: clntudp_create
<span class="quote">>>> referenced by sigar_util.c
>>>               sigar_util.o:(sigar_rpc_ping) in archive ./libsigar.a
>>> did you mean: clntudp_create
>>> defined in: ./sysroot/lib/libc.so.6</span >

ld.lld: error: undefined symbol: xdr_void
<span class="quote">>>> referenced by sigar_util.c
>>>               sigar_util.o:(sigar_rpc_ping) in archive ./libsigar.a
>>> referenced by sigar_util.c
>>>               sigar_util.o:(sigar_rpc_ping) in archive ./libsigar.a
>>> did you mean: xdr_void
>>> defined in: ./sysroot/lib/libc.so.6</span >

ld.lld: error: undefined symbol: clnttcp_create
<span class="quote">>>> referenced by sigar_util.c
>>>               sigar_util.o:(sigar_rpc_ping) in archive ./libsigar.a</span >
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>