argus-clients-3.0.0.rc.63 make failure - OpenBSD4.1

Eric Pancer epancer at gmail.com
Wed Feb 6 17:18:50 EST 2008


On Feb 6, 2008 2:57 PM, Peter Van Epp <vanepp at sfu.ca> wrote:

> checking the OpenBSD man page to see if it is in a different library would
> be a good bet. They may have a separate posix library that needs to be added
> by configure.

Seems that scheduling priorities aren't enabled in OpenBSD yet. I did
some searching and mostly what I found is that this isn't gonna work
out for us.

So....take note of these two patches.

$ diff -u common/argus_main.c.old common/argus_main.c
--- common/argus_main.c.old     Wed Feb  6 15:23:32 2008
+++ common/argus_main.c Wed Feb  6 15:23:58 2008
@@ -152,7 +152,7 @@
    if ((status = pthread_attr_init(&attr)) != 0)
       ArgusLog (LOG_ERR, "pthreads init error");

-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN) && !defined(OpenBSD)
    if ((status = pthread_attr_getschedpolicy(&attr, &thread_policy)) != 0)
       ArgusLog (LOG_ERR, "pthreads get policy error");
    if ((status = pthread_attr_getschedparam(&attr, &thread_param)) != 0)

$ diff -u ratop/ratop.c.old ratop/ratop.c
--- ratop/ratop.c.old   Wed Feb  6 15:28:33 2008
+++ ratop/ratop.c       Wed Feb  6 15:30:36 2008
@@ -519,7 +519,7 @@
          if ((status = pthread_attr_init(&RaTopAttr)) != 0)
             ArgusLog (LOG_ERR, "pthreads init error");

-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN) && !defined(OpenBSD)
          if ((status = pthread_attr_getschedpolicy(&RaTopAttr,
&thread_policy)) != 0)
             ArgusLog (LOG_ERR, "pthreads get policy error");
          if ((status = pthread_attr_getschedparam(&RaTopAttr,
&thread_param)) != 0)
@@ -589,7 +589,7 @@
    if ((status = pthread_attr_init(&attr)) != 0)
       ArgusLog (LOG_ERR, "pthreads init error");

-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) &&
!defined(CYGWIN) && !defined(OpenBSD)
    if ((status = pthread_attr_getschedpolicy(&attr, &thread_policy)) != 0)
       ArgusLog (LOG_ERR, "pthreads get policy error");
    if ((status = pthread_attr_getschedparam(&attr, &thread_param)) != 0)

However, now when I try and start it (with .debug/.devel enabled) I
stumble upon the following.

# gdb argus argus.core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-unknown-openbsd4.2"...
Core was generated by `argus'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpcap.so.5.0...done.
Loaded symbols for /usr/lib/libpcap.so.5.0
Reading symbols from /usr/lib/libm.so.2.3...done.
Loaded symbols for /usr/lib/libm.so.2.3
Reading symbols from /usr/lib/libc.so.41.0...done.
Loaded symbols for /usr/lib/libc.so.41.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x000000000012e630 in ArgusEstablishListen (output=0x4ecee000,
errbuf=0xffffffffffff8450 "") at ArgusOutput.c:677
677              if ((s = socket (hp->ai_family, hp->ai_socktype,
hp->ai_protocol)) >= 0) {
(gdb) where
#0  0x000000000012e630 in ArgusEstablishListen (output=0x4ecee000,
errbuf=0xffffffffffff8450 "") at ArgusOutput.c:677
#1  0x000000000012cc1c in ArgusInitOutput (output=0x4ecee000) at
ArgusOutput.c:170
#2  0x0000000000105ea4 in main (argc=1, argv=0xffffffffffff8c08) at argus.c:544

Could this be due to sparc64?

- Eric



More information about the argus mailing list