pkgsrc-Bugs archive

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

pkg/42922: netpgp needs feature test macros to compile under glibc.



>Number:         42922
>Category:       pkg
>Synopsis:       netpgp needs feature test macros to compile under glibc.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 05 02:05:00 +0000 2010
>Originator:     Steven Drake
>Release:        netpgp-20100212
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1
C compiler: cc (GCC) 4.4.1

>Description:
To compile netpgp under glibc the following glibc feature test macros need to
be defined:

_XOPEN_SOURCE for strptime(3)
_BSD_SOURCE for strdup(3) and strcasecmp(3)

>How-To-Repeat:
cd security/netpgp ; bmake

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../include 
-I/tmp/pkgsrc/security/netpgp/work.idran/.buildlink/include -Werror -Wall 
-Wpointer-arith -O2 -pipe -march=i586 -mtune=generic -MT libnetpgp_la-netpgp.lo 
-MD -MP -MF .deps/libnetpgp_la-netpgp.Tpo -c netpgp.c  -fPIC -DPIC -o 
.libs/libnetpgp_la-netpgp.o
cc1: warnings being treated as errors
netpgp.c: In function 'get_duration':
netpgp.c:339: error: implicit declaration of function 'strptime'
netpgp.c:339: error: comparison between pointer and integer
netpgp.c:342: error: comparison between pointer and integer
...............

>Fix:
The blow patch to the netpgp source:

--- configure.ac.orig   2010-03-04 20:10:40.920418350 +1300
+++ configure.ac        2010-03-04 20:11:34.736424527 +1300
@@ -86,6 +86,14 @@ AC_SEARCH_LIBS([gzopen], [z])
 AC_SEARCH_LIBS([BZ2_bzDecompress], [bz2])
 AC_SEARCH_LIBS([RSA_public_encrypt], [crypto])
 
+# glibc feature_test_macros(7)
+case $host in
+*-gnu)
+       AC_DEFINE([_XOPEN_SOURCE], [1], [Needed for strptime(3) under glibc2])
+       AC_DEFINE([_BSD_SOURCE], [1], [Needed for strdup(3) and strcasecmp(3) 
under glibc2])
+       ;;
+esac
+
 # Initialize the testsuite
 #
 AC_CONFIG_TESTDIR([tests])



Home | Main Index | Thread Index | Old Index