Bug 219902 - SDL_image is missing dependencies on i386
SDL_image is missing dependencies on i386
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: SDL_image (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Pepple
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-15 22:58 EST by Jason Tibbitts
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2.5-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-19 16:11:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Tibbitts 2006-12-15 22:58:20 EST
I noticed that one of my packages, nazghul, which depends on SDL_image fails to
link on i386 because of missing symbols from libpng, while on x86_64 it links
fine.  I found that SDL_image-1.2.5-3.fc7.i386.rpm is missing many dependencies
that are there in SDL_image-1.2.5-3.fc7.x86_64.rpm:

> rpm -qp --requires
/nas/redhat/mirror-extras/development/i386/SDL_image-1.2.5-3.fc7.i386.rpm
/sbin/ldconfig
/sbin/ldconfig
libSDL-1.2.so.0
libSDL_image-1.2.so.0
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libpthread.so.0
libpthread.so.0(GLIBC_2.0)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)

> rpm -qp --requires
/nas/redhat/mirror-extras/development/x86_64/SDL_image-1.2.5-3.fc7.x86_64.rpm
/sbin/ldconfig
/sbin/ldconfig
libSDL-1.2.so.0()(64bit)
libSDL_image-1.2.so.0()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libjpeg.so.62()(64bit)
libpng12.so.0()(64bit)
libpng12.so.0(PNG12_0)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libtiff.so.3()(64bit)
libz.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)

I'm at somewhat of a loss as to what could have happened; the package seems
simple enough.
Comment 1 Michael Schwendt 2006-12-16 06:31:15 EST
There's some weird breakage also with FC-6 i386. Check this out! The
image library deps are missing, the audio library deps from SDL are
duplicated:

$ ldd /usr/lib/libSDL_image-1.2.so.0.1.4
        linux-gate.so.1 =>  (0x00d93000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x02631000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00909000)
        libc.so.6 => /lib/libc.so.6 (0x0079b000)
        libdl.so.2 => /lib/libdl.so.2 (0x00903000)
        libesd.so.0 => /usr/lib/libesd.so.0 (0x07817000)
        libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x0787d000)
        libm.so.6 => /lib/libm.so.6 (0x008da000)
        /lib/ld-linux.so.2 (0x0077e000)
        libasound.so.2 => /lib/libasound.so.2 (0x076dd000)
Comment 2 Michael Schwendt 2006-12-16 06:39:01 EST
It loads the libraries at run-time via SDL and their SONAMEs. Hence
no dependencies detected by rpmbuild:

-- dynamic libtiff -> libtiff.so.3
-- dynamic libjpeg -> libjpeg.so.62
-- dynamic libpng -> libpng.so.3

-DLOAD_TIF_DYNAMIC=\"libtiff.so.3\" -DLOAD_JPG_DYNAMIC=\"libjpeg.so.62\"
-DLOAD_PNG_DYNAMIC=\"libpng.so.3\"

Comment 3 Michael Schwendt 2006-12-16 06:41:06 EST
./configure --help
  --enable-jpg-shared     dynamically load JPG support [default=yes]
  --enable-png-shared     dynamically load PNG support [default=yes]
  --enable-tif-shared     dynamically load TIFF support [default=yes]
Comment 4 Toshio Kuratomi 2006-12-16 12:15:54 EST
(In reply to comment #2)
> It loads the libraries at run-time via SDL and their SONAMEs. Hence
> no dependencies detected by rpmbuild:
> 
> -- dynamic libpng -> libpng.so.3
> 
Interesting that this is detecting (and I assume using) libpng.so.3.  On x86_64:
$ ldd libSDL_image-1.2.so.0.1.4 |grep png
        libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00002aaaaacdf000)

This is starting to look like SDL_image on x86_64 is the one that's broken.

from nazghul's build logs:
/builddir/build/BUILD/nazghul-0.5.5/src/screen.c:872: undefined reference to
`png_create_write_struct'

It look like nazghul directly uses libpng.  It has been relying on SDL_image
pulling in libpng but should be doing its own configure check instead.
Comment 5 Jason Tibbitts 2006-12-16 12:28:05 EST
Yes, it seems that nazghul is indeed broken; it should link against libpng
itself.  What confused me is that the normally problematic x86_64 build is the
only one that worked.
Comment 6 Michael Schwendt 2006-12-16 14:10:33 EST
An official log is still available:
http://buildsys.fedoraproject.org/logs/fedora-6-extras/22438-SDL_image-1.2.5-3.fc6/x86_64/build.log

Somebody who's familiar with libpng is needed, since:

* /usr/bin/libpng-config links to /usr/bin/libpng12-config
* libpng-config --libs
-lpng12
* /usr/lib/pkgconfig/libpng.pc links to libpng12.pc
* /usr/lib/libpng.so links to libpng12.so

So, in all these cases libpng12.so.0 is used, _not_ libpng.so.3

On i386, however, libpng.so.3 is detected and used and loaded
at run-time only. On x86_64, the dynamic loading is not enabled
(examining config.log might give a clue).
Comment 7 Michael Schwendt 2006-12-16 16:57:15 EST
And the reason for the difference between i386 and x86_64 is that
/usr/lib is hardcoded in the configure script in code that searches
for the png/jpeg/tiff libs. It also searches for $path/libpng.so.[0-9]
which fails to find "libpng12.so.0". The configure options 

--disable-jpg-shared --disable-png-shared -disable-tif-shared

disable the run-time loading of the libs and bring back the
rpmbuild soname dependencies.
Comment 8 Brian Pepple 2006-12-18 12:12:44 EST
Michael, thanks for investigating this will I was gone this weekend.  Hopefully,
later today I can get some time to work on this.

Note You need to log in before you can comment on or make changes to this bug.