ok, i resolved one problem below, and found the next as well.

the first problem
'fr_fastroute':../../ip_fil_solaris.c:1213: error: too many arguments
   to function 'pfil_sendbuf'
requires two steps...

1) for any platform:
   get the right version of pfil (pfil-2.1.9) for ipf (ip_fil4.1.13).
   why don't we just package these together in one big tarball folks?

2) for amd64 platform (sun v20z, et al):
   hack pfil/Makefile.gcc more so it correctly infers the 64bit-ness.
   there is no good structure to implement a multiplatform amd-aware
   test, so i just fixed it up to return 64 on amd64.  naturally,
   another assumption about the underlying machine environment bites
   again a few lines farther down.  i don't know of any equivalent
   parameter for x86/amd64 so i deleted "mcmodel".  compiles ok, will
   it work?

THIS IS NOT A PATCH!
AFTER THESE EDITS, THE MAKEFILE NOW WORKS ONLY ON AMD64, THAT'S IT.

(neo/jds)$ diff Makefile.gcc-amd Makefile.gcc
23c23
< SBITS=`optisa amd64 >/dev/null 2>&1; if [ "$?" -eq 0 ] ; \
< then echo "64"; else echo "32"; fi`
---
> SBITS:sh=optisa sparcv9 >/dev/null 2>&1; if [ "$?" -eq 0 ] ; \
> then echo "64"; else echo "32"; fi
28c28
< S64FLAGS=-m64 -DDO=pfil${SBITS} ${MISC}
---
> S64FLAGS=-m64 -mcmodel=medlow -DDO=pfil${SBITS} ${MISC}

moving on...
ok, so now pfil builds with a few warnings (fingers crossed that it
works OK) and then in turn ipf can be built, again a few warnings.

but then we discover yet another issue, we can't make a package.

/neo/home1/jds/tools/ipf/ip_fil4.1.13/SunOS5/../bsdinstall -c \
  -s i386-5.10/amd64/ipfs i386-5.10/root//sbin/amd64/ipfs
/neo/home1/jds/tools/ipf/ip_fil4.1.13/SunOS5/../bsdinstall -c \
  -s i386-5.10/amd64/ipfstat i386-5.10/root//sbin/amd64/ipfstat
(cd i386-5.10; rm -f prototype)
(cd i386-5.10; ln -s ../prototype_amd64 prototype)
sed -e 's/ipf/ipfx/' -e "s/NAME=.*/&`if [ "64" = 64 ];then echo \
  ' (64-bit)'; fi`/" \
    -e "s/ARCH=.*/ARCH=`uname -p` (64-bit)/" \
        < pkginfo > i386-5.10/pkginfo
if [ "64" = 64 ]; then echo 'SUNW_ISA=amd64' >> i386-5.10/pkginfo; fi
(cd i386-5.10; pkgmk -a `uname -p` -o -d /tmp/ipfpkgs)
## Building pkgmap from package prototype file.
ERROR in prototype:
    garbled entry
    - pathname: 0755
    - problem: mode is not numeric.
pkgmk: ERROR: unable to build pkgmap from prototype file
## Packaging was not successful.
*** Error code 1
make: Fatal error: Command failed for target `ipf.pkg.bin'
Current working directory /neo/home1/jds/tools/ipf/ip_fil4.1.13/SunOS5
*** Error code 1
make: Fatal error: Command failed for target `i386-5.10/ipf.pkg'

note:
if anyone is interested, here are various amd64-platform outputs:
(neo/jds)$ optisa amd64
amd64
(neo/jds)$ echo $?
0
(neo/jds)$ isainfo
amd64 i386
(neo/jds)$ isainfo -vk
64-bit amd64 kernel modules
(neo/jds)$ isainfo -v
64-bit amd64 applications
        sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov
        amd_sysc cx8 tsc fpu
32-bit i386 applications
        sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov
        amd_sysc cx8 tsc fpu
(neo/jds)$ isalist
amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
(neo/jds)$ uname -a
SunOS neo 5.10 Generic_Patch i86pc i386 i86pc

regards,
jim "i'm hoping to replace sun's ipf on a v20z someday..." sandoz.

ps:
while we are at it here...

observe:
/usr/ccs/bin/make clean in ipf dir *does not* exit cleanly.
/usr/local/bin/gmake clean in ipf dir *does* exit cleanly.
note, gmake is not the tool to build ipf on solaris, make is.
ergo, i believe solaris make clean should make clean cleanly.


(neo/jds)$ make clean
<snip>
/bin/rm -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h
/bin/rm -f ipnat.5 ipnat.4 ipnat.8 ipfilter.4 ipfilter.5
make -f Makefile.ipsend clean
rm -rf *.o core a.out ipsend ipresend iptest iplang_l.* iplang_y.*
(for i in *; do \
        if [ -d ${i} -a -h ${i}/Makefile ] ; then \
                cd ${i}; (make TOP=../.. clean); cd ..; \
                rm ${i}/Makefile ${i}/Makefile.ipsend; \
                rmdir ${i}; \
        fi \
 done)
(cd Linux; make TOP=.. clean)
make: Fatal error in reader: Makefile, line 21: Unexpected end of line seen
Current working directory /neo/home1/jds/tools/ipf/ip_fil4.1.13/Linux
*** Error code 1
make: Fatal error: Command failed for target `clean'
(neo/jds)$ echo $?
1

(neo/jds)$ gmake clean
<snip>
(neo/jds)$ echo $?
0







Jim Sandoz wrote:

hello hans,

you got me a bit farther... still no joy.

<snip>
gcc -I../.. -D_BSD_SOURCE -DSOLARIS2=10 i86/ipnat.o i86/ipnat_y.o i86/ipnat_l.o
 -o i86/ipnat -lsocket -lnsl -lelf -Li86 -lipf  -lkvm -ll
gcc -I../.. -DIPFILTER_LKM -I../../../pfil -D_KERNEL -DSUNDDI -DSOLARIS2=10 -DI PFILTER_LOG -DIPFILTER_LOOKUP -DIPFILTER_SCAN -c ../../ip_fil_solaris.c -o i86
/ip_fil.o
../../ip_fil_solaris.c: In function 'fr_fastroute':
../../ip_fil_solaris.c:1213: error: too many arguments to function 'pfil_sendbuf
'
*** Error code 1
make: Fatal error: Command failed for target `i86/ip_fil.o'
Current working directory /neo/home1/jds/tools/ipf/ip_fil4.1.13/SunOS5/i386-5.10
*** Error code 1
make: Fatal error: Command failed for target `sunos5'
Current working directory /neo/home1/jds/tools/ipf/ip_fil4.1.13
*** Error code 1
make: Fatal error: Command failed for target `solaris'


thanks for any addn'l insight.
jim


Hans Werner Strube wrote:

Jim Sandoz wrote:

# /usr/ccs/bin/make solaris
<snip>

gcc -I. -g -I../.. -D_BSD_SOURCE  -DSOLARIS2=10 -DIPFILTER_LOG
 -DIPFILTER_LOOKUP -DIPFILTER_SCAN -DIPFILTER_SYNC -DIPFILTER_CKSUM
 -c ../../ip_log.c -o i86/ip_log_u.o
../../ip_log.c:152: error: array type has incomplete element type
*** Error code 1



Seems to be specific for (newer?) gccs. In ip_log.c, replace line 150:
# if SOLARIS
by
# if SOLARIS && defined(_KERNEL)



Reply via email to