OpenWrt Forum Archive

Topic: Libnet compiling errors

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm trying to compile libnet using nico's patch and archive, and I get the following error, how can I remedy ?

./include/libnet.h:87:2: #error "byte order has not been specified, you'll"

Thanks

Florian,

patches are not all, if you're still using my patches, you have to look at ipkg/rules to see how configure and make are invoked.

    rm -rf config.cache
    $(TARGET_CONFIGURE_OPTS) 
    CFLAGS="$(TARGET_CFLAGS)" 
    ac_libnet_have_pf_packet=yes 
    ac_cv_lbl_unaligned_fail=no 
    ac_cv_libnet_endianess=lil 
    ./configure 
      --target=$(GNU_TARGET_NAME) 
      --host=$(GNU_TARGET_NAME) 
      --build=$(GNU_HOST_NAME) 
      --prefix=/usr 
      --exec-prefix=/usr 
      --bindir=/usr/bin 
      --datadir=/usr/share 
      --includedir=/usr/include 
      --infodir=/usr/share/info 
      --libdir=/usr/lib 
      --libexecdir=/usr/lib/locate 
      --localstatedir=/var/lib 
      --mandir=/usr/share/man 
      --sbindir=/usr/sbin 
      --sysconfdir=/etc 
      $(DISABLE_NLS) 
      --enable-shared 
      --enable-static
      --with-pf_packet=yes 

    touch config.guess
    touch config.sub

--
Nico

Well, I still get the same error, even if endianess seems to be specified. A second configure process is running after the first, and after saying that automake 1.8 is missing. Any ideas ?

Hi Nico !

I have finally solved my compiling problem, the problem was that after having successfully configured the libnet whith the correct endianness and options, the script was running a second configure process I don't know why, but this second one was not able to use the ac_cv variables used into the first one.

So after having let this configure script execute itself, it was necessary to do a make libnet-clean and then remove the .configured file, and finally type make libnet to get it compile cleanly !

Hi,

I have received the following error while compiling 1.1.2.1 version of libnet. I did modify the makefile with what you have posted above. I took the original template as the libnet package that is available by default. Any help would be great.

thanks



/root/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I../include     -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time  -c `test -f 'libnet_asn1.c' || echo './'`libnet_asn1.c
In file included from libnet_asn1.c:60:
../include/libnet.h:117:10: macro names must be identifiers
make[3]: *** [libnet_asn1.o] Error 1
make[3]: Leaving directory `/root/openwrt/build_mipsel/libnet/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/openwrt/build_mipsel/libnet'
make[1]: *** [/root/openwrt/build_mipsel/libnet/.built] Error 2
make[1]: Leaving directory `/root/openwrt/package/libnet'
make: *** [libnet-compile] Error 2

The discussion might have continued from here.