Giter Site home page Giter Site logo

/usr/bin/ld: cannot find -lyajl about kcat HOT 7 CLOSED

edenhill avatar edenhill commented on June 12, 2024
/usr/bin/ld: cannot find -lyajl

from kcat.

Comments (7)

tekumara avatar tekumara commented on June 12, 2024 1

I got this problem running ./bootstrap.sh:

....
Building libyajl
== removing old build files
== running CMake in build directory
./configure: 41: ./configure: cmake: not found
The "cmake" program is required to configure yajl.
....
Creating program kafkacat
gcc  -Itmp-bootstrap/usr/local/include -Itmp-bootstrap/usr/local/include -g -O2 -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align  kafkacat.o format.o tools.o json.o -o kafkacat  -L/usr/local/lib  -lpthread -lz -lcrypto -lssl -lsasl2 -lrt -ldl   -Wl,-Bstatic -lyajl -Wl,-Bdynamic tmp-bootstrap/usr/local/lib/librdkafka.a  -L/usr/local/lib  -lpthread -lz -lcrypto -lssl -lsasl2 -lrt -ldl  
/usr/bin/ld: cannot find -lyajl
collect2: error: ld returned 1 exit status
mklove/Makefile.base:134: recipe for target 'kafkacat' failed
make: *** [kafkacat] Error 1

Solved by installing cmake: sudo apt-get install cmake

from kcat.

edenhill avatar edenhill commented on June 12, 2024

What does ldd kafkacat tell you?

from kcat.

giaosudau avatar giaosudau commented on June 12, 2024

@edenhill

$ make
Creating program kafkacat
gcc -Itmp-bootstrap/usr/local/include -g -O2 -Wall -Wfloat-equal -Wpointer-arith -Itmp-bootstrap/usr/local/include -g -O2 -Wall -Wfloat-equal -Wpointer-arith  kafkacat.o format.o json.o -o kafkacat -L/usr/local/lib  -lpthread -lz -lssl -lcrypto -lsasl2 -lrt   tmp-bootstrap/usr/local/lib/librdkafka.a -Wl,-Bstatic -lyajl -Wl,-Bdynamic -L/usr/local/lib  -lpthread -lz -lssl -lcrypto -lsasl2 -lrt   tmp-bootstrap/usr/local/lib/librdkafka.a -Wl,-Bstatic -lyajl -Wl,-Bdynamic
/usr/bin/ld: cannot find -lyajl
collect2: error: ld returned 1 exit status
make: *** [kafkacat] Error 1

It's stuck in make step and can't make install
I don't know what you mean ldd kafkacat.

from kcat.

vincentbernat avatar vincentbernat commented on June 12, 2024

I think it is looking at libyajl.a (due to requesting static linking). Dunno why static linking was requested, I don't know enough about mklove.

from kcat.

edenhill avatar edenhill commented on June 12, 2024

That's the bootstrap script that links both librdkafka and libyajl statically.

@giaosudau But I think you are using an older version of kafkacat, can you update to latest master, remove tmp-bootstrap, and try again?

from kcat.

giaosudau avatar giaosudau commented on June 12, 2024

@edenhill I clone from master branch today.

from kcat.

edenhill avatar edenhill commented on June 12, 2024

Are you running ./bootstrap.sh or ./configure + make?

from kcat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.