hns - 日記自動生成システム - Version 2.19.9

先月 2011年08月 来月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2011年08月09日(火) 旧暦 [n年日記] [更新:"2011/08/10 20:02:17"]

#1 [pkgsrc] wip/emacs-current and libpng.so (libpng15.so)

The problem I have reported on 2011-07-19
ld: warning: type and size of dynamic symbol `_fini' are not defined
is the problem on libpng.so name, like PR/44527 . If you issue the line found in build log separately, like:
modena@makoto 06:01:16/110810(..wip/emacs-current)% (cd
work/emacs/src; cc -std=gnu99 -nostartfiles -Demacs
-DHAVE_CONFIG_H
-I. -I/export/pkgsrc/wip/emacs-current/work/emacs/src -I../lib
-I/export/pkgsrc/wip/emacs-current/work/emacs/src/../lib
-D_REENTRANT -I/usr/pkg/include -I/usr/pkg/include/freetype2
-pthread -D_REENTRANT -I/usr/pkg/include/librsvg-2.0
-I/usr/pkg/include/glib/glib-2.0
-I/usr/pkg/lib/glib-2.0/include
-I/usr/pkg/include/gdk-pixbuf-2.0 -I/usr/pkg/include/cairo
-I/usr/pkg/include/libpng15 -I/usr/pkg/include/pixman-1
-I/usr/pkg/include -I/usr/pkg/include/freetype2
-I/usr/pkg/include/libxml2 -I/usr/pkg/include/dbus-1.0
-I/usr/pkg/lib/dbus-1.0/include -pthread
-I/usr/pkg/include/glib/glib-2.0
-I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2
-I/usr/pkg/include -I/usr/pkg/include
-I/usr/pkg/include/freetype2 -I/usr/pkg/include
-I/usr/pkg/include -MMD -MF deps/.d
-Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement -O2 -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2
-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib
-Wl,-rpath,/usr/local/lib -L/usr/local/lib -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-znocombreloc
\

  -o temacs pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o
   dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o
   charset.o coding.o category.o ccl.o character.o chartab.o
   bidi.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o
   xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o
   xsettings.o xgselect.o dbusbind.o emacs.o keyboard.o
   macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o
   marker.o minibuf.o fileio.o dired.o cmds.o casetab.o
   casefiddle.o indent.o search.o regex.o undo.o alloc.o
   data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o
   font.o print.o lread.o syntax.o unexelf.o bytecode.o
   process.o gnutls.o callproc.o region-cache.o sound.o
   atimer.o doprnt.o intervals.o textprop.o composite.o xml.o
   xfont.o ftfont.o xftfont.o ftxfont.o tparam.o lastfile.o
   gmalloc.o ralloc.o vm-limit.o widget.o ../lib/libgnu.a
   ../lwlib/liblw.a -lXaw3d -lXmu -lXt -lSM -lICE -lXext
   -ltiff -ljpeg -lpng -lz -lm -lgif -lXpm -lX11 -lXrender
   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lXft -lXrender
   -lfontconfig -lfreetype -lX11 -lossaudio -Wl,-R/usr/pkg/lib
   -pthread -L/usr/pkg/lib -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0
   -lm -lcairo -lgobject-2.0 -lgmodule-2.0 -lpng15
   -lgthread-2.0 -lglib-2.0 -lintl -Wl,-R/usr/pkg/lib
   -L/usr/pkg/lib -ldbus-1 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
   -lxml2 -ltermcap -Wl,-R/usr/pkg/lib -pthread -L/usr/pkg/lib
   -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0
   -lglib-2.0 -lintl -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
   -lfreetype -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lfontconfig
   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lz -lotf -lfreetype
   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lm17n-flt -lm17n-core
   -lm -lgcc -lc -lgcc /usr/lib/crtend.o)

ld: cannot find -lpng
modena@makoto 06:01:30/110810(..wip/emacs-current)% 
You will find the problem is -lpng instead of -lpng15.
the hint for this problem

To fix this problem:

  1. Fix emacs side
  2. Fix libpng side PR/44527
  3. Probably pkg-config issue PR/44527
modena@makoto 06:01:30/110810(..wip/emacs-current)% libpng-config --cflags 
-I/usr/pkg/include/libpng15
modena@makoto 06:10:38/110810(..wip/emacs-current)% libpng-config --ldflags
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lpng15
Use png 1.5.4 instead of 1.5.1: (No, probably not related)

modena@makoto 10:44:17/110810(..wip/emacs-current)% cat -n work/emacs/configure.in | sed -n 2450,2469p

  2450    if test "${with_png}" != "no"; then
  2451      # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
  2452      # in /usr/include/libpng.
  2453      AC_CHECK_HEADERS(png.h libpng/png.h)
  2454      if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
  2455        AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
  2456      fi
  2457    fi
  2458  
  2459    if test "${HAVE_PNG}" = "yes"; then
  2460      AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
  2461      LIBPNG="-lpng -lz -lm"
  2462    fi
  2463  fi
  2464  AC_SUBST(LIBPNG)
  2465  
  2466  ### Use -ltiff if available, unless `--with-tiff=no'.
  2467  HAVE_TIFF=no
  2468  LIBTIFF=
  2469  if test "${HAVE_X11}" = "yes"; then
work-around to by-pass above problem:
$NetBSD$

pkg-config will take care with version id like:
-lpng15 
And simply -lpng is now harmful

--- configure.in.orig	2011-08-10 10:32:39.000000000 +0900
+++ configure.in	2011-08-10 10:46:11.000000000 +0900
@@ -2458,7 +2458,7 @@
 
   if test "${HAVE_PNG}" = "yes"; then
     AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
-    LIBPNG="-lpng -lz -lm"
+    LIBPNG="-lz -lm"
   fi
 fi
 AC_SUBST(LIBPNG)

Then now getting:
sh: Cannot execute ELF binary /export/pkgsrc/wip/emacs-current/work/emacs/src/temacs

Comments related this article

Re: wip/emacs-current and libpng.so (libpng15.so) by obache    2011/08/10 18:14
You should not do `cd ${WRKDIR}' and invoke tools. Use `make build-env' instead,...


最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)