Seems like a somewhat trivial error: Compiling testadmin.c... Linking testadmin... Compiling testarray.c... testarray.c: In function 'main': testarray.c:80: error: 'strcmp' undeclared (first use in this function) testarray.c:80: error: (Each undeclared identifier is reported only once testarray.c:80: error: for each function it appears in.) testarray.c:110: warning: implicit declaration of function 'strdup' testarray.c:110: warning: incompatible implicit declaration of built-in function 'strdup' testarray.c:192: warning: implicit declaration of function 'strcmp' testarray.c:333: warning: implicit declaration of function 'strlen' testarray.c:333: warning: incompatible implicit declaration of built-in function 'strlen' testarray.c:356: warning: implicit declaration of function 'strcpy' testarray.c:356: warning: incompatible implicit declaration of built-in function 'strcpy' testarray.c: In function 'load_words': testarray.c:508: warning: incompatible implicit declaration of built-in function 'strdup' make[1]: *** [testarray.o] Error 1 make: *** [all] Error 1 /usr/libexec/paludis/utils/emake: emake returned error 2 This is using paludis. paludis --info: paludis 0.30.3 Paludis build information: Compiler: CXX: i686-pc-linux-gnu-g++ 4.1.2 (Gentoo 4.1.2) CXXFLAGS: -O2 -march=i686 -pipe LDFLAGS: DATE: 2008-11-12T17:39:16-0500 Libraries: C++ Library: GNU libstdc++ 20070214 Reduced Privs: reduced_uid: 106 reduced_uid->name: paludisbuild reduced_uid->dir: /dev/null reduced_gid: 447 reduced_gid->name: paludisbuild Paths: DATADIR: /usr/share LIBDIR: /usr/lib LIBEXECDIR: /usr/libexec SYSCONFDIR: /etc PYTHONINSTALLDIR: RUBYINSTALLDIR: /usr/lib/ruby/site_ruby/1.8/i686-linux Environment: Format: paludis Config dir: /etc/paludis World file: /var/lib/portage/world Repository installed-virtuals: format: installed_virtuals root: / Repository virtuals: format: virtuals Repository gentoo: format: ebuild location: /usr/portage append_repository_name_to_write_cache: true binary_destination: false binary_keywords: binary_uri_prefix: builddir: /var/tmp/paludis cache: /usr/portage/metadata/cache distdir: /usr/portage/distfiles eapi_when_unknown: 0 eapi_when_unspecified: 0 eclassdirs: /usr/portage/eclass ignore_deprecated_profiles: false layout: traditional names_cache: /usr/portage/.cache/names newsdir: /usr/portage/metadata/news profile_eapi: 0 profiles: /usr/portage/profiles/default-linux/x86/2007.0/desktop securitydir: /usr/portage/metadata/glsa setsdir: /usr/portage/sets sync: rsync://rsync.gentoo.org/gentoo-portage sync_options: use_manifest: use write_cache: /var/cache/paludis/metadata Package information: app-admin/eselect-compiler: (none) app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7 2.1.6 dev-lang/python: 2.4.4-r6 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: (none) dev-util/cmake: 2.4.6-r1 dev-util/confcache: (none) sys-apps/baselayout: 1.12.11.1 sys-apps/openrc: (none) sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13 2.61-r2 sys-devel/automake: 1.10.1-r1 1.4_p6 1.5 1.6.3 1.7.9-r1 1.8.5-r3 1.9.6-r2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 (for sys-kernel/linux-headers::installed) Repository installed: format: vdb location: /var/db/pkg builddir: /var/tmp/paludis names_cache: /var/db/pkg/.cache/names provides_cache: /var/db/pkg/.cache/provides root: / Repository overlay: format: ebuild location: /overlay append_repository_name_to_write_cache: true binary_destination: false binary_keywords: binary_uri_prefix: builddir: /var/tmp/paludis cache: /var/empty distdir: /usr/portage/distfiles eapi_when_unknown: 0 eapi_when_unspecified: 0 eclassdirs: /usr/portage/eclass /overlay/eclass ignore_deprecated_profiles: false layout: traditional master_repository: gentoo names_cache: /overlay/.cache/names newsdir: /overlay/metadata/news profile_eapi: 0 profiles: /usr/portage/profiles/default-linux/x86/2007.0/desktop securitydir: /overlay/metadata/glsa setsdir: /overlay/sets sync: sync_options: use_manifest: use write_cache: /var/cache/paludis/metadata No packages were specified on the command line, so detailed information is not available (Paludis can display detailed information for both installed and installable packages). Reproducible: Always
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.