[Mesa-dev] [Bug 76856] New: -Wl, --no-undefined gives undefined references to libc symbols on OpenBSD

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 31 11:12:03 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=76856

          Priority: medium
            Bug ID: 76856
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: -Wl,--no-undefined gives undefined references to libc
                    symbols on OpenBSD
          Severity: normal
    Classification: Unclassified
                OS: OpenBSD
          Reporter: jsg at openbsd.org
          Hardware: Other
            Status: NEW
           Version: git
         Component: Other
           Product: Mesa

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140331/b676defa/attachment-0001.html>


More information about the mesa-dev mailing list