Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Roman Cheplyaka
* Eduardo Sato eduardo.s...@gmail.com [2013-08-07 14:46:02-0300]
 Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard?
 
 I followed these instructions: 
 http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error: 
 
 src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
 Unacceptable argument type in foreign declaration: CInt
 When checking declaration:
   foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
 :: Ptr (TWindow a)
- CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
 
 src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
 Unacceptable argument type in foreign declaration: CInt
 When checking declaration:
   foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
 :: Ptr (TWindow a)
- CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
 Failed to install wxcore-0.90.0.3
 cabal: Error: some packages failed to install:
 wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install.
 wxcore-0.90.0.3 failed during the building phase. The exception was:
 ExitFailure 1
 
 http://lpaste.net/91634
 
 I'm using ghc 7.6.3. I've heard the above problems are related to GHC
 7.6.3 being more pedantic about FFI declarations. Is there any way
 around it?

Indeed, and it has nothing to do with Snow Leopard. You should ensure
that the CInt data constructor is imported. Either patch it yourself, or
have the package maintainer to fix it.

Roman

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Eduardo Sato
Roman, thanks. 

I've managed to install wxHaskell. Someone has already patched it like just you 
said: https://github.com/wxHaskell/wxHaskell

The sample programs compile and work fine now.

The only problem now is that I want to distribute a wxHaskell application on 
mac OS X. I tried using macosx-app and cabal-macosx 
(https://github.com/michaelt/cabal-macosx) to make an app file. It runs fine 
on my machine, but it fails to run on another computer. I get the following 
error:

Dyld Error Message: Library not loaded: 
/Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. 

What would be the best way to redistribute wxHaskell apps?
-- 
Eduardo Sato


On Thursday, August 8, 2013 at 10:20 AM, Roman Cheplyaka wrote:

 * Eduardo Sato eduardo.s...@gmail.com (mailto:eduardo.s...@gmail.com) 
 [2013-08-07 14:46:02-0300]
  Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard?
  
  I followed these instructions: 
  http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error: 
  
  src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
  Unacceptable argument type in foreign declaration: CInt
  When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
  :: Ptr (TWindow a)
  - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
  
  src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
  Unacceptable argument type in foreign declaration: CInt
  When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
  :: Ptr (TWindow a)
  - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
  Failed to install wxcore-0.90.0.3
  cabal: Error: some packages failed to install:
  wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install.
  wxcore-0.90.0.3 failed during the building phase. The exception was:
  ExitFailure 1
  
  http://lpaste.net/91634
  
  I'm using ghc 7.6.3. I've heard the above problems are related to GHC
  7.6.3 being more pedantic about FFI declarations. Is there any way
  around it?
  
 
 
 Indeed, and it has nothing to do with Snow Leopard. You should ensure
 that the CInt data constructor is imported. Either patch it yourself, or
 have the package maintainer to fix it.
 
 Roman 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Henk-Jan van Tuyl
On Wed, 07 Aug 2013 19:46:02 +0200, Eduardo Sato eduardo.s...@gmail.com  
wrote:



Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard?

I followed these instructions:  
http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error:




Try installing the latest version, using the instructions at:
  http://www.haskell.org/haskellwiki/WxHaskell/Building#Source_Release

Regards,
Henk-Jan van Tuyl


--
Folding@home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.

http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Henk-Jan van Tuyl
On Thu, 08 Aug 2013 15:54:13 +0200, Eduardo Sato eduardo.s...@gmail.com  
wrote:



Roman, thanks.

I've managed to install wxHaskell. Someone has already patched it like  
just you said: https://github.com/wxHaskell/wxHaskell


The sample programs compile and work fine now.

The only problem now is that I want to distribute a wxHaskell  
application on mac OS X. I tried using macosx-app and cabal-macosx  
(https://github.com/michaelt/cabal-macosx) to make an app file. It  
runs fine on my machine, but it fails to run on another computer. I get  
the following error:


Dyld Error Message: Library not loaded:  
/Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib.


What would be the best way to redistribute wxHaskell apps?


wxHaskell uses a lot of dynamic libraries (at least in a Windows  
environment) that must be distributed with applications; I am not familiar  
with Mac OS X, but for an idea, see:

  http://www.haskell.org/haskellwiki/WxHaskell/Windows#DLLs

Regards,
Henk-Jan van Tuyl


--
Folding@home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.

http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Brandon Allbery
On Thu, Aug 8, 2013 at 9:54 AM, Eduardo Sato eduardo.s...@gmail.com wrote:

 The only problem now is that I want to distribute a wxHaskell application
 on mac OS X. I tried using macosx-app and cabal-macosx (
 https://github.com/michaelt/cabal-macosx) to make an app file. It runs
 fine on my machine, but it fails to run on another computer. I get the
 following error:

 Dyld Error Message: Library not loaded:
 /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib.

 What would be the best way to redistribute wxHaskell apps?


This sounds like cabal-macosx was not updated to handle dynamic GHC
libraries. (GHC used to default to static; OS X was one of the first
platforms to switch to default dynamic.) I know in theory how to deal with
this (copy the necessary libraries into the app bundle and use
install_name_tool to adjust the references to be bundle-relative) but could
not give you exact details.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Eduardo Sato
Would it be necessary to change Info.plist?

It would be nice being able to distribute haskell apps in general, not only 
wxHaskell apps. One can certainly write the UI in C++/Objective C, or what have 
you, and use FFI to call haskell libraries. But I am also interested in writing 
an app 100% in haskell. Has anyone done that?

Brandon: sorry for replying directly to you. 

-- 
Eduardo Sato


On Thursday, August 8, 2013 at 12:26 PM, Brandon Allbery wrote:

 On Thu, Aug 8, 2013 at 9:54 AM, Eduardo Sato eduardo.s...@gmail.com 
 (mailto:eduardo.s...@gmail.com) wrote:
  The only problem now is that I want to distribute a wxHaskell application 
  on mac OS X. I tried using macosx-app and cabal-macosx 
  (https://github.com/michaelt/cabal-macosx) to make an app file. It runs 
  fine on my machine, but it fails to run on another computer. I get the 
  following error:
  
  Dyld Error Message: Library not loaded: 
  /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. 
  
  What would be the best way to redistribute wxHaskell apps?
 
 This sounds like cabal-macosx was not updated to handle dynamic GHC 
 libraries. (GHC used to default to static; OS X was one of the first 
 platforms to switch to default dynamic.) I know in theory how to deal with 
 this (copy the necessary libraries into the app bundle and use 
 install_name_tool to adjust the references to be bundle-relative) but could 
 not give you exact details. 
 
 -- 
 brandon s allbery kf8nh   sine nomine associates
 allber...@gmail.com (mailto:allber...@gmail.com)  
 ballb...@sinenomine.net (mailto:ballb...@sinenomine.net)
 unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
 
 
 
 
 


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Brandon Allbery
On Thu, Aug 8, 2013 at 12:04 PM, Eduardo Sato eduardo.s...@gmail.comwrote:

 Would it be necessary to change Info.plist?


I don't believe so; Info.plist is the externally visible interface details,
but these libraries should be hidden inside the app bundle and not visible
outside of it. When the runtime dynamic library loader is invoked in the
context of a bundle, it uses a special token to find bundle-relative
internal libraries (see @executable_path and friends in `man 1 dyld`). This
is independent of Info.plist, except insofar as existence (not contents) of
that plist is part of Apple's definition of bundle.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-07 Thread Eduardo Sato
Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard?

I followed these instructions: http://www.haskell.org/haskellwiki/WxHaskell/Mac 
, but got an error: 

src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
Unacceptable argument type in foreign declaration: CInt
When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
:: Ptr (TWindow a)
   - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))

src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
Unacceptable argument type in foreign declaration: CInt
When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
:: Ptr (TWindow a)
   - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
Failed to install wxcore-0.90.0.3
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install.
wxcore-0.90.0.3 failed during the building phase. The exception was:
ExitFailure 1

http://lpaste.net/91634

I'm using ghc 7.6.3. I've heard the above problems are related to GHC 7.6.3 
being more pedantic about FFI declarations. Is there any way around it?

Thanks 

-- 
Eduardo Sato

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe