Hi all:
The release version 0.4.8 of libsmi does not build under Cygwin, see the build log at the bottom.
Something
is probably not right with asnprintf and the like. I would guess that
this is not specific to Cygwin, it's probably an issue when building
against newlib. asnprintf is being detected in the system C library, but
it's redeclared in lib/snprintf.h anyway.
I tried the Subversion head too, but I'm getting the same build problems.
By
the way, I noticed that autogen.sh seems to trigger "configure", which I
don't think it's a good idea, as I want to specify my own "configure"
argument before polluting the source directory.
File autogen.sh is rather large, nowadays the following will probably do:
autoreconf --warnings=all
I would also fix the many autoconf warnings that the above command produces.
Regards,
R. Diez
---------8<---------8<---------8<---------8<---------
$ ./configure --prefix=/cygdrive/c/Ruben/SoftLib/libsmi/libsmi-0.4.8-bin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for additional required compiler flags...
checking for strtoll... yes
checking for strtoull... yes
checking for strtoq... no
checking for strtouq... no
checking for timegm... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for asnprintf... yes
checking for vasprintf... yes
checking for vasnprintf... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking for unistd.h... (cached) yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for regexec in -lc... yes
checking for path separator character... :
checking for dir separator character... /
checking for 64 bit types... long long/%lld, etc.
checking for flex... /cygdrive/c/WinAVR-20100110/utils/bin/flex
checking for bison... /cygdrive/c/WinAVR-20100110/utils/bin/bison
checking for bash... /usr/bin/sh
checking for sh... /usr/bin/sh
checking for awk... /usr/bin/awk
checking for wget... /cygdrive/c/WinAVR-20100110/utils/bin/wget
checking for gdiff... no
checking for diff... /usr/bin/diff
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC...
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
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 g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC...
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC...
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating tools/Makefile
config.status: creating mibs/Makefile
config.status: creating mibs/iana/Makefile
config.status: creating mibs/ietf/Makefile
config.status: creating mibs/irtf/Makefile
config.status: creating mibs/tubs/Makefile
config.status: creating mibs/site/Makefile
config.status: creating pibs/Makefile
config.status: creating pibs/ietf/Makefile
config.status: creating pibs/tubs/Makefile
config.status: creating pibs/site/Makefile
config.status: creating test/Makefile
config.status: creating test/mibs/Makefile
config.status: creating test/smidiff/Makefile
config.status: creating test/dumps/Makefile
config.status: creating test/dumps/corba/Makefile
config.status: creating test/dumps/imports/Makefile
config.status: creating test/dumps/jax/Makefile
config.status: creating test/dumps/netsnmp/Makefile
config.status: creating test/dumps/mosy/Makefile
config.status: creating test/dumps/orig-smiv2/Makefile
config.status: creating test/dumps/smilint-smiv2/Makefile
config.status: creating test/dumps/sming/Makefile
config.status: creating test/dumps/smiv1/Makefile
config.status: creating test/dumps/smiv2/Makefile
config.status: creating test/dumps/smiv2-smiv2/Makefile
config.status: creating test/dumps/tree/Makefile
config.status: creating test/dumps/types/Makefile
config.status: creating test/dumps/identifiers/Makefile
config.status: creating test/dumps/metrics/Makefile
config.status: creating test/dumps/xml/Makefile
config.status: creating test/dumps/cm/Makefile
config.status: creating test/dumps/python/Makefile
config.status: creating test/dumps/yang/Makefile
config.status: creating doc/Makefile
config.status: creating lib/smi.h
config.status: creating lib/libsmi.3
config.status: creating lib/smi_macro.3
config.status: creating lib/smi_module.3
config.status: creating lib/smi_node.3
config.status: creating lib/smi_type.3
config.status: creating lib/smi_config.3
config.status: creating lib/smi_render.3
config.status: creating lib/smi_util.3
config.status: creating lib/smi_class.3
config.status: creating lib/smi_attribute.3
config.status: creating lib/smi_event.3
config.status: creating lib/smi_identity.3
config.status: creating tools/smistrip
config.status: creating tools/smicache
config.status: creating tools/smiquery.1
config.status: creating tools/smilint.1
config.status: creating tools/smidump.1
config.status: creating tools/smidiff.1
config.status: creating tools/smistrip.1
config.status: creating tools/smicache.1
config.status: creating tools/smixlate.1
config.status: creating tools/mib2svg.cgi
config.status: creating test/parser.test
config.status: creating test/smidump-corba.test
config.status: creating test/smidump-jax.test
config.status: creating test/smidump-netsnmp.test
config.status: creating test/smidump-imports.test
config.status: creating test/smidump-mosy.test
config.status: creating test/smidump-orig-smiv2.test
config.status: creating test/smidump-sming.test
config.status: creating test/smidump-yang.test
config.status: creating test/smidump-smiv1.test
config.status: creating test/smidump-smiv2-smiv2.test
config.status: creating test/smidump-smiv2.test
config.status: creating test/smidump-tree.test
config.status: creating test/smidump-types.test
config.status: creating test/smidump-identifiers.test
config.status: creating test/smidump-metrics.test
config.status: creating test/smidump-xml.test
config.status: creating test/smidump-cm.test
config.status: creating test/smidump-python.test
config.status: creating test/smilint-smiv2.test
config.status: creating test/smidiff.test
config.status: creating libsmi.pc
config.status: creating win/config.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default commands
---------8<---------8<---------8<---------8<---------
$ make
make all-recursive
make[1]: Entering directory `/cygdrive/c/Ruben/SoftLib/libsmi/libsmi-0.4.8'
Making all in lib
make[2]: Entering directory `/cygdrive/c/Ruben/SoftLib/libsmi/libsmi-0.4.8/lib'
/bin/sh
../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-g -O2 -MT data.lo -MD -MP -MF .deps/data.Tpo -c -o data.lo data.c
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT data.lo -MD -MP -MF .deps/data.Tpo -c data.c -DPIC -o .libs/data.o
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT data.lo -MD -MP -MF .deps/data.Tpo -c data.c -o data.o >/dev/null 2>&1
mv -f .deps/data.Tpo .deps/data.Plo
/bin/sh
../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-g -O2 -MT check.lo -MD -MP -MF .deps/check.Tpo -c -o check.lo check.c
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT check.lo -MD -MP -MF .deps/check.Tpo -c check.c -DPIC -o .libs/check.o
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT check.lo -MD -MP -MF .deps/check.Tpo -c check.c -o check.o >/dev/null 2>&1
mv -f .deps/check.Tpo .deps/check.Plo
/bin/sh
../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c -o error.lo error.c
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -DPIC -o .libs/error.o
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
mv -f .deps/error.Tpo .deps/error.Plo
/bin/sh
../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-g -O2 -MT util.lo -MD -MP -MF .deps/util.Tpo -c -o util.lo util.c
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT util.lo -MD -MP -MF .deps/util.Tpo -c util.c -DPIC -o .libs/util.o
In file included from util.c:23:0:
snprintf.h:50:12: error: conflicting types for 'asnprintf'
/usr/include/stdio.h:246:8: note: previous declaration of 'asnprintf' was here
snprintf.h:54:12: error: conflicting types for 'vasnprintf'
/usr/include/stdio.h:276:8: note: previous declaration of 'vasnprintf' was here
Makefile:380: recipe for target `util.lo' failed
make[2]: *** [util.lo] Error 1
make[2]: Leaving directory `/cygdrive/c/Ruben/SoftLib/libsmi/libsmi-0.4.8/lib'
Makefile:347: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/Ruben/SoftLib/libsmi/libsmi-0.4.8'
Makefile:239: recipe for target `all' failed
make: *** [all] Error 2