Bug 31700

Summary: On-board popt.h prototype mismatch vs current standalone lib
Product: pkg-config Reporter: Daniel Macks <dmacks>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:

Description Daniel Macks 2010-11-17 23:41:03 UTC
Building pkgconfig-0.25 on OS X 10.6 using --with-installed-popt with popt-1.14 (long-existing version build from debian's source tarball, supplied via fink):

gcc -DHAVE_CONFIG_H -I. -DPKG_CONFIG_PC_PATH="\"/sw/lib/pkgconfig:/sw/share/pkgconfig:/usr/X11/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/lib/pkgconfig\"" -I./glib-1.2.10 -I./glib-1.2.10   -I/sw/include  -Os -MT parse.o -MD -MP -MF .deps/parse.Tpo -c -o parse.o parse.c
parse.c: In function 'parse_libs':
parse.c:759: warning: passing argument 3 of 'poptParseArgvString' from incompatible pointer type
parse.c: In function 'parse_libs_private':
parse.c:808: warning: passing argument 3 of 'poptParseArgvString' from incompatible pointer type
parse.c: In function 'parse_cflags':
parse.c:849: warning: passing argument 3 of 'poptParseArgvString' from incompatible pointer type

Same with popt-1.16 (recently-released from debian). If I do not use --with-installed-popt, those parse.c warnings disappear. The prototype in popt.h is slightly different in popt-1.16 (and comparable in 1.14):

int poptParseArgvString(
  const char * s,
  int * argcPtr,
  const char *** argvPtr
);

vs one included with pkg-config:

int poptParseArgvString(
  char * s,
  int * argcPtr,
  char *** argvPtr
);

and parse.c is coded to match the included one (not 'const').
Comment 1 Dan Nicholson 2012-05-14 14:33:42 UTC
Fixed with popt removal in commit fd4d40b. Please reopen if this is still an issue.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.