tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building tcpdump with USE_INET6=no



> On May 15, 2017, at 07:30, Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:
> 
> Hello
> 
> In src/external/bsd/tcpdump/bin/Makefile we have provisions to
> build with USE_IENT6=no
> 
> .if (${USE_INET6} != "no")
> SRCS+= \
> print-babel.c \
> print-ip6opts.c \
> print-dhcp6.c \
> print-frag6.c \
> print-icmp6.c \
> print-ip6.c \
> print-ospf6.c \
> print-rt6.c
> 
> CPPFLAGS+=-DHAVE_OS_IPV6_SUPPORT=1
> .endif
> 
> Unfortunately, tcpdump sources do not work fine with this, and the
> build will complain about undefined symbolsa:
> ip6_print
> nextproto6_cksum
> dhcp6_print
> babel_print.
> 
> The code logic does not use them of course, hence I created a inet6_stub;c
> file with empty definitions of the functions ,and added them to SRCS
> if USE_INET6=no. It works, but oly if inet6_stub.c is in
> src/external/bsd/tcpdump/dist, otherwise it will not find it at link
> time.
> 
> I understand dist is for upstream distribution. How can I fix that
> properly?

Hi Emmanuel,
	FreeBSD fixed a similar issue a few months ago by adding all of the SRCS, and just specifying the constant to CFLAGS to enable IPv6: https://svnweb.freebsd.org/base/head/usr.sbin/tcpdump/tcpdump/Makefile?r1=313083&r2=313082&pathrev=313083 .
HTH,
-Ngie

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail



Home | Main Index | Thread Index | Old Index