On Mon, 2002-02-04 at 05:55, Yves Duret wrote:
> Bryan Paxton <[EMAIL PROTECTED]> writes:
> 
> > eh, I have libpng2 installed (for compat reasons), just not
> > libpng2-devel (that's where you'll run into problems). 
> 
> if you look in archives of this ml, there is also pbs when both libpng2 and
> libpng3 are installed. More precisly it seems to come from app compiled
> against one of them (lets say libpng3) but loading dinamically library or
> plugin compiled against the other (libpng2 in our case). These two libpng
> can't coexist in memory together...

 In theory, yes... But I have never run into this problem...
Here's the perfect example...
I have Eterm compiled against libpng.so.3, and imlib is compiled against
libpng.so.2

Strace shows us this (edited for good reasons | comments in C style):

execve("/usr/X11R6/bin/Eterm", ["Eterm"], [/* 51 vars */]) = 0
open("/etc/ld.so.preload", O_RDONLY)    = 3 
open("/usr/X11R6/lib/libEterm-0.8.10.so", O_RDONLY) = 3
open("/usr/X11R6/lib/libmej-0.8.10.so", O_RDONLY) = 3 
open("/usr/lib/libImlib.so.1", O_RDONLY) = 3 
open("/usr/lib/libjpeg.so.62", O_RDONLY) = 3 
open("/usr/lib/libtiff.so.3", O_RDONLY) = 3
open("/usr/lib/libungif.so.4", O_RDONLY) = 3

open("/usr/lib/libpng.so.3", O_RDONLY)  = 3 
/* Eterm specifically wants the above lib */

open("/lib/libz.so.1", O_RDONLY)        = 3
open("/lib/libm.so.6", O_RDONLY)        = 3
open("/usr/X11R6/lib/libSM.so.6", O_RDONLY) = 3
open("/usr/X11R6/lib/libICE.so.6", O_RDONLY) = 3
open("/usr/X11R6/lib/libX11.so.6", O_RDONLY) = 3
open("/lib/libutil.so.1", O_RDONLY)     = 3
open("/usr/lib/libutempter.so.0", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/usr/lib/libpng.so.2", O_RDONLY)  = 3
/ * imlib specifically wants the above lib */
open("/lib/libdl.so.2", O_RDONLY)       = 3

/* Skip past the rest to see if we loaded OK */

ioctl(5, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [5])                 = 0
stat64("/dev/pts/5", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5),
...}) = 0
statfs("/dev/pts/5", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=1024,
f_blocks=0, f_bfree=0, f_files=0, f_ffree=0, $
ioctl(5, TIOCSPTLCK, [0])               = 0
ioctl(5, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [5])                 = 0
stat64("/dev/pts/5", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5),
...}) = 0
fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
lstat64("/dev/pts/5", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5),
...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGHUP, {0x4002ee14, [HUP], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x4002ee14, [INT], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x40030f88, [QUIT], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x4002ee14, [TERM], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {0x4002209c, [CHLD], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGSEGV, {0x40030f88, [SEGV], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGBUS, {0x40030f88, [BUS], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGABRT, {0x40030f88, [ABRT], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGFPE, {0x40030f88, [FPE], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGILL, {0x40030f88, [ILL], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGSYS, {0x40030f88, [SYS], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
fork()                                  = 14766
setresuid32(0x1f5, 0x1f5, 0x1f5)        = 0
setresgid32(0x1f5, 0x1f5, 0x1f5)        = 0
rt_sigaction(SIGCHLD, {SIG_IGN}, {0x4002209c, [CHLD],
SA_RESTART|0x4000000}, 8) = 0
fork()                                  = 14767
wait4(14767, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 14767
/ * And we're there */
</SNIP>


 So you see, no problems...
I'm sure, maybe, some how, with some wierd app, there might be a
problem, but I have yet to run into one.
Like I said, the real problem you'll really ever see is if you have
libpng3 and libpng2 AND libpng2-devel installed...
i.e., compile uses png.h from libpng2-devel, but compiles against
libpng.so.3 

 And as someone said, a workaround is to symlink libpng.so.3 to
libpng.so.2, but you'll probably run into a few problems with this
(foreign routines, symbols, etc...)

Cheers


-- 
Bryan Paxton
Public PGP key: http://www.deadhorse.net/bpaxton.gpg

"What laughter, why joy, when constantly aflame? Enveloped in darkness, 
don't you look for a lamp?"
Dhp. 163


Reply via email to