<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wl,--no-undefined gives undefined references to libc symbols on OpenBSD"
href="https://bugs.freedesktop.org/show_bug.cgi?id=76856">76856</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Wl,--no-undefined gives undefined references to libc symbols on OpenBSD
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>OpenBSD
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jsg@openbsd.org
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Component</th>
<td>Other
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>Mesa libraries no longer link on OpenBSD after the -Wl,--no-undefined changes
due to missing symbols from libc.
ie:
/bin/sh ../../../libtool --tag=CC --mode=link gcc -pthread -g -O2 -Wall
-std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes
-fno-strict-aliasing -fno
-builtin-memcmp -g -O0 -no-undefined -Wl,--gc-sections -Wl,--no-undefined
-L/usr/local/lib -o libglapi.la -rpath /usr/mesa/lib entry.lo mapi_glapi.lo
stub.lo table.lo u_curr
ent.lo u_execmem.lo -lpthread
libtool: link: gcc -shared -fPIC -DPIC -o .libs/libglapi.so.0.0 .libs/entry.o
.libs/mapi_glapi.o .libs/stub.o .libs/table.o .libs/u_current.o
.libs/u_execmem.o -L/usr/loc
al/lib -lpthread -pthread -O2 -O0 -Wl,--gc-sections -Wl,--no-undefined
-pthread -pthread
/usr/bin/ld: Warning: gc-sections option ignored
.libs/mapi_glapi.o(.text+0x79): In function `_glapi_add_dispatch':
../../../src/mapi/mapi_glapi.c:123: undefined reference to `memset'
.libs/stub.o(.text+0x5b): In function `stub_compare':
../../../src/mapi/stub.c:78: undefined reference to `strcmp'
.libs/stub.o(.text+0x8a): In function `stub_find_public':
../../../src/mapi/stub.c:87: undefined reference to `bsearch'
.libs/stub.o(.text+0x18b): In function `stub_find_dynamic':
../../../src/mapi/stub.c:136: undefined reference to `__assert2'
.libs/stub.o(.text+0x1cb):../../../src/mapi/stub.c:140: undefined reference to
`strcmp'
.libs/stub.o(.text+0x458): In function `stub_get_addr':
../../../src/mapi/stub.c:226: undefined reference to `__assert2'
.libs/table.o(.text+0x1e): In function `noop_warn':
../../../src/mapi/table.c:39: undefined reference to `getenv'
.libs/table.o(.text+0x2f):../../../src/mapi/table.c:39: undefined reference to
`getenv'
.libs/table.o(.text+0x5e):../../../src/mapi/table.c:42: undefined reference to
`__sF'
.libs/table.o(.text+0x7a):../../../src/mapi/table.c:42: undefined reference to
`fprintf'
.libs/u_current.o(.text+0x4a): In function `u_tsd_init':
../../../src/mapi/u_thread.h:111: undefined reference to `perror'
.libs/u_current.o(.text+0x54):../../../src/mapi/u_thread.h:112: undefined
reference to `exit'
.libs/u_current.o(.text+0x239): In function `u_tsd_set':
../../../src/mapi/u_thread.h:135: undefined reference to `perror'
.libs/u_current.o(.text+0x243):../../../src/mapi/u_thread.h:136: undefined
reference to `exit'
.libs/u_execmem.o(.text+0x31): In function `init_map':
../../../src/mapi/u_execmem.c:81: undefined reference to `mmap'
This is not limited to mapi, libglx fails in a similiar way.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>