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

Build error with Varnish 6.6.2-1 #8

Closed
jgarrouste opened this issue Apr 25, 2024 · 1 comment
Closed

Build error with Varnish 6.6.2-1 #8

jgarrouste opened this issue Apr 25, 2024 · 1 comment

Comments

@jgarrouste
Copy link

Hi,

The build failed using Varnish 6.6.2-1.

I used the Varnish Ubuntu (focal) package from https://packagecloud.io/varnishcache/varnish66/

# dpkg -l | grep varnish
ii  varnish                      6.6.2-1~focal                           amd64        state of the art, high-performance web accelerator
ii  varnish-dev                  6.6.2-1~focal                           amd64        development files for Varnish Cache
# git clone https://github.com/ip2location/IP2Location-Varnish.git
# cd IP2Location-Varnish/
# ./autogen.sh && ./configure && make
[...]
make  all-recursive
make[1]: Entering directory '/root/IP2Location-Varnish'
Making all in src
make[2]: Entering directory '/root/IP2Location-Varnish/src'
/usr/share/varnish/vmodtool.py ../src/vmod_ip2location.vcc
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/varnish  -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c -o vcc_if.lo vcc_if.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c  -fPIC -DPIC -o .libs/vcc_if.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c -o vcc_if.o >/dev/null 2>&1
mv -f .deps/vcc_if.Tpo .deps/vcc_if.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/varnish  -Wall -Wextra -Werror -g -O2 -MT vmod_ip2location.lo -MD -MP -MF .deps/vmod_ip2location.Tpo -c -o vmod_ip2location.lo vmod_ip2location.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vmod_ip2location.lo -MD -MP -MF .deps/vmod_ip2location.Tpo -c vmod_ip2location.c  -fPIC -DPIC -o .libs/vmod_ip2location.o
vmod_ip2location.c: In function 'convert':
vmod_ip2location.c:79:9: error: ignoring return value of 'gcvt' declared with attribute 'warn_unused_result' [-Werror=unused-result]
   79 |         gcvt(f, 5, buf);
      |         ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:456: vmod_ip2location.lo] Error 1
make[2]: Leaving directory '/root/IP2Location-Varnish/src'
make[1]: *** [Makefile:516: all-recursive] Error 1
make[1]: Leaving directory '/root/IP2Location-Varnish'
make: *** [Makefile:384: all] Error 2

Temporary Solution :

# CFLAGS=-Wno-error ./configure && make
[...]
make  all-recursive
make[1]: Entering directory '/root/IP2Location-Varnish'
Making all in src
make[2]: Entering directory '/root/IP2Location-Varnish/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/varnish  -Wall -Wextra -Werror -Wno-error -MT vmod_ip2location.lo -MD -MP -MF .deps/vmod_ip2location.Tpo -c -o vmod_ip2location.lo vmod_ip2location.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -Wno-error -MT vmod_ip2location.lo -MD -MP -MF .deps/vmod_ip2location.Tpo -c vmod_ip2location.c  -fPIC -DPIC -o .libs/vmod_ip2location.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -Wno-error -MT vmod_ip2location.lo -MD -MP -MF .deps/vmod_ip2location.Tpo -c vmod_ip2location.c -o vmod_ip2location.o >/dev/null 2>&1
mv -f .deps/vmod_ip2location.Tpo .deps/vmod_ip2location.Plo
/bin/bash ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Werror -Wno-error -module -export-dynamic -avoid-version -shared -lIP2Location  -o libvmod_ip2location.la -rpath /usr/lib/varnish/vmods vcc_if.lo vmod_ip2location.lo  
libtool: link: gcc -shared  -fPIC -DPIC  .libs/vcc_if.o .libs/vmod_ip2location.o   /usr/lib/x86_64-linux-gnu/libIP2Location.so    -Wl,-soname -Wl,libvmod_ip2location.so -o .libs/libvmod_ip2location.so
libtool: link: ( cd ".libs" && rm -f "libvmod_ip2location.la" && ln -s "../libvmod_ip2location.la" "libvmod_ip2location.la" )
make[2]: Leaving directory '/root/IP2Location-Varnish/src'
make[2]: Entering directory '/root/IP2Location-Varnish'
rst2man README.rst vmod_ip2location.3
make[2]: Leaving directory '/root/IP2Location-Varnish'
make[1]: Leaving directory '/root/IP2Location-Varnish'
ip2location added a commit that referenced this issue May 14, 2024
@ip2location
Copy link
Owner

Hi @jgarrouste,

We have managed to reproduce the issue on our side, and hence pushed a fix to this issue. Would you please try with our new release(https://github.com/ip2location/IP2Location-Varnish/releases/tag/1.0.4) in your machine and see if the issue gone?

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

2 participants