Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Slackware64 14.2 #21

Open
zoot opened this issue Apr 17, 2017 · 3 comments
Open

Fails to build on Slackware64 14.2 #21

zoot opened this issue Apr 17, 2017 · 3 comments

Comments

@zoot
Copy link

zoot commented Apr 17, 2017

Hi there

I discovered a build bug when compiling under Slackware64 14.2

The build failed with:

g++ -g -O2 -Wall -fPIC -fsigned-char -g0 -O2 -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -o ktserver ktserver.o myscript.o \
  -L. -L/pkg/kyototycoon-al/20170410/lib -L/usr/local/lib -L/usr/local/lib/lua -L/pkg/kyotocabinet-al/20170410/lib -L/pkg/lua/5.1.5/lib -Wl,-rpath-link,.:/usr/local/lib:.:/usr/local/lib::/usr/local/lib/lua:/pkg/kyotocabinet-al/20170410/lib:/pkg/lua/5.1.5/lib -Wl,--as-needed  -lkyototycoon -lkyotocabinet -llua
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: /pkg/lua/5.1.5/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:535: recipe for target 'ktserver' failed

So, searching the web for:

"liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'"

... led me to this link

... which states:

-ldl where dlclose@@GLIBC_2.2.5 should be after -llua, where this symbol is used.

So I patched the Makefile as follows to correct the issue:

cd /path/to/kyoto/kyototycoon
sed -i 's/CMDLIBS =  -lkyotocabinet -llua/CMDLIBS =  -lkyotocabinet -llua -ldl/' Makefile
@carlosefr
Copy link
Contributor

I can't reproduce this issue on macOS, Debian or CentOS, but I've commited a tentative fix (carlosefr@4d77ac4) that doesn't involve modifying files created during the build process. Can you try building from my fork[1] and see if it solves it?

[1] https://github.com/carlosefr/kyoto

@zoot
Copy link
Author

zoot commented Apr 18, 2017

Morning Carlos

I had the same reservations regarding patching the Makefile itself.

Yes, that resolves it, thank you.

@carlosefr
Copy link
Contributor

Great. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants