Subject: possible configure script error in finding zlib library Delivered-To: bind9-bugs@bugs.isc.org X-RT-Incoming-Encryption: Not encrypted From: "Brian Meyer" Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.pao1.isc.org", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by bugs.isc.org (Postfix) with ESMTPS id 95CF1D78B0A; Mon, 6 Nov 2017 22:57:21 +0000 (UTC) Received: from zmail.cardadmin.com (zmail.cardadmin.com [167.114.145.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id E94AB3AB5A6; Mon, 6 Nov 2017 22:56:47 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.cardadmin.com (Postfix) with ESMTP id 51FCC941E2; Mon, 6 Nov 2017 18:02:38 -0500 (EST) Received: from zmail.cardadmin.com ([127.0.0.1]) by localhost (zmail.cardadmin.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id I0969-UYulvC; Mon, 6 Nov 2017 18:02:27 -0500 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zmail.cardadmin.com (Postfix) with ESMTP id DB04A941E3; Mon, 6 Nov 2017 18:02:27 -0500 (EST) Received: from zmail.cardadmin.com ([127.0.0.1]) by localhost (zmail.cardadmin.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Wb9sFCRPt1LV; Mon, 6 Nov 2017 18:02:27 -0500 (EST) Received: from meyer.attlocal.net (23-115-197-86.lightspeed.sndgca.sbcglobal.net [23.115.197.86]) by zmail.cardadmin.com (Postfix) with ESMTPSA id 26005941E2; Mon, 6 Nov 2017 18:02:26 -0500 (EST) X-Spam-Status: No, score=-0.0 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 To: bind-bugs@isc.org, dhcp-bugs@isc.org Content-Transfer-Encoding: quoted-printable X-Original-To: bind9-bugs@bugs.isc.org From brian@cardadmin.com Mon Nov 6 22:57:21 2017 content-type: text/plain; charset="utf-8" Message-ID: <0DA2B7B2-81B2-4452-924A-7C817D7E7A40@cardadmin.com> MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Virus-Scanned: amavisd-new at zmail.cardadmin.com Date: Mon, 6 Nov 2017 14:56:31 -0800 Return-Path: X-Mailer: Apple Mail (2.1878.6) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.pao1.isc.org X-RT-Original-Encoding: ascii X-RT-Interface: Email Content-Length: 1972 downloaded ftp://ftp.isc.org/isc/bind9/9.11.2/bind-9.11.2.tar.gz Then I did a standard gnu make install to make it's libraries available on my mac system in a safe place that won't affect my actual system. I was using the --with-zlib and it did not seem to be taking it. I have everything compiling in a custom prefix location named "/agility" so usually I can use "--with-zlib=/agility". I noticed that in the following code ( at about 17326 in ./configure ) that when I added an echo of the variable being tested, it said "TESTING/agility/zlib.h" and thus it isn't being found, the file in question is actually in "/agility/include/zlib.h" However after that it is after that setting zlib_cflags="-I${with_zlib}/include", and LIBS="$LIBS -L${with_zlib}/lib", so it really wants the file in include, hence this code can never work. It would have to be in the root of agility to configure it, and if so it sets up an include path for two subdirectories which it would need to compile it. I edited the source file to if test -f "${with_zlib}/include/zlib.h" so the variable with_zlib is the root, and it matches the other usage in zlib_cflags="-I${with_zlib}/include", this seems to be working. I suggest adjusting the source to reflect this. Here is the code in question have_zlib="" case "$with_zlib" in no) zlib_libs="" ;; auto|yes) for d in /usr /usr/local /opt/local do if test -f "${d}/include/zlib.h" then if test ${d} != /usr then zlib_cflags="-I ${d}/include" LIBS="$LIBS -L${d}/lib" fi have_zlib="yes" fi done ;; *) echo TESTING "${with_zlib}/zlib.h" <-- this is my debugging to see what is going on if test -f "${with_zlib}/zlib.h" <---- this is the bug, it should be "${with_zlib}/include/zlib.h" then zlib_cflags="-I${with_zlib}/include" LIBS="$LIBS -L${with_zlib}/lib" have_zlib="yes" else as_fn_error $? "$with_zlib/include/zlib.h not found." "$LINENO" 5 fi ;; esac