[MAC] incompatible imagelib vs libpng problem?
#1
I just built 19418 on MacOS 10.5.6 and am seeing no thumbnails or most other images. Aeon Stark comes up completely black (V091 and todays GitHub pull). So when I looked in the log I see lots of the following...

Code:
20:48:53 T:2685642528 M:1042964480   DEBUG: SECTION:LoadDLL(special://xbmc/system/ImageLib-x86-osx.so)
20:48:53 T:2685642528 M:1042964480   DEBUG: Loading: /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so
20:48:53 T:2685642528 M:1042964480   ERROR: Unable to load /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so, reason: dlopen(/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so, 1): Library not loaded: @executable_path/../Frameworks/libpng12.0.dylib
                               Referenced from: /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so
                               Reason: Incompatible library version: ImageLib-x86-osx.so requires version 36.0.0 or later, but libpng12.0.dylib provides version 35.0.0

Any hints? I looked in the readme, but no joy there. Thanks!
Reply
#2
jonm42 Wrote:I just built 19418 on MacOS 10.5.6 and am seeing no thumbnails or most other images. Aeon Stark comes up completely black (V091 and todays GitHub pull). So when I looked in the log I see lots of the following...

Code:
20:48:53 T:2685642528 M:1042964480   DEBUG: SECTION:LoadDLL(special://xbmc/system/ImageLib-x86-osx.so)
20:48:53 T:2685642528 M:1042964480   DEBUG: Loading: /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so
20:48:53 T:2685642528 M:1042964480   ERROR: Unable to load /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so, reason: dlopen(/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so, 1): Library not loaded: @executable_path/../Frameworks/libpng12.0.dylib
                               Referenced from: /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so
                               Reason: Incompatible library version: ImageLib-x86-osx.so requires version 36.0.0 or later, but libpng12.0.dylib provides version 35.0.0

Any hints? I looked in the readme, but no joy there. Thanks!



pastebin the following items;

macports.conf

the output of "port installed"

otool -L ImageLib-x86-osx.so
Reply
#3
macports.conf: http://pastebin.com/m74aabcf6

the output of "port installed": http://pastebin.com/m1c564eaa

otool -L ImageLib-x86-osx.so:

Code:
sixByNine:~ jonathan$ otool -L /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so
/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so:
    @executable_path/../Frameworks/libpng12.0.dylib (compatibility version 36.0.0, current version 36.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3)
sixByNine:~ jonathan$
Reply
#4
another one please.

otool -L /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Frameworks/libpng12.0.dylib


might nuke xbmc.app and rebuild. sometimes old frameworks get stuck inside.
Reply
#5
Code:
sixByNine:~ jonathan$ otool -L /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Frameworks/libpng12.0.dylib
/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Frameworks/libpng12.0.dylib:
    /opt/local/lib/libpng12.0.dylib (compatibility version 35.0.0, current version 35.0.0)
    @executable_path/../Frameworks/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3)
sixByNine:~ jonathan$
Reply
#6
interesting.

my has

libpng @1.2.35_0+universal (active)

and

Code:
Skunkworks:~ davilla$ otool -L /opt/local/lib/libpng12.0.dylib
/opt/local/lib/libpng12.0.dylib:
    /opt/local/lib/libpng12.0.dylib (compatibility version 36.0.0, current version 36.0.0)
    /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10)

which is the correct compatibility version 36.0.0.

I would nuke your macports install and reinstall (see readme.osx). Or you could try to uninstall libpng then reinstall but it's going to have dependencies that you will also have to uninstall.

EDIT: you are running Xcode 3.1.2, correct ?
Reply
#7
I hate reinstalling mac ports. Actually Xcode 3.1.3 pre-release, but that shouldn't make a difference.

Will try the libpng+deps route and get back to you.
Reply
#8
Full rebuild still says 35.0.0 for libpng. Why would the requirement change? It was working just fine.
Reply
#9
Quote:Actually Xcode 3.1.3 pre-release, but that shouldn't make a difference

haha, I have heard that before.

The compatibility version number is a complicated entity.

