Subject: pkg/37078: archivers/unshield: libgetopt not referenced on Slackware Lunix 10.2
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <zeurkous@nichten.info>
List: pkgsrc-bugs
Date: 10/07/2007 23:55:00
>Number: 37078
>Category: pkg
>Synopsis: archivers/unshield: libgetopt not referenced on Slackware Lunix 10.2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 07 23:55:00 +0000 2007
>Originator: De Zeurkous
>Release: Slackware Lunix 10.2
>Organization:
Korax Productions
>Environment:
Linux zeurcomp 2.4.31 #21 Sun Jun 5 19:19:51 PDT 2005 i686 unknown unknown GNU/Lunix
>Description:
When attempting to build archivers/unshield on Slackware Lunix 10.2, I get the following errors:
[snip]
Making all in src
if gcc -DHAVE_CONFIG_H -I. -I. -I../lib -I/usr/include -I/usr/local/include -g -ansi -Wall -Wsign-compare -Wno-long-long -Werror -I../lib -O2 -march=athlon-xp -finline-functions -fomit-frame-pointer -ffast-math -mfpmath=sse -m3dnow -mmmx -msse -pipe -I/usr/include -MT unshield.o -MD -MP -MF ".deps/unshield.Tpo" -c -o unshield.o `test -f 'unshield.c' || echo './'`unshield.c; then mv -f ".deps/unshield.Tpo" ".deps/unshield.Po"; else rm -f ".deps/unshield.Tpo"; exit 1; fi
unshield.c: In function `handle_parameters':
unshield.c:143: warning: implicit declaration of function `getopt'
unshield.c:148: error: `optarg' undeclared (first use in this function)
unshield.c:148: error: (Each undeclared identifier is reported only once
unshield.c:148: error: for each function it appears in.)
unshield.c:197: error: `optind' undeclared (first use in this function)
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/archivers/unshield/work/unshield-0.5/src
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/archivers/unshield/work/unshield-0.5
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/archivers/unshield
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/archivers/unshield
This was using branch 2007Q2 updated from CVS a few minutes ago, and is due to getopt being declared in a seperate header file on said platform.
Complete make output is available at http://www.xs4all.nl/~maribu/devel/NetBSD/misc/pkgsrc-archivers_unshield-Sun%20Oct%20%207%2018:46:48%20UTC%202007-make.1.log.gz
(UNIX gzip, 3K).
>How-To-Repeat:
#!/bin/sh
make() ( exec bmake "${@}" );
cd archivers/unshield &&
exec make
>Fix:
#!/bin/sh
make() ( exec bmake "${@}" );
cd archivers/unshield &&
exec make patch
Then apply the following patch:
diff -ur work.old/unshield-0.5/src/unshield.c work/unshield-0.5/src/unshield.c
--- work.old/unshield-0.5/src/unshield.c 2007-10-07 18:41:42.000000000 +0000
+++ work/unshield-0.5/src/unshield.c 2007-10-07 18:42:27.000000000 +0000
@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <getopt.h>
#ifdef HAVE_CONFIG_H
#include "../lib/unshield_config.h"
#endif