DevIL on Mac OS X Tiger

Started by numberR, May 05, 2005, 05:54:28

Previous topic - Next topic

numberR

hello.

did anyone try DevIL on Tiger?
i'm getting following error when my ggame is just about to load image:

Bus error

and my game crashes.
any idea?

thanks

[edit]
game works if i use ImageIO instead of DevIL.

Matzon

Not aware of any issues generally - but haven't checked with tiger since I don't have a copy. I think elias has one, and I'l bug him to test/confirm any issues.

Bus errors are basically NullPointerException, renamed to something silly (imo).

Does your application work fine in panther ?

numberR

unfortunately, i have not had a chance to try my game with DevIL on panther. i have tried it with ImageIO on panther and it worked fine. but my game works fine on Linux/Windows with DevIL, so i think there is a problem specific to Mac OS X.

i installed DevIL library from http://prdownloads.sourceforge.net/openil/DevIL_Binary_1.6.7.tgz. and i also have -Djava.library.path set to where all of jar and library from lwjgl locate. is this setup right?

Matzon

use the IL file provided in the lwjgl distribution - or at least make sure its locatable and called the same

numberR

thanks for the reply.

maybe i'm missing something. i uninstalled DevIL that i got from DevIL site.
i located IL provided by lwjgl in my -Djava.library.path. then i get this error when i run my game:

org.lwjgl.LWJGLException: Could not load devil library.
       at org.lwjgl.devil.IL.nCreate(Native Method)
       at org.lwjgl.devil.IL.create(IL.java:593)
       at Engine.initializeGraphic(Unknown Source)
       at Engine.initialize(Unknown Source)
       at GLTalk.run(Unknown Source)
       at GLTalk.main(Unknown Source)

do i need to rename IL to something like IL.dylib? thing i noticed is that ld command for IL shows following:

ld: warning can't open dynamic library: /Library/Frameworks/IL.framework/Frameworks/lcms.framework/Versions/A/lcms (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /Library/Frameworks/IL.framework/Frameworks/libtiff.framework/Versions/A/libtiff (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /Library/Frameworks/IL.framework/Frameworks/libpng.framework/Versions/A/libpng (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /Library/Frameworks/IL.framework/Frameworks/libjpeg.framework/Versions/A/libjpeg (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: warning can't open dynamic library: /Library/Frameworks/IL.framework/Frameworks/libmng.framework/Versions/A/libmng (checking for undefined symbols may be affected) (No such file or directory, errno = 2)

i checked /Library/Frameworks directory, but i don't have any of those installed. it would be helpful if there is documentation for how to install/use DevIL on Mac OS X... or maybe i'm the only one idiot :(

cbarrett1974

I am getting the exact same problem. I'm new to OS X, so don't know much about how it does dynamic libraries. It does seem strange to me that the DevIL library is just called "IL" - how does OS X search for this?

I've tried it in the path as well as java.library.path with the same error previously reported.  I upgraded to Tiger before my first DevIL experiment, so I cannot say if this is a Tiger problem or not (which sounds far too much like "Windows XP Service Pack 2" to me!!).

cbarrett1974

OK, I just got it working!  
I previously installed the DevIL binaries (DevIL-1.6.7.tgz), and have now just installed the framework package (DevIL_1.6.7-pkg.tgz), which asked for a reboot, after which everything is working fine.

numberR

thanks for the information. i'll try that.

but now i wonder. devil site says
"The framework version will not be supported, it was just causing problem, now is deployed as a dynamic library stored in /usr/local".

should we really be using Framework one? or is he talking about something else?

tomjnsn

I tried pulling down the source for lwjgl and rebuilding on OS X, to see if I could get it to link to the dynlib's for IL, but I can't even get it to compile, either through XCode or Project Builder or just using make on the command line.  

Whoever has successfully built lwjgl on OS X, and DevIL, would they mind posting steps they went through to get it working?

Matzon

Is this a 10.4 issue or ? - coz I load devil+lwjgl fine on 10.3 ?

tomjnsn

No, this is on 10.3, although I'm not sure what I'm doing wrong.  I pulled down the source, unzip the mac_xcode.xcode project and open it in XCode, but it throws a bunch of errors about not finding some specific files when I try and build it.  I did use javah to build the header files it was wanting, but it seems like it was complaining about some vars not being defined.  

Sorry I'm not at my mac right now so I can't tell you the errors.  Could just be that my environment isn't setup properly (I don't use XCode, so it is just the generic install of it).

My whole aim is to try and get lwjgl working with the dynlibs that DevIL is now putting out as their OS X binaries.  If someone else has got that I'd be happy with that.  I'm pretty sure I'm doing something wrong on my end, since I don't normally use XCode or Project Builder.

Matzon

dont use xcode at all
just build using the supplied make files
but you dont need to build to use devil under osx

numberR

Matzon,
yea it works fine if you install devil framework. but i want devil to be working without installing devil framework.
on linux/windows, i can use devil just by providing devil dynamic library and doesn't have to make people install devil. i can distribute devil dynamic library with my game. i just want that to be happing on mac os x as well, so people don't have to care about anything but game itself.

it seems like we might need to compile devil itself to make it look for libIL.dylib and other libraries at run time. How was "IL" file, which comes with lwjgl, compiled?

Matzon

It was gotten from the package provided by the site. I'll investigate the issue today.

Matzon

As far as I can determine, the issue is exactly the same as with Linux. IL is loaded fine, however the support files (libtiff, libjpeg etc.) cannot be found, unless the ILframework is installed.

I am unsure about how to fix this, but I am taking any and all help for a general solution. For now, I am not seeing it as a blocker for any releases.