Bug #16928
closed
- Status changed from New to 12
Ok, I can prove the USE_IPV6 is not defined when src/civetweb/src/civetweb.c is compiled, and it seems that civetweb/include/civetweb_conf.h is not being included.
Add this at the top, just before or after '#define RGW 1':
#if !defined(USE_IPV6)
#error USE_IPV6 is not defined!
#endif
Now try to build it.
make3: Entering directory `/home/robjoh84/ceph/src'
./make_version -g ./.git_version
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib64\" -DCEPH_PKGLIBDIR=\"/usr/lib64/ceph\" -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -I./civetweb/include --include ./civetweb/include/civetweb_conf.h -fPIC -DNO_SSL_DL -DUSE_IPV6=1 -DWITH_IPV6=1 -D_LARGEFILE64_SOURCE -march=native -O2 -pipe -frecord-gcc-switches -g -Wno-unused-parameter -Wextra -Wno-missing-field-initializers -Wno-missing-declarations -c -o civetweb/src/libcivetweb_la-civetweb.lo `test -f 'civetweb/src/civetweb.c' || echo './'`civetweb/src/civetweb.c
gcc -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib64\" -DCEPH_PKGLIBDIR=\"/usr/lib64/ceph\" -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -I./civetweb/include -fPIC -I./xxHash -D_LARGEFILE64_SOURCE -march=native -O2 -pipe -frecord-gcc-switches -g -Wno-unused-parameter -Wextra -Wno-missing-field-initializers -Wno-missing-declarations -c -o civetweb/src/radosgw-civetweb.o `test -f 'civetweb/src/civetweb.c' || echo './'`civetweb/src/civetweb.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib64\" -DCEPH_PKGLIBDIR=\"/usr/lib64/ceph\" -DGTEST_USE_OWN_TR1_TUPLE=0 -D_REENTRANT -I./civetweb/include --include ./civetweb/include/civetweb_conf.h -fPIC -DNO_SSL_DL -D_LARGEFILE64_SOURCE -march=native -O2 -pipe -frecord-gcc-switches -g -Wno-unused-parameter -Wextra -Wno-missing-field-initializers -Wno-missing-declarations -c civetweb/src/civetweb.c -fPIC -DPIC -o civetweb/src/.libs/libcivetweb_la-civetweb.o
civetweb/src/civetweb.c:25:2: error: #error USE_IPV6 is not defined!
#error USE_IPV6 is not defined!
^
civetweb.c is included twice for compiling, but only the libcivetweb.la output passes "--include ./civetweb/include/civetweb_conf.h" during compile.
This was a breakage introduced by c38e3cbb6f7c6221209f2b512cba18c564c895a4
should be a line like this,
src/CMakeLists.txt: set_property(TARGET civetweb_common_objs
src/CMakeLists.txt: APPEND PROPERTY COMPILE_DEFINITIONS USE_IPV6=1)
also if we care about automake,
src/rgw/Makefile.am:CIVETWEB_DEFINES = -DNO_SSL_DL -DUSE_IPV6
(but the -DNO_SSL_DL there should be variable.)
In src/rgw/Makefile.am there used to be this:
CIVETWEB_INCLUDE = --include $(srcdir)/civetweb/include/civetweb_conf.h
which included that define. I recommend not reproducing that.
- Tags deleted (
jewel)
- Backport set to jewel
Marcus Watts wrote:
should be a line like this,
src/CMakeLists.txt: set_property(TARGET civetweb_common_objs
src/CMakeLists.txt: APPEND PROPERTY COMPILE_DEFINITIONS USE_IPV6=1)
also if we care about automake,
src/rgw/Makefile.am:CIVETWEB_DEFINES = -DNO_SSL_DL -DUSE_IPV6
(but the -DNO_SSL_DL there should be variable.)
In src/rgw/Makefile.am there used to be this:
CIVETWEB_INCLUDE = --include $(srcdir)/civetweb/include/civetweb_conf.h
which included that define. I recommend not reproducing that.
I agree that ditching civetweb_conf.h entirely would be an improvement, but I picked the minimal fix to get it merged quickly into Jewel, in time for the next release.
Um, wherever you can put in --include foo.h you can put in -DFOO. So I'm not sure why you think --include is minimal. But, whatever, as long as it's gone for good in kraken!
- Status changed from 12 to Pending Backport
- Copied to Backport #16945: jewel: RGW/civetweb no longer listens on IPv6: invalid port spec added
- Assignee set to Robin Johnson
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF