Dynamic libraries not of required architecture when installing via cabal (Snow Leopard)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic libraries not of required architecture when installing via cabal (Snow Leopard)

Malthe Jørgensen
I'm on Snow Leopard, so I've read numerous posts on the subject of GHC  
and it's Snow Leopard (non-)compatibility. I've got most things  
working - I can do a 'cabal update' - something that gave errors  
before. GHC itself seems to be working fine.
I want to install the SDL package from Hackage, which I first tried  
doing like this:
'cabal install sdl'
which gives a bunch of warnings, all looking like this
'ld: warning: in /opt/local/lib/libSDL.dylib, file is not of required
architecture'
with 'libSDL.dylib' replaced with various *.a and *.dylib files
I then found this in a Usenet post about Snow Leopard breaking GHC:
-- Once cabal works, options --ld-option=-m32 (and also --gcc-option=-  
m32) may be used. These options may also be passed to "./Setup  
configure"
And tried this: (I think maybe my problem is that I'm not passing  
these flags correctly to cabal)
'cabal install sdl --ld-options="-arch i386" --gcc-option=-m32 --
reinstall'
Well I get the same errors, well warnings actually.
Can I just ignore these warnings?
When compiling my small sample code:
import Prelude
import Graphics.UI.SDL as SDL
main = do
   SDL.init [InitEverything]
   setVideoMode 640 480 32 []
I again get the warnings:
ld: warning: in /opt/local/lib/libSDL.dylib, file is not of required
architecture
ld: warning: in /opt/local/lib/libSDLmain.a, file is not of required
architecture
and then a bunch of undefined symbols such as:
_SDL_Init
_SDL_SetClipRect
Well this post basically based on the assumption that the warnings are  
breaking the SDL library and thereby keeping my code from compiling -  
so how do I fix those warnings?
- Sorry for the long mail
Malthe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091115/94a3e4b3/attachment.html
Reply | Threaded
Open this post in threaded view
|

Dynamic libraries not of required architecture when installing via cabal (Snow Leopard)

Brandon S Allbery KF8NH
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/beginners/attachments/20091115/85f752b7/PGP.bin