Subject: bug#30431: 27.0.50; "Work even if libpng is install in /usr/local" causes build failure

From: Robert Cochran <[email-masked]>
Date: Sun, 11 Feb 2018 22:18:00 -0800

Build fails with an undefined symbol reference:

CCLD     temacs
/usr/bin/ld: image.o: undefined reference to symbol 'png_set_sig_bytes@@PNG16_0'
//usr/lib64/libpng16.so.16: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:606: temacs] Error 1
make[1]: Leaving directory '/home/Sora/Programming/emacs/src'
make: *** [Makefile:418: src] Error 2

OS is Fedora 27 amd64, libpng is libpng.1.6.31-1.fc27.x86_64

Please let me know if more details are required.

Thanks!

In GNU Emacs 27.0.50 (build 1, x86_64-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-02-08 built on SoraLaptop
Repository revision: a710f8aa61ca73054109dc4f926d1ac6aabdd849
Windowing system distributor 'Fedora Project', version 11.0.11906000
System Description: Fedora 27 (Workstation Edition)

Recent messages:
Loading battery...done
Loading time...done
Loading gnus...done
Loading paren...done
Loading /home/Sora/.emacs.d/customize.el (source)...done
(New file)
Loading /home/Sora/quicklisp/slime-helper.el (source)...done
Starting Emacs daemon.
Restarting server
When done with this frame, type C-x 5 0

Configured using:
 'configure --prefix=/home/Sora/local --with-dbus --with-gif --with-jpeg
 --with-png --with-tiff --with-xft --with-xpm --with-x-toolkit=athena
 --with-gpm=no --with-modules --with-gnutls --with-gconf
 --with-imagemagick --with-rsvg --with-libotf --with-m17n_flt
 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu
 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=format-security
 -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
 --param=ssp-buffer-size=4 -grecord-gcc-switches
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-auto-complete-mode: t
  auto-complete-mode: t
  paredit-mode: t
  whitespace-mode: t
  show-paren-mode: t
  display-time-mode: t
  display-battery-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime dig mailcap emacsbug sendmail slime-fancy slime-trace-dialog
slime-fontifying-fu slime-package-fu slime-references
slime-compiler-notes-tree slime-scratch slime-presentations bridge
slime-macrostep macrostep slime-mdot-fu slime-enclosing-context
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl elp slime-parse slime
cl-extra flymake-proc flymake warnings elec-pair lisp-mnt gud apropos
compile etags xref project arc-mode archive-mode hyperspec thingatpt
browse-url cl slime-autoloads org-rmail org-mhe org-irc org-info
org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win org-docview doc-view jka-compr image-mode dired dired-loaddefs
org-bibtex bibtex org-bbdb org-w3m org-element avl-tree generator org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs format-spec cal-menu
calendar cal-loaddefs firestorm-notes ace-window avy
auto-complete-config auto-complete popup paredit-menu paredit
interactify-count-lines lisp-family maybe-bussard-lua lua-mode advice
edmacro kmacro rx comint ansi-color ring maybe-gnu-c cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
ispell-email ispell rotate-split neato-graph-bar ert help-mode pp
find-func ewoc debug tls gnutls whitespace finder-inf tex-site info
package easymenu epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
deeper-blue-theme paren gnus seq byte-opt gv bytecomp byte-compile cconv
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
time-date mail-utils mm-util mail-prsvr wid-edit cl-loaddefs cl-lib time
battery cus-start cus-load server mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors 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 composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray 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 dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 440328 43165)
 (symbols 48 48296 4)
 (miscs 40 132 141)
 (strings 32 128361 4226)
 (string-bytes 1 3894108)
 (vectors 16 46648)
 (vector-slots 8 898336 24044)
 (floats 8 317 228)
 (intervals 56 403 0)
 (buffers 992 14))

-- 
~Robert Cochran

GPG Fingerprint - BD0C 5F8B 381C 64F0 F3CE  E7B9 EC9A 872C 41B2 77C2