Linker can't find zlib or OpenSSL?

78 views Asked by At

I'm trying to compile shared object using this guidance. https://github.com/KxSystems/kafka/blob/master/docs/install.md

I'm failing on Step 2 when running "make". I have everything setup accordingly.

$ echo $QHOME
/home/h0ax/q
$ echo $KAFKA_ROOT
/usr/include
$ ls  /usr/include | grep librdkafka
librdkafka

Here is an error:

cc kfk.c -m64 -DKXVER=3 -shared -fPIC -Wall -Wno-strict-aliasing -Wno-parentheses -Wextra -Werror -Wsign-compare -Wno-ignored-qualifiers -L"/usr/include"/lib/ -lrdkafka -lz -lpthread -lssl -g -O2 -I"/usr/include"/include -lrt -o libkfk.so
/usr/bin/ld: cannot find -lz: No such file or directory
/usr/bin/ld: cannot find -lssl: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:32: all] Error 1
1

There are 1 answers

0
h0ax On

Installing this libraries fixed the issue

sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev

I'm using windows subsytem linux with Ubuntu 22.04.3 LTS