LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-22-2010, 03:54 PM   #1
conartist6
LQ Newbie
 
Registered: Nov 2009
Posts: 11

Rep: Reputation: 0
Compiling Imlib against libpng1.4


I'm trying to compile imlib against libpng 1.4. I am using the slack sources from slackware64 13.1, and a SlackBuild file modified with the extra configure parameter "--with-png=/usr/lib64/libpng.so.14"

The final crashing portion of my output is as follows:
Code:
 /bin/sh ../libtool --mode=install /usr/bin/ginstall -c  libimlib-jpeg.la /tmp/package-imlib/usr/lib64/libimlib-jpeg.la
libtool: install: warning: relinking `libimlib-jpeg.la'
(cd /tmp/imlib-1.9.15/gdk_imlib; /bin/sh ../libtool  --mode=relink gcc -O2 -fPIC -fPIC -o libimlib-jpeg.la -rpath /usr/lib64 -avoid-version -module io-jpeg.lo -ljpeg libgdk_imlib.la -inst-prefix-dir /tmp/package-imlib)
gcc -shared  .libs/io-jpeg.o  -Wl,--rpath -Wl,/usr/lib64 -L/tmp/package-imlib/usr/lib64 -L/usr/lib64 -ljpeg -lgdk_imlib  -Wl,-soname -Wl,libimlib-jpeg.so -o .libs/libimlib-jpeg.so
/usr/bin/ginstall -c .libs/libimlib-jpeg.soT /tmp/package-imlib/usr/lib64/libimlib-jpeg.so
/usr/bin/ginstall -c .libs/libimlib-jpeg.lai /tmp/package-imlib/usr/lib64/libimlib-jpeg.la
/usr/bin/ginstall -c .libs/libimlib-jpeg.a /tmp/package-imlib/usr/lib64/libimlib-jpeg.a
ranlib /tmp/package-imlib/usr/lib64/libimlib-jpeg.a
chmod 644 /tmp/package-imlib/usr/lib64/libimlib-jpeg.a
libtool: install: warning: remember to run `libtool --finish /usr/lib64'
 /bin/sh ../libtool --mode=install /usr/bin/ginstall -c  libimlib-tiff.la /tmp/package-imlib/usr/lib64/libimlib-tiff.la
libtool: install: warning: relinking `libimlib-tiff.la'
(cd /tmp/imlib-1.9.15/gdk_imlib; /bin/sh ../libtool  --mode=relink gcc -O2 -fPIC -fPIC -o libimlib-tiff.la -rpath /usr/lib64 -avoid-version -module io-tiff.lo -ltiff libgdk_imlib.la -inst-prefix-dir /tmp/package-imlib)
gcc -shared  .libs/io-tiff.o  -Wl,--rpath -Wl,/usr/lib64 -L/tmp/package-imlib/usr/lib64 -L/usr/lib64 -ltiff -lgdk_imlib  -Wl,-soname -Wl,libimlib-tiff.so -o .libs/libimlib-tiff.so
/usr/bin/ginstall -c .libs/libimlib-tiff.soT /tmp/package-imlib/usr/lib64/libimlib-tiff.so
/usr/bin/ginstall -c .libs/libimlib-tiff.lai /tmp/package-imlib/usr/lib64/libimlib-tiff.la
/usr/bin/ginstall -c .libs/libimlib-tiff.a /tmp/package-imlib/usr/lib64/libimlib-tiff.a
ranlib /tmp/package-imlib/usr/lib64/libimlib-tiff.a
chmod 644 /tmp/package-imlib/usr/lib64/libimlib-tiff.a
libtool: install: warning: remember to run `libtool --finish /usr/lib64'
 /bin/sh ../libtool --mode=install /usr/bin/ginstall -c  libimlib-png.la /tmp/package-imlib/usr/lib64/libimlib-png.la
libtool: install: warning: relinking `libimlib-png.la'
(cd /tmp/imlib-1.9.15/gdk_imlib; /bin/sh ../libtool  --mode=relink gcc -O2 -fPIC -fPIC -o libimlib-png.la -rpath /usr/lib64 -avoid-version -module io-png.lo -lpng -lz libgdk_imlib.la -inst-prefix-dir /tmp/package-imlib)
gcc -shared  .libs/io-png.o  -Wl,--rpath -Wl,/usr/lib64 -L/tmp/package-imlib/usr/lib64 -L/usr/lib64 -lpng -lz -lgdk_imlib  -Wl,-soname -Wl,libimlib-png.so -o .libs/libimlib-png.so
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld: /usr/lib64/libpng.a(libpng14_la-png.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libpng.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
libtool: install: error: relink `libimlib-png.la' with the above command before installing it
make[2]: *** [install-moduleLTLIBRARIES] Error 1
make[2]: Leaving directory `/tmp/imlib-1.9.15/gdk_imlib'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/tmp/imlib-1.9.15/gdk_imlib'
make: *** [install-recursive] Error 1
I've inserted extra CFLAGS a CXXFLAGS flags by hand for "-fPIC", but that doesn't seem to help. Any ideas?
 
Old 10-23-2010, 11:51 AM   #2
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 40
I'm not sure, but I think that the best option in order to do that, would be LDFLAGS=-lpng.

EDIT: Here, that did the trick. You can also do this with "--with-png=-lpng".

Code:
$ readelf -a libImlib.so.1.9.15 | grep -i needed
 0x00000001 (NEEDED)                     Shared library: [libjpeg.so.8]
 0x00000001 (NEEDED)                     Shared library: [libtiff.so.3]
 0x00000001 (NEEDED)                     Shared library: [libgif.so.4]
 0x00000001 (NEEDED)                     Shared library: [libpng14.so.14]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libSM.so.6]
 0x00000001 (NEEDED)                     Shared library: [libICE.so.6]
 0x00000001 (NEEDED)                     Shared library: [libXext.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

Last edited by rfernandez; 10-23-2010 at 12:03 PM.
 
Old 10-23-2010, 01:49 PM   #3
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 495

Rep: Reputation: 81
About 3~4 month ago I became so pissed with libpng that made a backup and issued something like "sed -i "s|png12|png14|g" ./*.la" and "sed -i "s|libpng12.la|libpng14.la|g" ./*.la" inside /usr/lib64. Rebuilt it without png12 and for the first time digiKam saved png without misbehaving =]
 
  


Reply

Tags
compilation, configure, imlib2, slackware64


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubles when compiling with IMLIB 1.9.14 sanmartin Linux - Software 14 04-22-2005 09:58 AM
Where can I find imlib 1.8 metalaid Linux - Software 1 01-19-2004 11:04 PM
cannot compile imlib Captain6Crunch Linux - Newbie 1 01-02-2004 06:12 PM
Looking for Richard...er I mean imlib psyklops Linux - General 1 08-31-2003 12:06 AM
imlib Neur0tek Linux - Newbie 2 04-25-2002 10:11 PM


All times are GMT -5. The time now is 07:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration