Discussion:
Can't compile current evbarm with ipfilter
(too old to reply)
John Klos
2013-10-28 10:14:53 UTC
Permalink
Not enough context - this seems to be from some userland stuff being build,
#if !defined(_KERNEL) || (!defined(__NetBSD__) && !defined(__OpenBSD__) && \
!defined(__FreeBSD__)) || \
FREEBSD_LT_REV(501000) || NETBSD_LT_REV(105000000) || \
OPENBSD_LT_REV(200006)
and seems to not have been changed in years. I can't even parse what it is
supposed to express. The ( it complains about is
FREEBSD_LT_REV(501000)
^
#if defined(__FreeBSD_version)
..
#else
..
# define FREEBSD_LT_REV(x) 0
#endif
Please check where this does go wrong for you (for example by sprinkling a
few #error "stopped here" around in the ifdef mess.
Will do. In the meanwhile, here are the differences between the compile
options from a kernel where ipfilter works (MARVELL_NAS) versus PI (which
is RPI with options IPFILTER_LOG, IPFILTER_LOOKUP, IPFILTER_COMPAT and
pseudo-device ipfilter):


# create MARVELL_NAS/genfs_io.d
CC=/usr/current/src/../tools/bin/arm--netbsdelf-eabihf-gcc
/usr/current/src/../tools/bin/nbmkdep -f genfs_io.d -- -mfloat-abi=soft
-ffreestanding -fno-zero-initialized-in-bss -O2 -fno-strict-aliasing
-fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
-Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings
-Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare
--sysroot=/usr/current/src/../dest-evbarm -I.
-I/usr/current/src/sys/../common/include -I/usr/current/src/sys/arch
-I/usr/current/src/sys -nostdinc -D__HAVE_PCI_CONF_HOOK
-D__HAVE_CPU_UAREA_ALLOC_IDLELWP -DKERNEL_BASE_EXT="0xc0000000"
-DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -std=gnu99
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/string
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/arch/arm/string
-I/usr/current/src/sys/external/bsd/ipf
/usr/current/src/sys/miscfs/genfs/genfs_io.c


# create PI/genfs_io.d
CC=/usr/current/src/../tools/bin/arm--netbsdelf-eabihf-gcc
/usr/current/src/../tools/bin/nbmkdep -f genfs_io.d -- -mfloat-abi=soft
-ffreestanding -fno-zero-initialized-in-bss -O2 -fno-strict-aliasing
-fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
-Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings
-Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare
--sysroot=/usr/current/src/../dest-evbarm -march=armv6z
-mtune=arm1176jzf-s -mfpu=vfp -I.
-I/usr/current/src/sys/../common/include -I/usr/current/src/sys/arch
-I/usr/current/src/sys -nostdinc -D__HAVE_CPU_COUNTER
-D__HAVE_FAST_SOFTINTS -D__HAVE_CPU_UAREA_ALLOC_IDLELWP
-DKERNEL_BASE_EXT="0xc0000000" -DARM_GENERIC_TODR -DBCM2835 -DDIAGNOSTIC
-DPLCONSOLE -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -std=gnu99
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/string
-I/usr/current/src/sys/lib/libkern/../../../common/lib/libc/arch/arm/string
-I/usr/current/src/sys/../../../include
-I/usr/current/src/sys/external/bsd/ipf
-I/usr/current/src/sys/external/bsd/common/include
-I/usr/current/src/sys/external/bsd
-I/usr/current/src/sys/external/bsd/dwc2/dist
-I/usr/current/src/sys/external/bsd/vchiq/dist
-I/usr/current/src/sys/external/bsd/common/include -DVCOS_VERIFY_BKPTS=1
-DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -DVCHIQ_ENABLE_DEBUG=1
-DVCHIQ_LOG_DEFAULT=5 /usr/current/src/sys/miscfs/genfs/genfs_io.c


Thanks,
John

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
John Klos
2013-11-01 18:37:33 UTC
Permalink
--- fil.d ---
/usr/current/src/sys/external/bsd/ipf/netinet/fil.c:5263:19: error: missing
binary operator before token "("
Try removing
sys/arch/evbarm/conf/std.rpi:makeoptions CPPFLAGS+="-I$S/../../../include"
That did it! Now it's stopped at:

--- bcm2835_dwctwo.o ---
cc1: warnings being treated as errors
In file included from
/usr/current/src/sys/arch/arm/broadcom/bcm2835_dwctwo.c:52:0:
/usr/current/src/sys/external/bsd/dwc2/dwc2.h:64:0: error: "DWC2_DEBUG" redefined
/usr/current/src/sys/dev/usb/usb.h:64:0: note: this is the location of the previous definition
*** [bcm2835_dwctwo.o] Error code 1

usb.h just got DWC2_DEBUG three hours ago:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/usb/usb.h

So I guess that should be removed from sys/external/bsd/dwc2/dwc2.c and
sys/external/bsd/dwc2/dwc2.h... Oh, I see someone just did that.

Thanks,
John


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...