Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2014 22:30:06 GMT
From:      Daniel Siechniewicz <daniel@nulldowntime.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187433: net-mgmt/mk-livestatus fix to compile on FreeBSD 10.0
Message-ID:  <201403102230.s2AMU603090299@cgiserv.freebsd.org>
Resent-Message-ID: <201403102240.s2AMe03p060726@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187433
>Category:       ports
>Synopsis:       net-mgmt/mk-livestatus fix to compile on FreeBSD 10.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 10 22:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Siechniewicz
>Release:        10.0
>Organization:
nullDowntime Ltd
>Environment:
FreeBSD pkg-0001 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
net-mgmt/mk-livestatus wouldn't compile on FreeBSD 10.0 amd64 (compilation for nagios4) with the following error:

LogCache.cc:71:5: error: use of undeclared identifier 'pthread_mutex_init'
    pthread_mutex_init(&_lock, 0);
    ^
LogCache.cc:87:5: error: use of undeclared identifier 'pthread_mutex_destroy'
    pthread_mutex_destroy(&_lock);
    ^
LogCache.cc:92:5: error: use of undeclared identifier 'pthread_mutex_lock'
    pthread_mutex_lock(&_lock);
    ^
LogCache.cc:97:5: error: use of undeclared identifier 'pthread_mutex_unlock'
    pthread_mutex_unlock(&_lock);
    ^
1 warning and 4 errors generated.
gmake[3]: *** [livestatus_so-LogCache.o] Error 1
gmake[3]: Leaving directory `/wrkdirs/usr/ports/net-mgmt/mk-livestatus/work/mk-livestatus-1.2.4/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/wrkdirs/usr/ports/net-mgmt/mk-livestatus/work/mk-livestatus-1.2.4'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/wrkdirs/usr/ports/net-mgmt/mk-livestatus/work/mk-livestatus-1.2.4'
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/mk-livestatus

>How-To-Repeat:
Attempt to build the port (tested with Nagios 4 option chosen) on FreeBSD 10.0 amd64
>Fix:
Please see attached port patch. All it does is include pthread in ./src/LogCache.cc . This causes the port to compile. Also tested successfully on redports: 

https://redports.org/buildarchive/20140310170910-94842/
https://redports.org/buildarchive/20140310200429-12536/



Patch attached with submission follows:

diff -ruN ./net-mgmt/mk-livestatus.orig/files/patch-src__LogCache.cc ./net-mgmt/mk-livestatus/files/patch-src__LogCache.cc
--- ./net-mgmt/mk-livestatus.orig/files/patch-src__LogCache.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./net-mgmt/mk-livestatus/files/patch-src__LogCache.cc	2014-03-10 16:30:00.412061899 +0000
@@ -0,0 +1,10 @@
+--- ./src/LogCache.cc.orig	2014-03-10 16:27:13.990923179 +0000
++++ ./src/LogCache.cc	2014-03-10 16:27:38.607926737 +0000
+@@ -25,6 +25,7 @@
+ #include <time.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <pthread.h>
+ #include <unistd.h>
+ #include <stddef.h>
+ #include <stdarg.h>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403102230.s2AMU603090299>