pkgsrc-Bugs archive

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

pkg/39058: security/aide configure failures in MacOS X 10.4.11



>Number:         39058
>Category:       pkg
>Synopsis:       security/aide configure failures in MacOS X 10.4.11
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 28 16:55:00 +0000 2008
>Originator:     John D. Baker
>Release:        Mac OS X 10.4.11, pkgsrc-2008Q1
>Organization:
>Environment:
Darwin aardvark-2.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 
18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386

>Description:
The configure step for security/aide fails with:

[...]
checking for vsnprintf... no
configure: error: Must have a system that supports vsnprintf.
*** Error code 1
[...]

Later,

[...]
In file included from db.c:45:
/usr/pkgsrc/security/aide/work/aide-0.10/include/util.h:61: error: conflicting 
types for 'strnstr'
/usr/include/string.h:103: error: previous declaration of 'strnstr' was here
[...]

[...]
util.c:367: error: conflicting types for 'strnstr'
/usr/include/string.h:103: error: previous declaration of 'strnstr' was here
[...]


>How-To-Repeat:
Attempt to build security/aide on MacOS X 10.4.11 (intel)
>Fix:
Static linking is discouraged on MacOS X.  See
http://developer.apple.com/qa/qa2001/qa1118.html

Set LD_STATIC_FLAG='' in configure.

Add conditional for !defined(__APPLE__) in util.h, util.c

These should be added to patch-ab, patch-ac, and patch-ad,
respectively.

--- work/aide-0.10/configure.post-patch 2008-06-28 10:53:23.000000000 -0500
+++ work/aide-0.10/configure    2008-06-28 11:06:17.000000000 -0500
@@ -1603,8 +1603,8 @@
 
 
 
+host_os=`uname -s | tr "[A-Z]" "[a-z]"`
 
-    
 if test $ac_cv_prog_gcc = yes; then
     LD_STATIC_FLAG='-static'
 
@@ -1635,6 +1635,9 @@
        ## pic_flag=-Kconform_pic
        ## fi
        ;;
+    darwin*)
+       LD_STATIC_FLAG=''
+    ;;
     *)
        ## pic_flag='-fPIC'
        ;;
--- work/aide-0.10/configure.in.orig    2008-06-28 10:53:36.000000000 -0500
+++ work/aide-0.10/configure.in 2008-06-28 11:06:11.000000000 -0500
@@ -57,6 +57,8 @@
 
 
 dnl This is borrowed from libtool
+
+host_os=`uname -s | tr "[A-Z]" "[a-z]"`
     
 if test $ac_cv_prog_gcc = yes; then
     LD_STATIC_FLAG='-static'
@@ -88,6 +90,10 @@
        ## pic_flag=-Kconform_pic
        ## fi
        ;;
+    darwin*)
+       LD_STATIC_FLAG=''
+       ## pic_flag='-fPIC'
+    ;;
     *)
        ## pic_flag='-fPIC'
        ;;
--- work/aide-0.10/include/util.h.post-patch    2008-06-28 10:58:04.000000000 
-0500
+++ work/aide-0.10/include/util.h       2008-06-28 10:58:26.000000000 -0500
@@ -57,7 +57,7 @@
 
 void init_sighandler(void);
 
-#if !defined(__DragonFly__)
+#if !defined(__DragonFly__) && !defined(__APPLE__)
 char* strnstr(char* haystack,char* needle,int n);
 #endif
 
--- work/aide-0.10/src/util.c.post-patch        2008-06-28 11:22:40.000000000 
-0500
+++ work/aide-0.10/src/util.c   2008-06-28 11:23:21.000000000 -0500
@@ -357,7 +357,7 @@
 }
 
 
-#if !defined(__DragonFly__)
+#if !defined(__DragonFly__) && !defined(__APPLE__)
 /* Like strstr but only do search for maximum of n chars.
    haystack does not have to be NULL terminated
    needle has to be NULL terminated. NULL in needle is not used in compare.



Home | Main Index | Thread Index | Old Index