Menu

#2228 compile errors with swrun_cygwin.c

windows
closed
nobody
5
2019-05-13
2011-01-31
Anonymous
No

$ uname -a
CYGWIN_NT-6.1 BLAKE-V1500 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin

LDFLAGS=-fstack-protector ; export LDFLAGS
CFLAGS=-fstack-protector ; export CFLAGS
CPPFLAGS=-fstack-protector ; export CPPFLAGS

./configure \ --with-mib-modules="host" \ --with-out-mib-modules=host/hr_network \ --with-libs="-lws2_32 -lregex -libphlpapi" \ --disable-embedded-perl \ --without-perl-modules \ --with-openssl="/usr" \ --enable-ipv6 \ --with-transports="TCPIPv6 UDPIPv6" \ --with-sys-contact="logo.zed@gmail.com" \ --with-sys-location="The Great Underground Empire"

libtool: compile: gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -I/usr/include -fstack-protector -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -fstack-protector -Ucygwin -Dcygwin=cygwin -c host/data_access/swrun_cygwin.c -DDLL_EXPORT -DPIC -o host/data_access/.libs/swrun_cygwin.o
host/data_access/swrun_cygwin.c: In function ‘netsnmp_arch_swrun_container_load’:
host/data_access/swrun_cygwin.c:195: error: request for member ‘process_state’ in something not a structure or union
host/data_access/swrun_cygwin.c:196: error: request for member ‘exitcode’ in something not a structure or union
host/data_access/swrun_cygwin.c:201: error: ‘rc’ undeclared (first use in this function)
host/data_access/swrun_cygwin.c:201: error: (Each undeclared identifier is reported only once
host/data_access/swrun_cygwin.c:201: error: for each function it appears in.)
host/data_access/swrun_cygwin.c:204: error: ‘lowproc’ undeclared (first use in this function)
host/data_access/swrun_cygwin.c:207: error: request for member ‘ppid’ in something not a structure or union
host/data_access/swrun_cygwin.c:210: warning: ‘cygwin_conv_to_posix_path’ is deprecated (declared at /usr/include/sys/cygwin.h:38)
host/data_access/swrun_cygwin.c:210: error: request for member ‘progname’ in something not a structure or union
host/data_access/swrun_cygwin.c:210: error: too few arguments to function ‘cygwin_conv_to_posix_path’
host/data_access/swrun_cygwin.c:217: error: ‘string’ undeclared (first use in this function)
host/data_access/swrun_cygwin.c:251: error: request for member ‘process_state’ in something not a structure or union
host/data_access/swrun_cygwin.c:255: error: request for member ‘exitcode’ in something not a structure or union
make[2]: *** [host/data_access/swrun_cygwin.lo] Error 1
make[2]: Leaving directory `/home/Blake/net-snmp-5.6.1/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/Blake/net-snmp-5.6.1/agent'
make: *** [subdirs] Error 1

Discussion

  • Bart Van Assche

    Bart Van Assche - 2011-02-01

    Confirmed - I can reproduce this. I had a look at the cygwin host MIB implementation and it looks like that code is broken since a very long time. I'm not sure it has ever worked - at least one variable declaration is missing e.g.

    If you want host MIB support on Windows I see two possible options:
    - Porting the recently posted native Win32 implementation from MSVC to gcc (http://sourceforge.net/tracker/index.php?func=detail&aid=3129942&group_id=12694&atid=312694). This would involve adding the libraries indicated with "pragma comment" to the linker path in the configure script if the host MIB is enabled on Cygwin.
    - Building the Net-SNMP source tree via MinGW with winExtDLL support enabled and hence using the Microsoft implementation of the host MIB via winExtDLL (at least in theory winExtDLL should work on Cygwin too, but I haven't got that working yet).

    Any preference ?

     
  • Bart Van Assche

    Bart Van Assche - 2019-05-13
    • status: open --> closed
     
  • Bart Van Assche

    Bart Van Assche - 2019-05-13

    Closing this bug report since the above question has not been answered.

     

Log in to post a comment.