nigoroll / libvmod-dynamic

The Varnish dns/named director continued
BSD 2-Clause "Simplified" License
95 stars 34 forks source link

Support for arm containers on m1 mac #85

Closed janosmiko closed 2 years ago

janosmiko commented 2 years ago

Hi,

I'm building varnish containers for amd64 and arm64 using this vmod. While it's working well on amd64 and it also works well when I'm using an arm64 linux server it's not working for desktop users using m1 mac.

They got the following error:

Error:
varnish_1        | Message from VCC-compiler:
varnish_1        | Could not open VMOD dynamic
varnish_1        |  File name: /usr/lib/varnish/vmods/libvmod_dynamic.so
varnish_1        |  dlerror: /usr/lib/varnish/vmods/libvmod_dynamic.so: undefined symbol: vmb_pthread
varnish_1        | ('/etc/varnish/default.vcl' Line 5 Pos 8)
varnish_1        | import dynamic;
varnish_1        | -------#######-
varnish_1        | 

The Dockerfile I'm using: https://github.com/rewardenv/reward/blob/main/images/varnish/debian/6.5/Dockerfile

Related issue: https://github.com/rewardenv/reward/issues/17

gquintard commented 2 years ago

I had the same issue while building the docker image, the fix is twofold:

here's the implementation in the docker repo: https://github.com/varnish/docker-varnish/commit/e507d06e425154234046ed779dc72dd449c178ac

@nigoroll , do you want a PR for this?

nigoroll commented 2 years ago

@gquintard helpful PRs are always welcome.