OpenWrt Forum Archive

Topic: Upgrading SNORT

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

Tring to compile newer snort
i get this curious cross compiler error
Any idea how to get around it.


configure: loading site script /usr/src/open/alx/trunk/include/site/i386-linux-uclibc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i386-linux-strip... i386-linux-uclibc-strip
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for i386-linux-gcc... i386-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i386-linux-uclibc-gcc accepts -g... yes
checking for i386-linux-uclibc-gcc option to accept ISO C89... none needed
checking dependency style of i386-linux-uclibc-gcc... gcc3
checking for i386-linux-ranlib... i386-linux-uclibc-ranlib
checking for bison... bison
checking for flex... flex
checking for i386-linux-gcc... (cached) i386-linux-uclibc-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i386-linux-uclibc-gcc accepts -g... (cached) yes
checking for i386-linux-uclibc-gcc option to accept ISO C89... (cached) none needed
checking dependency style of i386-linux-uclibc-gcc... (cached) gcc3
checking build system type... i486-pc-linux-gnu
checking host system type... i386-pc-linux-gnu
checking for a sed that does not truncate output... /usr/src/open/alx/trunk/staging_dir/host/bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by i386-linux-uclibc-gcc... i386-linux-uclibc-ld
checking if the linker (i386-linux-uclibc-ld) is GNU ld... yes
checking for i386-linux-uclibc-ld option to reload object files... -r
checking for BSD-compatible nm... i386-linux-uclibc-nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... i386-linux-uclibc-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether i386-linux-uclibc-g++ accepts -g... yes
checking dependency style of i386-linux-uclibc-g++... gcc3
checking how to run the C++ preprocessor... i386-linux-uclibc-g++ -E
checking for i386-linux-g77... no
checking for i386-linux-xlf... no
checking for i386-linux-f77... no
checking for i386-linux-frt... no
checking for i386-linux-pgf77... no
checking for i386-linux-cf77... no
checking for i386-linux-fort77... no
checking for i386-linux-fl32... no
checking for i386-linux-af77... no
checking for i386-linux-xlf90... no
checking for i386-linux-f90... no
checking for i386-linux-pgf90... no
checking for i386-linux-pghpf... no
checking for i386-linux-epcf90... no
checking for i386-linux-gfortran... no
checking for i386-linux-g95... no
checking for i386-linux-xlf95... no
checking for i386-linux-f95... no
checking for i386-linux-fort... no
checking for i386-linux-ifort... no
checking for i386-linux-ifc... no
checking for i386-linux-efc... no
checking for i386-linux-pgf95... no
checking for i386-linux-lf95... no
checking for i386-linux-ftn... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse i386-linux-uclibc-nm output from i386-linux-uclibc-gcc object... ok
checking for objdir... .libs
checking for i386-linux-ar... i386-linux-uclibc-ar
checking for i386-linux-ranlib... (cached) i386-linux-uclibc-ranlib
checking for i386-linux-strip... (cached) i386-linux-uclibc-strip
checking if i386-linux-uclibc-gcc supports -fno-rtti -fno-exceptions... no
checking for i386-linux-uclibc-gcc option to produce PIC... -fPIC
checking if i386-linux-uclibc-gcc PIC flag -fPIC works... yes
checking if i386-linux-uclibc-gcc static flag -static works... yes
checking if i386-linux-uclibc-gcc supports -c -o file.o... yes
checking whether the i386-linux-uclibc-gcc linker (i386-linux-uclibc-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by i386-linux-uclibc-g++... i386-linux-uclibc-ld
checking if the linker (i386-linux-uclibc-ld) is GNU ld... yes
checking whether the i386-linux-uclibc-g++ linker (i386-linux-uclibc-ld) supports shared libraries... yes
checking for i386-linux-uclibc-g++ option to produce PIC... -fPIC
checking if i386-linux-uclibc-g++ PIC flag -fPIC works... yes
checking if i386-linux-uclibc-g++ static flag -static works... yes
checking if i386-linux-uclibc-g++ supports -c -o file.o... yes
checking whether the i386-linux-uclibc-g++ linker (i386-linux-uclibc-ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking whether byte ordering is bigendian... (cached) no
checking for sparc alignment... no
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for inttypes.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking whether printf must be declared... no
checking whether fprintf must be declared... no
checking whether syslog must be declared... no
checking whether puts must be declared... no
checking whether fputs must be declared... no
checking whether fputc must be declared... no
checking whether fopen must be declared... no
checking whether fclose must be declared... no
checking whether fwrite must be declared... no
checking whether fflush must be declared... no
checking whether getopt must be declared... no
checking whether bzero must be declared... no
checking whether bcopy must be declared... no
checking whether memset must be declared... no
checking whether strtol must be declared... no
checking whether strcasecmp must be declared... no
checking whether strncasecmp must be declared... no
checking whether strerror must be declared... no
checking whether perror must be declared... no
checking whether socket must be declared... no
checking whether sendto must be declared... no
checking whether vsnprintf must be declared... no
checking whether snprintf must be declared... no
checking whether strtoul must be declared... no
checking for snprintf... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for strerror... (cached) yes
checking for vswprintf... yes
checking for wprintf... yes
checking for sizeof(unsigned long)... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
make[3]: *** [/usr/src/open/alx/trunk/build_dir/i386/snort-2.8.2/snort] Error 1
make[3]: Leaving directory `/usr/src/open/alx/trunk/feeds/packages/net/snort'
make[2]: *** [package/feeds/packages/snort/compile] Error 2
make[2]: Leaving directory `/usr/src/open/alx/trunk'
make[1]: *** [/usr/src/open/alx/trunk/staging_dir/i386/stamp/.package_compile] Error 2
make[1]: Leaving directory `/usr/src/open/alx/trunk'
make: *** [world] Error 2

You can just comment out these tests in the configure script-

$diff -u2 configure.ORIG configure
--- configure.ORIG      2008-06-01 14:01:40.000000000 -0400
+++ configure   2008-06-01 14:04:13.000000000 -0400
@@ -20771,7 +20771,7 @@
 echo "$as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+} #CROSS_COMPILE   { (exit 1); exit 1; }; }
...

BTW- Snort 2.8.2 mipsel packages are available here-

http://packetprotector.org/download/kamikaze/

Hope this helps,
Charlie

Creating and submitting a patch is better than using someone elses third-party binary package...

The discussion might have continued from here.