From unknown Sat Jun 21 10:43:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25268: 25.1; configure.ac libpng search error Resent-From: "James K. Lowden" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Dec 2016 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25268@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14826178646392 (code B ref -1); Sat, 24 Dec 2016 22:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Dec 2016 22:17:44 +0000 Received: from localhost ([127.0.0.1]:54120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKudL-0001f2-UT for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:17:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKuWX-0001US-Om for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKuWQ-0001TA-Nh for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKuWQ-0001Sp-KS for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKuWM-0001p1-RZ for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKuWJ-0001Ox-2g for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:30 -0500 Received: from mail138c25.carrierzone.com ([64.29.147.208]:51853 helo=mail223c25.carrierzone.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKuWI-00016t-IQ for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:26 -0500 X-Authenticated-User: jklowden.speakeasy.net Received: from willow.schemamania.org (rrcs-50-74-108-158.nyc.biz.rr.com [50.74.108.158]) (authenticated bits=0) by mail223c25.carrierzone.com (8.14.9/8.13.1) with ESMTP id uBOLV9FA023277 for ; Sat, 24 Dec 2016 21:31:10 +0000 Received: by willow.schemamania.org (Postfix, from userid 1000) id 646725804B8; Sat, 24 Dec 2016 16:31:08 -0500 (EST) From: "James K. Lowden" Date: Sat, 24 Dec 2016 16:31:08 -0500 Message-ID: <87fulddnfn.fsf@willow.schemamania.org> MIME-Version: 1.0 Content-Type: text/plain X-CSC: 0 X-CHA: v=2.2 cv=E4W9neVl c=1 sm=1 tr=0 a=eM9kDQsmTy6xYM2S+iw03A==:117 a=eM9kDQsmTy6xYM2S+iw03A==:17 a=n5n_aSjo0skA:10 a=uEPk6M0vAAAA:8 a=aR16PxjQAAAA:8 a=ntyBbpDX78-ZwX6Ard0A:9 a=-BmgLtiK8Zlig_YZ:21 a=22--GSJqezGHVya6:21 a=rPpvpuPpa5YP7RcegtwB:22 a=zbFvvTOBjyH4ze5LlUjX:22 X-CTCH-RefID: str=0001.0A010204.585EE91F.000C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Sat, 24 Dec 2016 17:17:42 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) configure.ac uses libpng-config, if installed, to determine the include directive for the PNG library. Unfortuately, it does not correctly use libpng-config for the linker flags. Consequently, it may mismatch the header file to the library. In my case, configure misdiagnosed my setup, and recommended --no-png. On my system, a libpng-config was installed by the Anaconda scientific Python package distribution. Because I had allowed Anaconda to place itself earlier in the path than /usr/bin, that is the version configure used. I suspect the error I describe below has not been detected before because my setup is unusual. First, let's see what libpng-config has to say on my system: $ for opt in cflags ldflags libs do cmd="libpng-config --$opt" printf "%-25s: %-s\n" "$cmd" "$($cmd)" done libpng-config --cflags : -I/usr/local/anaconda/include/libpng16 libpng-config --ldflags : -L/usr/local/anaconda/lib -lpng16 libpng-config --libs : -lpng16 Now, let's look at how libpng-config is used in configure.ac: $ grep -n libpng-config configure.ac 3412: png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && 3413: png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` || { 3414: # libpng-config does not work; configure by hand. As you can see, png_libs relies on libpng-config --libs not libpng-config --ldflags The produced configure script therefore finds an include file under ananconda, but does not provide the associated -L option to the linker. The configure test fails because a symbol declared in the header file is not supplied by the (older) libpng found by the linker. I believe the fix is to change line 3413 of configure.ac to read: png_libs=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { although IMO that's not quite sufficient, because it doesn't set RPATH. I worked around the problem before completely diagnosing it simply by renaming /usr/local/anaconda to /usr/local/.anaconda, taking it out of the PATH and causing configure not to find it. The outputs are: $ /usr/bin/libpng-config --cflags --libs -I/usr/include/libpng12 -lpng12 which worked just fine. In fact, I used report-emacs-bug in the newly built emacs to send this message. The rest of this message was produced by report-emacs-bug. I include it in case there are details you can use. Humbly submitted, --jkl In GNU Emacs 25.1.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-12-17 built on willow.schemamania.org Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.1 LTS Configured using: 'configure --with-x-toolkit=gtk3 --with-toolkit-scroll-bars --without-dbus --without-gconf --without-gsettings' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: GNUmakefile Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t recentf-mode: t global-ede-mode: t ede-minor-mode: t global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t semantic-idle-scheduler-mode: t semantic-mode: t yas-global-mode: t yas-minor-mode: t global-auto-complete-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: [yas] Loading for `makefile-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/makefile-mode) (quote makefile-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/makefile-mode Parsing Makefile (LL)... [yas] Loading for `text-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/text-mode) (quote text-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/text-mode [yas] Loading for `c-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/c-mode) (quote c-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/c-mode [yas] Loading for `cc-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/cc-mode) (quote cc-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/cc-mode Parsing prim-workalike/Makefile (LL)...done Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils semantic/tag-file semantic/bovine/c hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/analyze/refs auto-complete-c-headers tramp tramp-compat auth-source gnus-util mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs nroff-mode vc-git diff-mode easy-mmode semantic/db-file data-debug cedet-files semantic/bovine/make semantic/decorate/include semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse semantic/dep semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/bovine/make-by semantic/bovine make-mode pp server time-date recentf tree-widget ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-speedbar speedbar sb-image dframe eieio-custom wid-edit semantic/db-mode semantic/db eieio-base semantic/idle semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio eieio-core mode-local find-func cedet yasnippet advice flymake compile comint ansi-color ring auto-complete-config auto-complete popup finder-inf ac-c-headers-autoloads auto-complete-c-headers-autoloads auto-complete-autoloads avy-autoloads format-sql-autoloads popup-autoloads sql-indent-autoloads unbound-autoloads xcscope-autoloads xkcd-autoloads yasnippet-autoloads package epg-config seq byte-opt bytecomp byte-compile cl-extra help-mode easymenu cconv cobol-mode derived cl-macs skeleton cl-seq cl gv edmacro kmacro cl-loaddefs pcase cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 459597 15119) (symbols 48 34093 0) (miscs 40 840 561) (strings 32 79645 25011) (string-bytes 1 2027516) (vectors 16 60451) (vector-slots 8 1036169 7841) (floats 8 1072 263) (intervals 56 1709 70) (buffers 976 29) (heap 1024 69942 1543)) From unknown Sat Jun 21 10:43:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "James K. Lowden" Subject: bug#25268: closed (Re: 25.1; configure.ac libpng search error) Message-ID: References: <92f77364-2356-8861-a500-fcec4bcc7fdc@cs.ucla.edu> <87fulddnfn.fsf@willow.schemamania.org> X-Gnu-PR-Message: they-closed 25268 X-Gnu-PR-Package: emacs Reply-To: 25268@debbugs.gnu.org Date: Sun, 25 Dec 2016 01:09:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1482628142-23827-1" This is a multi-part message in MIME format... ------------=_1482628142-23827-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25268: 25.1; configure.ac libpng search error which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25268@debbugs.gnu.org. --=20 25268: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25268 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1482628142-23827-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25268-done) by debbugs.gnu.org; 25 Dec 2016 01:08:22 +0000 Received: from localhost ([127.0.0.1]:54168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKxIU-0006B8-9w for submit@debbugs.gnu.org; Sat, 24 Dec 2016 20:08:22 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKxIT-0006At-39 for 25268-done@debbugs.gnu.org; Sat, 24 Dec 2016 20:08:21 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 04DC216006D; Sat, 24 Dec 2016 17:08:15 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id s4r8PxF1Bmuj; Sat, 24 Dec 2016 17:08:11 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E9D2816009E; Sat, 24 Dec 2016 17:08:10 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yR2CaHCT2EYX; Sat, 24 Dec 2016 17:08:10 -0800 (PST) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C02F916006D; Sat, 24 Dec 2016 17:08:10 -0800 (PST) To: "James K. Lowden" From: Paul Eggert Subject: Re: 25.1; configure.ac libpng search error Organization: UCLA Computer Science Department Message-ID: <92f77364-2356-8861-a500-fcec4bcc7fdc@cs.ucla.edu> Date: Sat, 24 Dec 2016 17:08:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------AD9D9A8D1BE9A5FA04EC6905" X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 25268-done Cc: 25268-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) This is a multi-part message in MIME format. --------------AD9D9A8D1BE9A5FA04EC6905 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > I believe the fix is to change line 3413 of configure.ac to read: > > png_libs=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { Thanks, I did something along those lines by installing the attached patch into master, and I'm boldly marking the bug report as done. > although IMO that's not quite sufficient, because it doesn't set RPATH. --ldflags is supposed to output any -R options needed, no? If it's not, it sounds like the libpng-config configuration is incorrect. --------------AD9D9A8D1BE9A5FA04EC6905 Content-Type: text/x-diff; name="0001-Use-libpng-config-ldflags-not-libs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Use-libpng-config-ldflags-not-libs.patch" >From 5bdbbe3e89adbb2a2092cc73586ffc38ddbb95d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Dec 2016 17:03:22 -0800 Subject: [PATCH] Use libpng-config --ldflags, not --libs Problem reported by James K. Lowden (Bug#25268). * configure.ac (LIBPNG): Pass --ldflags, not --libs, to libpng-config. --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5aaf006..cd6c689 100644 --- a/configure.ac +++ b/configure.ac @@ -3476,7 +3476,7 @@ AC_DEFUN elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then AC_MSG_CHECKING([for png]) png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && - png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` || { + png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { # libpng-config does not work; configure by hand. # Debian unstable as of July 2003 has multiple libpngs, and puts png.h # in /usr/include/libpng. @@ -3486,18 +3486,18 @@ AC_DEFUN else png_cflags= fi - png_libs='-lpng' + png_ldflags='-lpng' } SAVE_CFLAGS=$CFLAGS SAVE_LIBS=$LIBS CFLAGS="$CFLAGS $png_cflags" - LIBS="$png_libs -lz -lm $LIBS" + LIBS="$png_ldflags -lz -lm $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[return !png_get_channels (0, 0);]])], [HAVE_PNG=yes PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"` - LIBPNG=$png_libs + LIBPNG=$png_ldflags # $LIBPNG requires explicit -lz in some cases. # We don't know what those cases are, exactly, so play it safe and # append -lz to any nonempty $LIBPNG, unless we're already using LIBZ. -- 2.7.4 --------------AD9D9A8D1BE9A5FA04EC6905-- ------------=_1482628142-23827-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Dec 2016 22:17:44 +0000 Received: from localhost ([127.0.0.1]:54120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKudL-0001f2-UT for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:17:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKuWX-0001US-Om for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKuWQ-0001TA-Nh for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKuWQ-0001Sp-KS for submit@debbugs.gnu.org; Sat, 24 Dec 2016 17:10:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKuWM-0001p1-RZ for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKuWJ-0001Ox-2g for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:30 -0500 Received: from mail138c25.carrierzone.com ([64.29.147.208]:51853 helo=mail223c25.carrierzone.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKuWI-00016t-IQ for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 17:10:26 -0500 X-Authenticated-User: jklowden.speakeasy.net Received: from willow.schemamania.org (rrcs-50-74-108-158.nyc.biz.rr.com [50.74.108.158]) (authenticated bits=0) by mail223c25.carrierzone.com (8.14.9/8.13.1) with ESMTP id uBOLV9FA023277 for ; Sat, 24 Dec 2016 21:31:10 +0000 Received: by willow.schemamania.org (Postfix, from userid 1000) id 646725804B8; Sat, 24 Dec 2016 16:31:08 -0500 (EST) From: "James K. Lowden" To: bug-gnu-emacs@gnu.org Subject: 25.1; configure.ac libpng search error Date: Sat, 24 Dec 2016 16:31:08 -0500 Message-ID: <87fulddnfn.fsf@willow.schemamania.org> MIME-Version: 1.0 Content-Type: text/plain X-CSC: 0 X-CHA: v=2.2 cv=E4W9neVl c=1 sm=1 tr=0 a=eM9kDQsmTy6xYM2S+iw03A==:117 a=eM9kDQsmTy6xYM2S+iw03A==:17 a=n5n_aSjo0skA:10 a=uEPk6M0vAAAA:8 a=aR16PxjQAAAA:8 a=ntyBbpDX78-ZwX6Ard0A:9 a=-BmgLtiK8Zlig_YZ:21 a=22--GSJqezGHVya6:21 a=rPpvpuPpa5YP7RcegtwB:22 a=zbFvvTOBjyH4ze5LlUjX:22 X-CTCH-RefID: str=0001.0A010204.585EE91F.000C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 24 Dec 2016 17:17:42 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) configure.ac uses libpng-config, if installed, to determine the include directive for the PNG library. Unfortuately, it does not correctly use libpng-config for the linker flags. Consequently, it may mismatch the header file to the library. In my case, configure misdiagnosed my setup, and recommended --no-png. On my system, a libpng-config was installed by the Anaconda scientific Python package distribution. Because I had allowed Anaconda to place itself earlier in the path than /usr/bin, that is the version configure used. I suspect the error I describe below has not been detected before because my setup is unusual. First, let's see what libpng-config has to say on my system: $ for opt in cflags ldflags libs do cmd="libpng-config --$opt" printf "%-25s: %-s\n" "$cmd" "$($cmd)" done libpng-config --cflags : -I/usr/local/anaconda/include/libpng16 libpng-config --ldflags : -L/usr/local/anaconda/lib -lpng16 libpng-config --libs : -lpng16 Now, let's look at how libpng-config is used in configure.ac: $ grep -n libpng-config configure.ac 3412: png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` && 3413: png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` || { 3414: # libpng-config does not work; configure by hand. As you can see, png_libs relies on libpng-config --libs not libpng-config --ldflags The produced configure script therefore finds an include file under ananconda, but does not provide the associated -L option to the linker. The configure test fails because a symbol declared in the header file is not supplied by the (older) libpng found by the linker. I believe the fix is to change line 3413 of configure.ac to read: png_libs=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || { although IMO that's not quite sufficient, because it doesn't set RPATH. I worked around the problem before completely diagnosing it simply by renaming /usr/local/anaconda to /usr/local/.anaconda, taking it out of the PATH and causing configure not to find it. The outputs are: $ /usr/bin/libpng-config --cflags --libs -I/usr/include/libpng12 -lpng12 which worked just fine. In fact, I used report-emacs-bug in the newly built emacs to send this message. The rest of this message was produced by report-emacs-bug. I include it in case there are details you can use. Humbly submitted, --jkl In GNU Emacs 25.1.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-12-17 built on willow.schemamania.org Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.1 LTS Configured using: 'configure --with-x-toolkit=gtk3 --with-toolkit-scroll-bars --without-dbus --without-gconf --without-gsettings' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: GNUmakefile Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t recentf-mode: t global-ede-mode: t ede-minor-mode: t global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t semantic-idle-scheduler-mode: t semantic-mode: t yas-global-mode: t yas-minor-mode: t global-auto-complete-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: [yas] Loading for `makefile-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/makefile-mode) (quote makefile-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/makefile-mode Parsing Makefile (LL)... [yas] Loading for `text-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/text-mode) (quote text-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/text-mode [yas] Loading for `c-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/c-mode) (quote c-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/c-mode [yas] Loading for `cc-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/cc-mode) (quote cc-mode)))! [yas] Loading snippet files from /home/jklowden/.emacs.d/elpa/yasnippet-20160416.831/snippets/cc-mode Parsing prim-workalike/Makefile (LL)...done Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils semantic/tag-file semantic/bovine/c hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/analyze/refs auto-complete-c-headers tramp tramp-compat auth-source gnus-util mm-util help-fns mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs nroff-mode vc-git diff-mode easy-mmode semantic/db-file data-debug cedet-files semantic/bovine/make semantic/decorate/include semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse semantic/dep semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/bovine/make-by semantic/bovine make-mode pp server time-date recentf tree-widget ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-speedbar speedbar sb-image dframe eieio-custom wid-edit semantic/db-mode semantic/db eieio-base semantic/idle semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio eieio-core mode-local find-func cedet yasnippet advice flymake compile comint ansi-color ring auto-complete-config auto-complete popup finder-inf ac-c-headers-autoloads auto-complete-c-headers-autoloads auto-complete-autoloads avy-autoloads format-sql-autoloads popup-autoloads sql-indent-autoloads unbound-autoloads xcscope-autoloads xkcd-autoloads yasnippet-autoloads package epg-config seq byte-opt bytecomp byte-compile cl-extra help-mode easymenu cconv cobol-mode derived cl-macs skeleton cl-seq cl gv edmacro kmacro cl-loaddefs pcase cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 459597 15119) (symbols 48 34093 0) (miscs 40 840 561) (strings 32 79645 25011) (string-bytes 1 2027516) (vectors 16 60451) (vector-slots 8 1036169 7841) (floats 8 1072 263) (intervals 56 1709 70) (buffers 976 29) (heap 1024 69942 1543)) ------------=_1482628142-23827-1--