Package: emacs;
Reported by: "James K. Lowden" <jklowden <at> schemamania.org>
Date: Sat, 24 Dec 2016 22:18:02 UTC
Severity: normal
Found in version 25.1
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: Paul Eggert <eggert <at> cs.ucla.edu> Cc: tracker <at> debbugs.gnu.org Subject: bug#25268: closed (25.1; configure.ac libpng search error) Date: Sun, 25 Dec 2016 01:09:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 24 Dec 2016 17:08:10 -0800 with message-id <92f77364-2356-8861-a500-fcec4bcc7fdc <at> cs.ucla.edu> and subject line Re: 25.1; configure.ac libpng search error has caused the debbugs.gnu.org bug report #25268, regarding 25.1; configure.ac libpng search error to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs <at> gnu.org.) -- 25268: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25268 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "James K. Lowden" <jklowden <at> schemamania.org> To: bug-gnu-emacs <at> gnu.org Subject: 25.1; configure.ac libpng search error Date: Sat, 24 Dec 2016 16:31:08 -0500configure.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))
[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu> To: "James K. Lowden" <jklowden <at> schemamania.org> Cc: 25268-done <at> debbugs.gnu.org Subject: Re: 25.1; configure.ac libpng search error Date: Sat, 24 Dec 2016 17:08:10 -0800[Message part 4 (text/plain, inline)]> 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.[0001-Use-libpng-config-ldflags-not-libs.patch (text/x-diff, attachment)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.