Summary: | =net-print/cups-1.3.8-r2 - testarray.c:80: error: 'strcmp' undeclared (first use in this function) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Anderson (tanderson) (RETIRED) <tanderson> |
Component: | New packages | Assignee: | Printing Team <printing> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jer |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Include "string.h", not <cups/string.h> |
Description
Thomas Anderson (tanderson) (RETIRED)
2008-11-13 01:55:24 UTC
That version is marked stable so you must be very special. Your paludis info does not include USE flag usage for this package, so it would help if you posted that too. Output of paludis --pretend --install cups: These packages will be installed: * net-print/cups [U 1.2.12-r4 -> 1.3.8-r2] <target> Reasons: app-text/ghostscript-gpl-8.62:0::installed, x11-libs/gtk+-2.12.11:2::installed X acl+ -avahi+ dbus -gnutls+ -java+ jpeg -kerberos+ ldap pam perl+ -php png -ppds python+ -samba -slp ssl -static+ tiff -xinetd+ -zeroconf+ linguas: -de+ -en+ -es+ -et+ -fr+ -he+ -id+ -it+ -ja+ -pl+ -sv+ -zh_TW+ Total: 1 package (1 upgrade) On further examination, it might not be cups' fault. It seems that strcmp() is in fact used all over the place in that file. The only place it does have a problem is with that one cast on line 80. Redefining strcmp to: extern int strcmp(char*s1,char*s2); before main() in testarray.c fixes the compilation problem. Maybe the problem is not in cups itself but in the string.h header? Created attachment 171661 [details, diff]
Include "string.h", not <cups/string.h>
jeroen@astrid /var/tmp/portage/net-print/cups-1.3.8-r2/work/cups-1.3.8/cups $ grep include\ \<cups\/string\.h *
testarray.c:#include <cups/string.h>
testipp.c:#include <cups/string.h>
testppd.c:#include <cups/string.h>
jeroen@astrid /var/tmp/portage/net-print/cups-1.3.8-r2/work/cups-1.3.8/cups $ grep include\ .*string\.h *
array.c:#include "string.h"
attr.c:#include "string.h"
backend.c:#include "string.h"
dir.c:#include "string.h"
emit.c:#include "string.h"
encode.c:#include "string.h"
globals.h:# include "string.h"
http.h:# include <string.h>
mark.c:#include "string.h"
md5.c:#include "string.h"
md5passwd.c:#include "string.h"
options.c:#include "string.h"
page.c:#include "string.h"
sidechannel.c:#include "string.h"
snprintf.c:#include "string.h"
string.c:#include "string.h"
string.h:# include <string.h>
string.h:# include <bstring.h>
testadmin.c:#include "string.h"
testarray.c:#include <cups/string.h>
testfile.c:#include "string.h"
testhttp.c:#include "string.h"
testi18n.c:#include "string.h"
testipp.c:#include <cups/string.h>
testlang.c:#include "string.h"
testppd.c:#include <cups/string.h>
Can't see why it fails for you but maybe this patch helps?
Does it still fail for you with more recent cups versions? As there is no reply for test request just closing it as fixed since i am unable to reproduce it. |