pkgsrc-Users archive

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

devel/libgetopt problem



I wanted to build the devel/libgetopt package on my Slackware Linux system (gcc 
version 3.3.6), but it failed:

... devel/libgetopt # bmake
getopt_long.c: In function `getopt_internal':
getopt_long.c:204: error: `optreset' undeclared (first use in this function)
getopt_long.c:204: error: (Each undeclared identifier is reported only once
getopt_long.c:204: error: for each function it appears in.)
getopt_long.c: In function `getopt_long':
getopt_long.c:408: error: invalid use of undefined type `struct option'
getopt_long.c:408: error: dereferencing pointer to incomplete type
getopt_long.c:410: error: invalid use of undefined type `struct option'
getopt_long.c:410: error: dereferencing pointer to incomplete type
getopt_long.c:410: error: invalid use of undefined type `struct option'
getopt_long.c:410: error: dereferencing pointer to incomplete type
getopt_long.c:410: error: invalid use of undefined type `struct option'
< ... cut here .... >
... devel/libgetopt #

I modified the Makefile (CVS revision 1.24) in the devel/libgetopt directory as 
follows:


--- Makefile 4 Mar 2006 21:29:17 -0000 1.24
+++ Makefile 14 Aug 2006 20:57:42 -0000
@@ -20,6 +20,11 @@
CFLAGS+= -DREPLACE_GETOPT
.endif

+.if ${OPSYS} == "Linux"
+CFLAGS+= -ansi
+CFLAGS+= -DREPLACE_GETOPT
+.endif
+
INSTALLATION_DIRS= include lib man/man3

do-extract:


After 'bmake clean' the package was built without errors. Is there a better 
solution to this problem? If not, could anyone please apply this patch to the 
CVS version of the Makefile?

Markus
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



Home | Main Index | Thread Index | Old Index