Patchset to fix ipfilter build breakage

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Tue, 26 Apr 2005 18:56:08 +0300
Hi Darren,

Maybe I could save you some time by the attached patchset.
I'm building with all of your latest changes, yet the
following problems.

Fixed by the patchset:

- libipf is made a standard library; this allows to use
  ipfilter bits in rescue; also fixes "make checkdpadd",
- removed lot of NetBSD'ism from sbin/ipf/ makefiles,
- redefinition of "rcsid" in sys/contrib/ipfilter/.

Not fixed by the patchset:

- A lot of warnings when compiling on amd64 (see my
  other email); they are masked by NO_WERROR in this
  patchset but should be fixed of course
- rescue is still broken: the libipf library is a
  culprit -- it has a lot of undefined symbols that
  consumers are expected to provide, thus preventing
  it to be used in rescue.  When compiling a rescue
  binary, it fails with the following:

: MAKEOBJDIRPREFIX=/usr/obj/usr/src/rescue/rescue make -f rescue.mk exe
: cc -static -o rescue rescue.o cat.lo chflags.lo chio.lo chmod.lo cp.lo date.lo dd.lo df.lo echo.lo ed.lo expr.lo getfacl.lo hostname.lo kenv.lo kill.lo ln.lo ls.lo mkdir.lo mv.lo pax.lo ps.lo pwd.lo realpath.lo rm.lo rmdir.lo setfacl.lo sh.lo stty.lo sync.lo test.lo rcp.lo csh.lo atacontrol.lo badsect.lo bsdlabel.lo camcontrol.lo ccdconfig.lo clri.lo devfs.lo dmesg.lo dump.lo dumpfs.lo dumpon.lo fsck.lo fsck_ffs.lo fsck_msdosfs.lo fsdb.lo fsirand.lo gbde.lo ifconfig.lo init.lo kldconfig.lo kldload.lo kldstat.lo kldunload.lo ldconfig.lo md5.lo mdconfig.lo mdmfs.lo mknod.lo mount.lo mount_cd9660.lo mount_ext2fs.lo mount_msdosfs.lo mount_nfs.lo mount_ntfs.lo mount_nullfs.lo mount_std.lo mount_udf.lo mount_umapfs.lo mount_unionfs.lo newfs.lo newfs_msdos.lo nos-tun.lo ping.lo reboot.lo restore.lo rcorder.lo route.lo routed.lo rtquery.lo rtsol.lo savecore.lo slattach.lo spppcontrol.lo startslip.lo swapon.lo sysctl.lo tunefs.lo umount.lo atm.lo atmconfig.lo fore_dnld.lo ilmid.lo ping6.lo ipf.lo ipfs.lo ipfstat.lo ipmon.lo ipnat.lo fdisk.lo dhclient.lo bzip2.lo tar.lo vi.lo id.lo gzip.lo chroot.lo /usr/obj/usr/src/rescue/rescue/../librescue/exec.o /usr/obj/usr/src/rescue/rescue/../librescue/getusershell.o /usr/obj/usr/src/rescue/rescue/../librescue/login_class.o /usr/obj/usr/src/rescue/rescue/../librescue/popen.o /usr/obj/usr/src/rescue/rescue/../librescue/rcmdsh.o /usr/obj/usr/src/rescue/rescue/../librescue/sysctl.o /usr/obj/usr/src/rescue/rescue/../librescue/system.o -lcrypt -ledit -lkvm -ll -lm -ltermcap -lutil -lcrypto -latm -lipf -lalias -lbsdxml -lcam -lcurses -ldevstat -lipsec -lipx -lgeom -lkiconv -lmd -lreadline -lsbuf -lufs -lz -lbz2 -larchive
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(print_toif.o)(.text+0x32): In function `print_toif':
: : undefined reference to `use_inet6'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(nametokva.o)(.text+0x2b): In function `nametokva':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_pool.o)(.text+0xa0): In function `load_pool':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_pool.o)(.text+0xe2): In function `load_pool':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_pool.o)(.text+0x111): In function `load_pool':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_pool.o)(.text+0x132): In function `load_pool':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_pool.o)(.text+0x13b): more undefined references to `opts' follow
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(ntomask.o)(.text+0x24): In function `ntomask':
: : undefined reference to `use_inet6'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(ntomask.o)(.text+0x3d): In function `ntomask':
: : undefined reference to `use_inet6'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_poolnode.o)(.text+0xca): In function `load_poolnode':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_poolnode.o)(.text+0xea): In function `load_poolnode':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_poolnode.o)(.text+0x133): In function `load_poolnode':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_poolnode.o)(.text+0x13c): In function `load_poolnode':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_hashnode.o)(.text+0xbb): In function `load_hashnode':
: : undefined reference to `opts'
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(load_hashnode.o)(.text+0xdb): more undefined references to `opts' follow
: /usr/obj/usr/src/tmp/usr/lib/libipf.a(printmask.o)(.text+0x2): In function `printmask':
: : undefined reference to `use_inet6'
: *** Error code 1
: 
: Stop in /usr/obj/usr/src/rescue/rescue.
: *** Error code 1

Perhaps this is easy to fix, perhaps not.  If not, this means that we won't
ship rescue with ipfilter bits, which would be very unfortunate for some
users.  In this case, we can make the libipf an internal library, not
installed under /usr/lib.  (This can be done by adding INTERNALLIB= in
sbin/ipf/libipf/Makefile, and tweaking sbin/Makefile.inc to define
LIBIPF as ${.OBJDIR}/.../libipf.a, and using ${LIBIPF} both in DPADD
and in LDADD.)

Please let me know if I can help you some more...


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Tue Apr 26 2005 - 13:56:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:33 UTC