varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

make fails, Unknown option: -o #88

Closed JereMalinen closed 6 years ago

JereMalinen commented 6 years ago

First I experienced this on Ubuntu, but it is bit old (12.04), so thought that maybe I have some old packages which aren't compatible anymore. But then I was able to reproduce same on fresh Docker image...

Dockerfile:

FROM centos:7

RUN yum install -y epel-release
RUN yum install -y autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz wget make

RUN wget http://varnish-cache.org/_downloads/varnish-5.2.0.tgz
RUN tar -zxvf varnish-5.2.0.tgz
RUN cd varnish-5.2.0 && sh autogen.sh && sh configure && make && make install && ldconfig

RUN yum install -y varnish-libs-devel
RUN wget https://github.com/varnish/varnish-modules/archive/0.12.1.tar.gz
RUN tar -zxvf 0.12.1.tar.gz
RUN cd varnish-modules-0.12.1 && export PKG_CONFIG_PATH=../varnish-5.2.0 && ./bootstrap && ./configure && make && make install
docker build -t varnish-dev:5.2.0 .
Sending build context to Docker daemon  30.72kB
Step 1/14 : FROM centos:7
 ---> d123f4e55e12
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make  all-recursive
make[1]: Entering directory `/varnish-modules-0.12.1'
Making all in src
make[2]: Entering directory `/varnish-modules-0.12.1/src'
  VMODTOOL vcc_bodyaccess_if.c
Unknown option: -o
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
make[2]: *** [vcc_bodyaccess_if.c] Error 2
make[2]: Leaving directory `/varnish-modules-0.12.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/varnish-modules-0.12.1'
make: *** [all] Error 2
The command '/bin/sh -c cd varnish-modules-0.12.1 && export PKG_CONFIG_PATH=../varnish-5.2.0 && ./bootstrap && ./configure && make && make install' returned a non-zero code: 2
JereMalinen commented 6 years ago

Colleague solved this one, needed to add export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ on installing Varnish.

dridi commented 6 years ago

Hello, this one flew under my radar. Thanks for letting us know!