Re: Binaries for Solaris 5.5.1. or build advice

stan <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Wed, Jul 02, 2008 at 05:47:27PM +0200, Thomas Anders wrote:
> stan wrote:
> > Hee is the first build failure:
> > 
> > snmp_vars.c: In function `add_to_init_list':
> > snmp_vars.c:394: warning: assignment makes pointer from integer without a
> > cast
> > snmp_vars.c:400: warning: assignment makes pointer from integer without a
> > cast
> 
> These are warnings, not errors, so unless you've turned on the "treat warnings as errors" gcc option, there should be some other error as well.
> 
> Please always at least supply the full configure line as well as the full output of running "make" again after hitting a failure.

Sorry, here is a script of the run. BTW do you want me to continue to copy
the list on this?


Script started on Wed Jul 02 12:08:06 2008
AP0502# make
making all in /usr/local/westvaco/src/pd/ucd-snmp/net-snmp-5.4.1.2/snmplib
making all in /usr/local/westvaco/src/pd/ucd-snmp/net-snmp-5.4.1.2/agent
/bin/sh ../libtool --mode=compile gcc -I../include -I. -I../agent -I../agent/mibgroup  -I../snmplib -g -O2 -Dsolaris2=solaris2 -c -o snmp_vars.lo snmp_vars.c
 gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2 -Dsolaris2=solaris2 -c snmp_vars.c  -fPIC -DPIC -o .libs/snmp_vars.o
In file included from ../include/net-snmp/definitions.h:22,
                 from ../include/net-snmp/net-snmp-includes.h:71,
                 from snmp_vars.c:139:
../include/net-snmp/types.h:170: warning: `SIZEOF_INTMAX_T' redefined
../include/net-snmp/net-snmp-config.h:1163: warning: this is the location of the previous definition
In file included from /usr/include/sys/lwp.h:10,
                 from /usr/include/sys/klwp.h:19,
                 from /usr/include/sys/thread.h:13,
                 from /opt/GCC2721/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.1/include/sys/proc.h:15,
                 from /usr/include/kvm.h:13,
                 from kernel.h:11,
                 from snmp_vars.c:142:
/usr/include/sys/synch.h:18: warning: redefinition of `uint8_t'
../include/net-snmp/types.h:87: warning: `uint8_t' previously declared here
/usr/include/sys/synch.h:22: conflicting types for `uint32_t'
../include/net-snmp/types.h:134: previous declaration of `uint32_t'
/usr/include/sys/synch.h:26: warning: redefinition of `uint64_t'
../include/net-snmp/types.h:162: warning: `uint64_t' previously declared here
snmp_vars.c: In function `add_to_init_list':
snmp_vars.c:394: warning: assignment makes pointer from integer without a cast
snmp_vars.c:400: warning: assignment makes pointer from integer without a cast
*** Error code 1
make: Fatal error: Command failed for target `snmp_vars.lo'
Current working directory /usr/local/westvaco/src/pd/ucd-snmp/net-snmp-5.4.1.2/agent
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
AP0502# 
script done on Wed Jul 02 12:08:55 2008

Does thta give you what you need on that?

> 
> In case of your uint*_t problems, please supply the output of "grep UINT include/net-snmp/net-snmp-config.h" 

AP0502# grep UINT include/net-snmp/net-snmp-config.h
/* #undef HAVE_UINT32_T */
/* #undef HAVE_UINT64_T */
/* #undef HAVE_UINTPTR_T */
/* #undef HAVE_UINT16_T */
/* #undef HAVE_UINT32_T */
/* #undef HAVE_UINT64_T */
/* #undef HAVE_UINT8_T */
/* #undef HAVE_UINTMAX_T */
/* #undef HAVE_UINTPTR_T */


as well as the uint*_t definitions from /usr/include/sys/synch.h.

I have not done this stuff in _way_ too long :-( I did not imedialty see
what you wer asking for in this file, so I am taking the lazy way out and
sending the whole file. Forgive me, I will try to get back up to speed on
this.


/*
 * Copyright (c) 1993, by Sun Microsystems, Inc.
 */

#ifndef	_SYS_SYNCH_H
#define	_SYS_SYNCH_H

#pragma ident	"@(#)synch.h	1.21	93/04/13 SMI"

#include <sys/types.h>

#ifdef	__cplusplus
extern "C" {
#endif

#ifndef	_UINT8_T
#define	_UINT8_T
typedef unsigned char	uint8_t;
#endif
#ifndef	_UINT32_T
#define	_UINT32_T
typedef unsigned long	uint32_t;
#endif
#ifndef	_UINT64_T
#define	_UINT64_T
typedef u_longlong_t	uint64_t;
#endif

/*
 * Thread and LWP mutexes have the same type
 * definitions.
 */
typedef struct _lwp_mutex {
	struct _mutex_flags {
		uint8_t		flag[4];
		uint32_t 	type;
	} flags;
	union _mutex_lock_un {
		struct _mutex_lock {
			uint8_t	pad[8];
		} lock64;
		uint64_t owner64;
	} lock;
	uint64_t data;
} lwp_mutex_t;

#define	mutex_lockw	lock.lock64.pad[7]

/*
 * Thread and LWP condition variables have the same
 * type definition.
 */
typedef struct _lwp_cond {
	struct _lwp_cond_flags {
		uint8_t		flag[4];
		uint32_t 	type;
	} flags;
	uint64_t data;
} lwp_cond_t;


/*
 * LWP semaphores
 */

typedef struct _lwp_sema {
	uint32_t	count;		/* semaphore count */
	uint32_t	type;
	uint8_t		flags[8];	/* last byte reserved for waiters */
	uint64_t	data;		/* optional data */
} lwp_sema_t;

/*
 * Definitions of synchronization types.
 */
#define	USYNC_THREAD	0		/* private to a process */
#define	USYNC_PROCESS	1		/* shared by processes */
#define	TRACE_TYPE	2

#ifdef	__cplusplus
}
#endif

#endif /* _SYS_SYNCH_H */
> 
> I'd also suggest to switch to net-snmp 5.4.2.pre2 which includes all recent fixes.

Where is the best place to get this? I can find this using Google on
sourceforge, but it seems to be older than 5.4.2, so I am not certain that
is the right one.


-- 
One of the main causes of the fall of the roman empire was that, lacking
zero, they had no way to indicate successful termination of their C
programs.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.