Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Fails to build on Slackware64 14.2 #21

@zoot

Description

@zoot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions