unlinked libraries in a makefile?

Posted by wyatt on Super User See other posts from Super User or by wyatt
Published on 2010-05-10T20:06:56Z Indexed on 2010/05/10 20:14 UTC
Read the original article Hit count: 608

Filed under:
|

I'm trying to install a libspopc, but when I run the make I get the following output:

cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c session.c
cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c queries.c
cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c parsing.c
cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c format.c
cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c objects.c
cc -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL -c libspopc.c
rm -f libspopc*.a
ar r libspopc-0.9n.a session.o queries.o parsing.o format.o objects.o libspopc.o
ar: creating libspopc-0.9n.a
ranlib libspopc-0.9n.a
ln -s libspopc-0.9n.a libspopc.a
rm -f libspopc*.so
cc -o libspopc-0.9n.so -shared session.o queries.o parsing.o format.o objects.o libspopc.o
ln -s libspopc-0.9n.so libspopc.so
cc -o poptest1 -Wall -Wextra -pedantic -pipe -fPIC -Os -DUSE_SSL examples/poptest1.c -L. -lspopc -lssl -lcrypto
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x2d): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x43): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x4d): undefined reference to `dlclose'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x8f): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0xe9): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x491): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x570): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x5f1): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x6d0): undefined reference to `dlerror'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x735): undefined reference to `dlclose'
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x817): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x88e): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x8d5): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [poptest1] Error 1

A quick search suggested that this was due to libdl being unlinked, though this seems unlikely in a distributed library, particularly a seemingly relatively popular one. Could anything else be causing this? And if it is due to an unlinked library, how would I go about fixing it?

Thanks

© Super User or respective owner

Related posts about makefile

Related posts about ubuntu