I would look around for other libpng12.0.dylib in /usr/... and /Developer/SDK/...


also do the "otool -L" on the ImageLib-x86-osx.so inside XBMC/system of the build not the app so we can see the original path to libpng12.0.dylib
Reply
#10
Slightly annoyed here. Full nuke and reinstall of macports. Fresh checkout from SVN. Full rebuild via command line and Xcode. Still same version of 35.0.0 in libpng, same errors as above in log.
Reply
#11
other libpng12.0.dylib in /usr/...

Code:
sixByNine:XBMC jonathan$ sudo find /usr -iname libpng12.0* -print
Password:
/usr/X11/lib/libpng12.0.0.0.dylib
/usr/X11/lib/libpng12.0.24.0.dylib
/usr/X11/lib/libpng12.0.26.0.dylib
/usr/X11/lib/libpng12.0.dylib

and /Developer/SDK/...

Code:
sixByNine:XBMC jonathan$ sudo find /Developer -iname libpng12.0* -print
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng12.0.26.0.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng12.0.dylib
sixByNine:XBMC jonathan$

also do the "otool -L" on the ImageLib-x86-osx.so inside XBMC/system of the build not the app so we can see the original path to libpng12.0.dylib

Code:
sixByNine:system jonathan$ otool -L ImageLib-x86-osx.so
ImageLib-x86-osx.so:
    /opt/local/lib/libpng12.0.dylib (compatibility version 36.0.0, current version 36.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3)
sixByNine:system jonathan$

There's the 36.0.0 version; note that I have been successfully building with 3.1.3 of Xcode for some time, so thats not a new variable in this equation.
Reply
#12
well this is quite odd.

otool -L ImageLib-x86-osx.so in the build dir shows

/opt/local/lib/libpng12.0.dylib with a compatibility version 36.0.0


yet you say

otool -L /opt/local/lib/libpng12.0.dylib shows a compatibility version 35.0.0

this I cannot explain. nothing has changed with the packaging scripts nor the build of ImageLib-x86-osx.so lately.

Macports, we have no control over, the recommended is 1.7.0.

You say you have been successfully building with 3.1.3 of Xcode for some time, so what has changed with respect to building ?

The compatibility version info comes from the libtool inside the libpng source.

/opt/local/var/macports/distfiles/libpng/libpng-1.2.35.tar.bz2

you can pull a copy, .configure, make (don't do make install), then check

otool -L .libs/libpng12.dylib

for which one it made.


also, when ImageLib-x86-osx.so is created, that's when the linker sets the refs to /opt/local/lib/libpng12.0.dylib. So re-building ImageLib-x86-osx.so, should reference what you have in /opt/local/lib/libpng12.0.dylib.
Reply
#13
http://trac.macports.org/ticket/19012

seems someone else had a problem with build referencing some other version of libpng.
Reply
#14
/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Resources/XBMC/system/ImageLib-x86-osx.so is ok

/Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app/Contents/Frameworks/libpng12.0.dylib is wrong

/opt/local/lib/libpng12.0.dylib is ok

So how is the one in Frameworks getting put together? (And what's the magic formula for just rebuilding ImageLib, if you please?)
Reply
#15
in the build project, Targets -> XBMC.app -> copy frameworks

right-click -> "get info" on "copy frameworks", that's the script.

This is a multi-pass script.

notice the use of "otool -L" to find the name from the actual dylib referenced.

This looks at the dylib refs for ImageLib-x86-osx.so and copies them into Frameworks. Then fixes the path.

to just re-build ImageLib-x86-osx.so

make -C xbmc/lib/cximage-6.0 clean
make -C xbmc/lib/cximage-6.0

but that's not going to help as the one in your build dirs is correct.

You did nuke /Users/jonathan/xbmc/XBMC/build/Debug/XBMC.app ?

Also, if some other .so or dylib refs the wrong libpng later in this script, the correct one could be over-written.
Reply

Logout Mark Read Team Forum Stats Members Help
[MAC] incompatible imagelib vs libpng problem?0