pkgsrc-Bugs archive

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

pkg/42326: [PATCH] after update of autoconf to 2.64 print/cups not compilable (missing header include)



>Number:         42326
>Category:       pkg
>Synopsis:       [PATCH] after update of autoconf to 2.64 print/cups not 
>compilable (missing header include)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 15 23:25:00 +0000 2009
>Originator:     Rumko
>Release:        /
>Organization:
>Environment:
DragonFly rumko.rumko.net 2.5.1-DEVELOPMENT DragonFly 
v2.5.1.259.gf7f6dd-DEVELOPMENT #34: Sun Nov 15 14:24:54 CET 2009     
root%rumko.rumko.net@localhost:/usr/obj/usr/src/sys/MYPRECIOUS  i386
>Description:
After autoconf was updated to 2.64 from 2.63, due to "** Present But Cannot Be 
Compiled: Autoconf will now proceed with
   the compiler's result if a header is present but cannot be compiled.
   The warning is still printed, and you should really fix it by
   providing a fourth parameter to AC_CHECK_HEADER/AC_CHECK_HEADERS." (from 
http://lists.gnu.org/archive/html/autotools-announce/2009-07/msg00000.html), 
cups will not detect resolv.h properly on at least DragonFly BSD, but I believe 
on others (where netinet/in.h has to be included before resolv.h in order for 
apps that include resolv.h to be compilable) as well. Due to resolv.h not being 
detected properly, cups will die when linking testadmin:
"Linking testadmin...
cc -Wl,-R/usr/pkg/lib -Wall -Wno-format-y2k -fPIC -Os -g -fstack-protector -o 
testadmin testadmin.o  -L/home/dcvs/print/cups/work/cups-1.3.11/cups 
-L/home/dcvs/print/cups/work/cups-1.3.11/filter 
-L/usr/obj/pkgsrc/print/cups/work/.buildlink/lib libcups.a 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libgssapi.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libheimntlm.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libkrb5.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libhx509.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libasn1.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libcom_err.so 
/usr/obj/pkgsrc/print/cups/work/.buildlink/lib/libroken.so -lssl -lcrypto 
-lpthread -lm -lcrypt -lz   -Wl,--rpath 
-Wl,/usr/obj/pkgsrc/print/cups/work/.buildlink/lib -Wl,--rpath 
-Wl,/usr/obj/pkgsrc/print/cups/work/.buildlink/lib
libcups.a(http-addr.o): In function `httpAddrLookup':
/home/dcvs/print/cups/work/cups-1.3.11/cups/http-addr.c:234: undefined 
reference to `res_init'
libcups.a(http-addrlist.o): In function `httpAddrGetList':
/home/dcvs/print/cups/work/cups-1.3.11/cups/http-addrlist.c:213: undefined 
reference to `res_init'"

Before the upgrade of autoconf, relevant part of the configure output looked 
like:
"checking resolv.h usability... no
checking resolv.h presence... yes
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h:     check for missing prerequisite headers?
configure: WARNING: resolv.h: see the Autoconf documentation
configure: WARNING: resolv.h:     section "Present But Cannot Be Compiled"
configure: WARNING: resolv.h: proceeding with the preprocessor's result
configure: WARNING: resolv.h: in the future, the compiler will take precedence
checking for resolv.h... yes"

After upgrade of autoconf:
"checking resolv.h usability... no
checking resolv.h presence... yes
configure: WARNING: resolv.h: present but cannot be compiled
configure: WARNING: resolv.h:     check for missing prerequisite headers?
configure: WARNING: resolv.h: see the Autoconf documentation
configure: WARNING: resolv.h:     section "Present But Cannot Be Compiled"
configure: WARNING: resolv.h: proceeding with the compiler's result
checking for resolv.h... no"
>How-To-Repeat:

>Fix:
From 354a0cfb98a126ec981e219cbfb07b87c38ae13c Mon Sep 17 00:00:00 2001
From: Rumko <rumcic%gmail.com@localhost>
Date: Mon, 16 Nov 2009 00:04:25 +0100
Subject: [PATCH] netinet/in.h needs to be included in order for resolv.h to not 
contain incomplete types.

While building, netinet/in.h was included properly in cups/http.h, but 
configure didn't include it and because of that (well mainly due to autoconf 
being updated to 2.64 from 2.63 which checked for the presence of a header, but 
it was not needed to be compilable) resolv.h was not detected properly.
---
 print/cups/distinfo         |    1 +
 print/cups/patches/patch-ah |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
 create mode 100644 print/cups/patches/patch-ah

diff --git a/print/cups/distinfo b/print/cups/distinfo
index 21ed1ef..22fa794 100644
--- a/print/cups/distinfo
+++ b/print/cups/distinfo
@@ -10,6 +10,7 @@ SHA1 (patch-ad) = 6695c344453495cd960460733a80d50654786c60
 SHA1 (patch-ae) = 4b2c1e8821856ba69d6af72a5b96a7b88c346656
 SHA1 (patch-af) = 5445e6b5ced9dee71f48208369728e9d298dd0bb
 SHA1 (patch-ag) = ac35b637aeea8b2e5798c6a779f2ad6ae9e41dca
+SHA1 (patch-ah) = 327dfe599660b27d8bd4700c70c538a896187b92
 SHA1 (patch-an) = 9c11292459b0839ae15920d7cc65469247f30800
 SHA1 (patch-ao) = c9f93c7d69d934677a605197959a162dfb1658eb
 SHA1 (patch-at) = eea32b989402c353f5f1644348c1042a3d4ddfa1
diff --git a/print/cups/patches/patch-ah b/print/cups/patches/patch-ah
new file mode 100644
index 0000000..459ee7e
--- /dev/null
+++ b/print/cups/patches/patch-ah
@@ -0,0 +1,16 @@
+--- config-scripts/cups-network.m4.orig        2009-11-15 23:51:22 +0100
++++ config-scripts/cups-network.m4     2009-11-15 23:53:39 +0100
+@@ -13,7 +13,12 @@
+ dnl   file is missing or damaged, see the license at "http://www.cups.org/";.
+ dnl
+
+-AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
++AC_CHECK_HEADER(netinet/in.h, AC_DEFINE(HAVE_NETINET_IN_H))
++AC_CHECK_HEADER(resolv.h, AC_DEFINE(HAVE_RESOLV_H), [],
++[#ifdef HAVE_NETINET_IN_H
++# include <netinet/in.h>
++#endif
++])
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(gethostbyaddr, nsl)
+ AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
--
1.6.4




Home | Main Index | Thread Index | Old Index