I am trying to build librdkarfa during docker build in a container based on Alpine 3.6. I am just cloning the repository, running configure and make. I got to the point that configure passes, although it says:
disabling linker-script since python is not available
When I run make, though, I get
...
Generating linker script librdkafka.lds from rdkafka.h
env: can't execute 'python': No such file or directory
make[1]: Leaving directory '/librdkafka/src'
make[1]: *** [Makefile:78: librdkafka.lds] Error 127
make: *** [Makefile:20: libs] Error 2
I think that this should either fail in configure or work in make 馃檪
Dockerfile:
FROM golang:1.8.3-alpine3.6
RUN apk update
# Compile librdkafka.
RUN apk add git bash build-base openssl-dev
RUN set -eux; \
git clone https://github.com/edenhill/librdkafka.git /librdkafka; \
cd /librdkafka; \
./configure --prefix /usr; \
make; \
make install
I had a similar problem with ubuntu 16.04 as python2 does not come bundled and there is no link for python as is.
As a workaround I created a symlink /usr/bin/python -> /usr/bin/python3 and this worked fine.
It seems there is some hard dependency of python and no checks of whether 2 or 3 is available, but I had no time to actually dig the issue.
It is likely you'll have to install python to workaround this for the time being.
fixed on master
Please verify that this fix works for you, thanks
Hi @edenhill ,
I try to use #1358, but still get "disabling linker-script since python is not available" when ./configure
Librdkafka master now requires python 3 and the python3 interpreter
Most helpful comment
fixed on master