Mario Frasca wrote:
> among other things, I would like to use swing in jython on my macosx
> machine, just the same as I can use it on my GNU/Linux ppc:
[]
> angelico:~ mario$ jython
> Jython 2.2a1 on java1.5.0_06 (JIT: null)
>>>> import javax.swing as swing
>>>> swing.JFrame
> Traceback (innermost last):
>   File "<console>", line 1, in ?
> java.lang.UnsatisfiedLinkError: 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/libawt.jnilib:
>  
>         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[]

Try the following command

  fink remove libjpeg libpng3 libtiff libgif

(remove libungif instead of libgif if that package is installed) and see 
if it helps.

The problem lies with the environment variable DYLD_LIBRARY_PATH that is 
used in the jython wrapper script. It is set to /sw/lib, and this makes 
Apple's stupid dynamic linker load things like

  /sw/lib/libGIF.dylib

(which doesn't even exist, its name is /sw/lib/libgif.dylib) instead of

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib

which it is supposed to load. While the mere existence of the latter 
(and similarly libTIFF.dylib, libJPEG.dylib and libPng.dylib) is due to 
some special arrogant idiocy only an Apple engineer can understand, we 
have to live with its consequences.

One consequence is that setting DYLD_LIBRARY_PATH is even more 
crash-prone than it used to be.

The removal of all Fink-installed libraries that could confuse dyld is 
one possible solution. That's what I proposed above.

Another solution would be to run everything on a case-sensitive file 
system, which would un-confuse dyld also.

-- 
Martin



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to