LinuxQuestions.org
Visit Jeremy's Blog.
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 05-07-2010, 10:15 AM   #1
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 111

Rep: Reputation: 33
imlib e libpng error in -current


While I was compiling kuickshow I noticed this error:

Code:
src/CMakeFiles/kuickshow.dir/kuickshow_dummy.o
Linking CXX executable kuickshow
/usr/lib/gcc/i486-slackware-linux/4.4.3/../../../libImlib.so: undefined
reference to `png_check_sig'
collect2: ld returned 1 exit status
make[2]: *** [src/kuickshow] Error 1
make[1]: *** [src/CMakeFiles/kuickshow.dir/all] Error 2
make: *** [all] Error 2

seems a problem between imlib and libpng, in the net I found this patch
using archlinux and other distributions

Code:
diff -Naur imlib-1.9.15-orig/Imlib/load.c imlib-1.9.15/Imlib/load.c
--- imlib-1.9.15-orig/Imlib/load.c      2010-01-18 20:58:27.000000000
-0500
+++ imlib-1.9.15/Imlib/load.c   2010-01-18 21:02:04.000000000 -0500
@@ -1619,7 +1619,7 @@
     return 0;
   fread(buf, 1, 8, f);
   rewind(f);
-  return (int)png_check_sig(buf, 8);
+  return (int)png_sig_cmp(buf, 0, 8)==0;
 #else                                                                                                                        
   return 0;
 #endif
After, all ok

I send mail to Pat, but I wanted to know if others have had this problem

thanks

i'm sorry for my bad english

conraid
 
Old 05-07-2010, 10:59 AM   #2
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
Many programs still use the deprecated libpng functions - this is a feature of libpng14. For compatibility reasons, libpng14 preserves libpng12 to compile such programs. To do so, you just specify the --with-png=/usr/lib{64}/libpng12.so or on the LDFLAGS you point it to -lpng12

You can keep track with the libpng changelog for how to correct those changes in programs.

Last edited by rfernandez; 05-07-2010 at 11:01 AM.
 
Old 05-07-2010, 11:23 AM   #3
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 111

Original Poster
Rep: Reputation: 33
Same programs use imlib, not direct libpng

in kuickshow for example:

Quote:
Found IMLIB Libraries: /usr/lib/libImlib.so
and I try

Code:
 CMAKE_LD_FLAGS                   -lpng12
and/or
Code:
QT_PNG_LIBRARY:FILEPATH=/usr/lib/libpng12.so

error is
Code:
/usr/lib/gcc/i486-slackware-linux/4.4.3/../../../libImlib.so: undefined
reference to `png_check_sig'

I think it is imlib to use the old method of libpng, as shown by the patch

Last edited by conraid; 05-07-2010 at 11:40 AM.
 
Old 05-07-2010, 11:47 AM   #4
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
You're absoloutely right, libImlib is compiled against libpng12, while the system takes deference to libpng14. libImlib should be recompiled against libpng14. But, a workaround would still be forcing to use libpng12. Here's some libpng ChangeLog info:

Code:
6. Building and linking with the libraries

    The configure script and most of the makefiles will build

    libpng10   (libpng-1.0.52, provided for legacy 1.0.x applications)
    libpng12   (libpng-1.2.42, stable version, for recent legacy 1.2.x apps)
    libpng14   (libpng-1.4.0, the current version)
    libpng     (whichever of the above was built last!)

    You should build them in order
       1) libpng10 (if you must; you probably don't need libpng10)
       2) libpng12 (overwrites the libpng created in step 1)
       3) libpng14 (overwrites the libpng created in step 2)

    Optionally, if you aren't ready to switch, you can build them
    in order
       1) libpng14
       2) libpng12 (this will overwrite the libpng created in step 1)

    If you simply want to link with the last version built, use
    -lpng -lz when building your application.  If you need a specific
    version, use, e.g., -lpng12 -lz.  Most applications can probably
    simply use -lpng -lz.

Send comments to png-mng-implement at lists.sf.net (subscription required;
visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
But you really got a point.
 
Old 05-07-2010, 11:56 AM   #5
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 111

Original Poster
Rep: Reputation: 33
Now, I try with -lpng12 -lz

thanks

p.s.
gd was the same problem, but gd has been patched
ftp://ftp.slackware.com/pub/slackwar...t/source/l/gd/

EDIT
with -lpng12 -lz it's ok

Last edited by conraid; 05-07-2010 at 12:08 PM.
 
Old 06-07-2010, 11:10 PM   #6
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: NetBSD, FreeBSD, OpenBSD, OpenSolaris, Slackware, FreeSlack, DOS, Android, Replicant
Posts: 387

Rep: Reputation: 45
I am trying to make a kuickshow SlackBuild and had the problem. How would I use the diff or compiling switch above? It is not clear to me (and I forgot how to use patch.) I wish kuickshow was just still in KDE4 or still came in Slackware.
 
Old 06-08-2010, 02:22 AM   #7
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 111

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by dchmelik View Post
I am trying to make a kuickshow SlackBuild and had the problem. How would I use the diff or compiling switch above? It is not clear to me (and I forgot how to use patch.) I wish kuickshow was just still in KDE4 or still came in Slackware.
It's my build
http://www.slackers.it/repository/ku...how.SlackBuild

I lanch with
LDFLAGS="-lpng12 -lz" sh kuickshow.SlackBuild
 
Old 06-08-2010, 01:38 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,357

Rep: Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886
The imlib package does indeed need to be rebuilt - I've got one in my package repo until Pat gets a new one out in /patches.
 
1 members found this post helpful.
Old 06-08-2010, 03:42 PM   #9
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: NetBSD, FreeBSD, OpenBSD, OpenSolaris, Slackware, FreeSlack, DOS, Android, Replicant
Posts: 387

Rep: Reputation: 45
Quote:
Originally Posted by conraid View Post
It's my build
http://www.slackers.it/repository/ku...how.SlackBuild

I lanch with
LDFLAGS="-lpng12 -lz" sh kuickshow.SlackBuild
Thanks; it worked... does anyone know how to get kuickshow back in the context menus in the file managers (dolphin, etc.?) I 'associated' kuickshow with an image but then it did not show up in the menu.
 
Old 06-23-2010, 04:38 PM   #10
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.2 & -current
Posts: 692

Rep: Reputation: 40
Quote:
Originally Posted by rworkman View Post
The imlib package does indeed need to be rebuilt - I've got one in my package repo until Pat gets a new one out in /patches.
Thanks a lot Robby for the imlib package. Needed it for compiling IceWM (with a build script from SB.org). Any chance that it will be available soon as an official package?
 
Old 06-26-2010, 12:39 AM   #11
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,526

Rep: Reputation: 235Reputation: 235Reputation: 235
Its in -current tonight - I just upgraded.
 
  


Reply


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
[SOLVED] libpng clash in kopete and kmess - slackware current x86_64 trumpet_tom Slackware 7 03-28-2010 02:59 PM
libgmp and libpng in latest -current upgrades dive Slackware 37 03-05-2010 11:40 AM
An error regarding imlib 06jer Linux - Newbie 1 08-05-2007 08:48 PM
error while loading shared libraries: libpng.so.2: [I reinstalled libPNG!] Shioni Linux - Software 1 09-09-2006 07:21 PM
possible fix error imlib-config not found aus9 Linux - Newbie 2 08-14-2006 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:42 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration