monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD Compilation Issues


From: Russell Adams
Subject: Re: OpenBSD Compilation Issues
Date: Wed, 26 Feb 2003 10:50:15 -0600
User-agent: Mutt/1.4i

I've managed a little progress.

I've manually replaced all LINUX references in the Makefile with
FREEBSD (being closer to openbsd than linux).

Also, had to change a function definition, here's the diff.

diff -Naru monit-3.2/util.c my_monit-3.2/util.c
--- monit-3.2/util.c    Mon Feb 17 05:42:28 2003
+++ my_monit-3.2/util.c Wed Feb 26 04:18:18 2003
@@ -813,7 +813,7 @@
  * @param delta seconds. 
  * @return an uptime string
  */
-char *get_uptime(time_t delta) {
+char *get_uptime(long delta) {
 
   static int min= 60;
   static int hour= 3600;

That resolves the declaration error.

However, the FREEBSD specific files don't work. :P

gcc -c -g -O2 -Wall -I/usr/include -DFREEBSD  -I. -I./protocols
-I./http -I./process  process/sysdep_FREEBSD.c -o
process/sysdep_FREEBSD.o
process/sysdep_FREEBSD.c:63: vm/vm.h: No such file or directory
process/sysdep_FREEBSD.c:64: vm/vm_object.h: No such file or directory
process/sysdep_FREEBSD.c:65: vm/pmap.h: No such file or directory
process/sysdep_FREEBSD.c:68: vm/vm_map.h: No such file or directory
gmake: *** [process/sysdep_FREEBSD.o] Error 1

So, turns out I think the "vm" stuff is really in /usr/include/uvm on
OpenBSD, so I copy sysdep_FREEBSD.c over to sysdep_OPENBSD.c and
substitute the proper files.

New error, this one I can't troubleshoot, not that good at OS specific
C crap. ;]

gcc -c -g -O2 -Wall -I/usr/include -DOPENBSD   -I. -I./protocols
-I./http -I./process  process/sysdep_OPENBSD.c -o
process/sysdep_OPENBSD.o
process/sysdep_OPENBSD.c: In function `init_process_info_sysdep':
process/sysdep_OPENBSD.c:154: storage size of `vmm' isn't known
process/sysdep_OPENBSD.c:154: warning: unused variable `vmm'
gmake: *** [process/sysdep_OPENBSD.o] Error 1

Sorry for rambling, but figured I'd be thorough.

Russell


On Wed, Feb 26, 2003 at 10:23:43AM -0600, Russell Adams wrote:
> Has anyone else been able to compile monit under OpenBSD 3.1?
> 
> I've ensured that I use gmake, and tried without SSL.
> 
> 
> >From configure:
> 
> monit has been configured with the following options:
>                 Architecture: LINUX
>                  SSL support: enabled
>                SSL directory: /usr
>               Compiler flags: -g -O2 -Wall -I/usr/include
>                 Linker flags: -pthread -lresolv  -L/usr/lib -lssl
>                 -lcrypto
>            pid file location: /var/run
> 
> 
> The specific compile error:
> 
> gcc -c -g -O2 -Wall -I/usr/include -DLINUX   -I. -I./protocols
> -I./http -I./process  util.c -o util.o
> util.c:816: conflicting types for `get_uptime'
> monitor.h:339: previous declaration of `get_uptime'
> gmake: *** [util.o] Error 1
> # 
> 
> Suggestions?
> 
> Russell
> 
> 
> --
> To unsubscribe:
> http://mail.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]