Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error trying in Docker container #56

Open
dshumsky opened this issue Dec 29, 2023 · 11 comments
Open

Compilation error trying in Docker container #56

dshumsky opened this issue Dec 29, 2023 · 11 comments

Comments

@dshumsky
Copy link

Hello
I have the following error while compiling from Varnish 7.3 docker container (see https://hub.docker.com/_/varnish)

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I/usr/include/x86_64-linux-gnu -g -O2 -MT libvmod_curl_la-vmod_curl.lo -MD -MP -MF .deps/libvmod_curl_la-vmod_curl.Tpo -c vmod_curl.c -fPIC -DPIC -o .libs/libvmod_curl_la-vmod_curl.o
vmod_curl.c:21:10: fatal error: vcc_curl_if.h: No such file or directory
21 | #include "vcc_curl_if.h"
| ^~~~~~~~~~~~~~~
compilation terminated.

Any suggestions? Thanks!

@gquintard
Copy link
Contributor

hi, we are going to need a full log here, if vcc_curl_if.h doesn't exist, it's probably that the tool generating it failed. Can you share a Dockerfile exhibiting the issue?

@dridi
Copy link
Member

dridi commented Jan 2, 2024

I suspect a race, did you try a serial build with make -j 1 ?

@watery
Copy link

watery commented Jan 21, 2024

Getting the same, not in Docker but on a Ubuntu 22 Jammy server.

I'm running 7.4 OSS there; I downloaded 0f91123 and ran ./autogen before ./configure (and the following steps from the Installation instructions).

I suspect a race, did you try a serial build with make -j 1 ?

I get the exact same error.

hi, we are going to need a full log here, [...]

Please find it attached: varnish-vmod-curl-install.txt

@watery
Copy link

watery commented Jan 21, 2024

I tried to compile previous commits and this seems to be broken since adaf091, while in 3307555 running make completes without errors, HTH.

@watery
Copy link

watery commented Feb 2, 2024

@gquintard @dridi Sorry to mention you, but maybe this is just a couple of edits away from being installable again (at least I hope so).

@gquintard
Copy link
Contributor

I'll have a look at this this week

@gquintard
Copy link
Contributor

it works on my machine container:

FROM varnish:7.3

# set the user to root, and install build dependencies
USER root
RUN set -e; \
    apt-get update; \
    apt-get -y install $VMOD_DEPS /pkgs/*.deb libcurl4-openssl-dev; \
    \
# install one, possibly multiple vmods
   install-vmod https://github.com/varnish/libvmod-curl/archive/refs/heads/master.tar.gz; \
    \
# clean up and set the user back to varnish
    apt-get -y purge --auto-remove $VMOD_DEPS varnish-dev; \
    rm -rf /var/lib/apt/lists/*
USER varnish

please provide a reproducer so we can look at this further.

Also, I would recommend using vmod-reqwest as it's more modern and probably easier to compile (and I feel obligated that Varnish Enterprise has vmod-http already packaged)

@watery
Copy link

watery commented Feb 7, 2024

Wait, is this only compatible with 7.3 and not with 7.4? I'm running the latter.

Also, I would recommend using vmod-reqwest as it's more modern and probably easier to compile

Yes, already saw that (from maybe another issue here), though at v0.0.10 feels a little... bleeding-edge ATM; this one instead looked more stable - I'm installing severals VMODs just for experiments, when I have a better definition of my requirements, I'll surely take a look at that one too.

@watery
Copy link

watery commented Feb 8, 2024

Hmmm... I peeked at https://github.com/varnish/toolbox/blob/master/install-vmod/install-vmod and - if I understood it - it should run (for me):

./autogen.sh
./configure
make -j"$(nproc)" VERBOSE=1 check
make -j"$(nproc)" VERBOSE=1 install

apart from not running make alone, it calls nproc, which outputs 2 here.

I suspect a race, did you try a serial build with make -j 1 ?

Retrying with make -j 2, the command succeeds.

I'm not that keen on Docker, maybe I could try to put together something during the next weekend.

In case it can be of help, this issue didn't come up when I installed:

@gquintard
Copy link
Contributor

vmod-reqwest is new-ish, but at least it's actively maintained, vmod-curl isn't, and notably doesn't support HTTPS calls, so, up to you.

anyway, I can reproduce with make -j 1, I'll have a look

@gquintard
Copy link
Contributor

@nigoroll, looks like you indeed broke sequential build in adaf091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants