Eric Kow | 1 Jun 2012 07:21
Picon
Gravatar

debug-wx

I've copied sample files from wxWidgets and wxHaskell repos into a kind of minimalistic
debug-your-wxhaskell-setup resource

https://github.com/kowey/debug-wx

Wonder if it'd be useful for somebody to build something for wxc itself (we have wxWidgets, wxcore, wx)

--

-- 
Eric Kow <http://erickow.com>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Henry Lockyer | 1 Jun 2012 11:37

Re: debug-wx

Thanks Eric.  I'm hoping to instal wxHaskell this weekend, so it may well come in useful! 

On 1 Jun 2012, at 06:21, Eric Kow wrote:

> I've copied sample files from wxWidgets and wxHaskell repos into a kind of minimalistic
debug-your-wxhaskell-setup resource
> 
> https://github.com/kowey/debug-wx
> 
> Wonder if it'd be useful for somebody to build something for wxc itself (we have wxWidgets, wxcore, wx)
> 
> -- 
> Eric Kow <http://erickow.com>
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> wxhaskell-users mailing list
> wxhaskell-users@...
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
(Continue reading)

Henry Lockyer | 5 Jun 2012 03:52

mac OS installation help sought

Hi all
Looking for some help/advice about wxHaskell installation.
 
Hopefully appropriate to ask for basic help on this list (?)

It's for MacOS X 10.6.8 (Snow Leopard). 

I just upgraded GHC to 7.0.4, 64-bit option.

I'm not quite sure if I'm going down the right road.

A problem is I'm not experienced with building c++, or unix in general, and it's looking like there might be a fair bit of 
noise on this level in getting wxHaskell working.
Is it viable to try and use it if you are not experienced with compiling C++, make, libs etc. or should I give up now (hopefully not,
but I don't have as much time as I'd like to spend on it currently) ?  

I started the process with installing wxWidgets. I got 2.9.3 direct from wxWidgets.org, put the files in a dir under my user
and followed the downloaded instructions in "install.txt", under docs/osx, as follows:

  # Build the library for Cocoa (wxWidgets 2.9.0 and later) 
  mkdir build-cocoa-debug
  cd build-cocoa-debug
  ../configure --enable-unicode --enable-debug --disable-shared --with-osx_cocoa 
  make;cd ..
  # Build the samples and demos
  cd build-cocoa-debug/samples; make;cd ../..
  cd build-cocoa-debug/demos;   make;cd ../..

Lots of output to terminal - didn't try to wade through it all.. No obvious failure messages though saw some warnings.
I tried some of the widgets demo programs and samples and though much of it seemed to be working ok there were some odd aspects 
and things seemingly not working correctly but not sure if it was a problem with not very good samples/demos or the underlying install. 

(So, no attempt to install wxHaskell itself yet.)

I then saw Unresolved QuickTime dependency on Mac OS X? on github and remembered I had received:
"ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file"
In fact this warning is repeated throughout the terminal output. It seems to occur every time there is a g++ command that 
(just a guess at this point) is linking the 2.9.3 widgets lib (has parameter "-L/Users/henrylockyer/wxWidgets/wxWidgets-2.9.3/build-cocoa-debug/lib", 
and also has the param "-framework QuickTime" ).

Are these issues connected?  

Heinrich Apfelmus posted the following in response to the above github issue:

"The problem seems to be that QuickTime 7 is a 32bit library and will stay that way. Instead of porting it to 64bit, Apple chose to completely rewrite it instead, creating the QuickTime X library. You can still use the QuickTime 7 library, but only from 32bit processes.

Solution:

  1. Install wxWidgets-devel-2.9.3 with the +universal flag on macports. This creates a library that is both 32bit and 64bit.
  2. Configure GHC to produce and link 32bit binaries.

I don't know what exactly happens on the wxWidgets side, though. Do they link QuickTime when creating a 64bit target? "


Is there any further progress on this and is it an issue I need to resolve ?
I am not using macports. The configuration tool/script which seems to generate the makefiles amongst other things may accept
parameter for 'universal', I need to check further on the wxWidgets site, but is this what I need to do?

The configuration tool gives the following outputs amongst many others, is this relevant?
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
. . .

I chose the 64 bit GHC option, so would I need to go back and reload this in 32 bit form?

Before I started the install attempt I was also a little unclear from reading the 
page at http://www.haskell.org/haskellwiki/WxHaskell  says ver. 2.8.x is easiest to get working, 
but the "Building and Installing / MacOS X" linked page at http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X
only talks about wxWidgets version 2.9, implying wxHaskell 0.9, no mention of 0.13, so I went with 0.9.   
Is wxHaskell 0.13 also ok for MacOS X?  Would this be better? 

Can I go forward from where I am to go ahead and install whHask on top, or do I need to go back and fix wxWidgets?

If someone can help steer me here it would be much appreciated.  

Thanks/ Henry 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Gregory Guthrie | 6 Jun 2012 19:16
Gravatar

problems buiding wxHaskell on Windows

After an upgrade to the new Haskell Platform, my existing wxHaskell programs are broken. They all seem to
now require wxWidgets 2.9, for which I can't find any binary versions. wxPack has 2.8, and beyond that one
has to get a compiler and build it locally from what I see.
There are tutorials on this from various sources, each a few pages long, with various advice on setup,
changing configurations, etc. Install wxConfig, install minGW compilers, setup configurations,
rebuild, etc.

Is there any source of a simple binary install? I'd hope for some simple apt-get or cabal like tool, Haskell
library tools (on Windows?) seem less integrated than others that I'm familiar with.

I did follow the instructions at:
   http://www.haskell.org/haskellwiki/WxHaskell/Windows#wxWidgets_2.9_and_wxHaskell_0.90.x 

to install and compile wxWidgets locally, and still cannot get the wxHaskell components to install. I'm
sure that all of this just requires some fairly simple details, but again after some time already, hope not
to have to spend a lot more time on this, and wish it was more automated!

    >cabal install wxc
    ...
    Configuring wxc-0.90.0.3...
    Configuring wxc to build against wxWidgets 2.9

    setup.exe: Missing dependencies on foreign libraries:
    * Missing C libraries: wxmsw29ud_all, wxtiffd, wxjpegd, wxpngd, wxzlibd, wxregexud, wxexpatd, wxregexud
    This problem can usually be solved by installing the system packages that
    provide these libraries (you may need the "-dev" versions). If the libraries
    are already installed but in a non-standard location then you can use the
    flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
    cabal: Error: some packages failed to install:
    wx-0.90.0.1 depends on wxc-0.90.0.3 which failed to install.
    wxc-0.90.0.3 failed during the configure step. The exception was: ExitFailure 1
    wxcore-0.90.0.1 depends on wxc-0.90.0.3 which failed to install.

Someone on Haskell-beginners noted that it looks like I compiled wxWidgets, but did not install them -
Could be, but the above instructions do not mention that.

I see in my cabal directory that it has files :
  Wx-0.12.1.6,
  Wxcore-0.12.1.7
  Wxdirect-0.12.1.4
  Wxdirect-0.90.0.1

I also notice that these instructions require a bunch of PATH fiddling that I never had to do before for
wxWidgets /wxHaskell 2.8. 
Also that it asks to install a path pointer to the cabal directory to \wxc-%WXC_VERSION%\%GHC_VERSION%
which file does not exist on my system.  ??

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Henry Lockyer | 5 Jun 2012 18:31

ps re: mac OS installation help sought

PS addition to previous mail, another rather basic question:


Step 3 says:
"Check your path to make sure you are using your wxWidgets and not the default Mac one"

I assume this means that $PATH should lead to my wxWidgets 2.9.3 library and not any other version,
and presumably the directories in $PATH are searched in the order in which they appear when shown 
by "echo $PATH". 
In my case this is:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/henrylockyer/Scala/bin:/usr/X11/bin


I have built wxWidgets in a directory under my user and from looking at the g++ commands issued, and 
also from trying to decrypt a little of one of the demo makefiles
". . .
wx_top_builddir = /Users/henrylockyer/wxWidgets/wxWidgets-2.9.3/build-cocoa-debug
. . .
LIBDIRNAME = $(wx_top_builddir)/lib
. . ."
                 from this I conclude I need the path to point to this directory:
/Users/henrylockyer/wxWidgets/wxWidgets-2.9.3/build-cocoa-debug/lib


But what should be included in the path? 
The directory containing 'lib' (ie. .../build-cocoa-debug),
or including the lib directory itself (ie. .../build-cocoa-debug/lib),
or something else?

Then, how to ensure my path is not leading to the "default Mac one"?
Taking a look for wx* in the PATH directories I find that they contain some things which look
suspiciously like they may relate to an earlier wxWidgets version (eg. "wxrc-2.8" below):

Henrys-iMac:~ henrylockyer$ ls /usr/bin/wx* /bin/wx*  /usr/sbin/wx*  /usr/local/bin/wx* 
ls: /bin/wx*: No such file or directory
ls: /usr/local/bin/wx*: No such file or directory
ls: /usr/sbin/wx*: No such file or directory
/usr/bin/wx-config /usr/bin/wxPerl5.8.9 /usr/bin/wxperl_demo5.8.9.pl /usr/bin/wxperl_overload5.8.9 /usr/bin/wxperl_xspp5.8.9
/usr/bin/wxPerl /usr/bin/wxperl_demo.pl /usr/bin/wxperl_overload /usr/bin/wxperl_xspp /usr/bin/wxrc
/usr/bin/wxPerl5.10.0 /usr/bin/wxperl_demo5.10.0.pl /usr/bin/wxperl_overload5.10.0 /usr/bin/wxperl_xspp5.10.0 /usr/bin/wxrc-2.8

It seems to be mostly to do with 'wxperl', but:
- Is there in fact something here which will interfere with wxHaskell 0.9 / wxWidgets 2.9.3 in general ? 
- Is looking for things beginning with "wx" sufficient to find "the default Mac one" in the path?
- If the items listed are significant then what to do about them without causing other problems? 
- Include the wxWidgets 2.9.3 lib directory path into the first searched path file as the first searched path, ie. before /usr/bin ?

Thanks..
/ Henry 



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Henk-Jan van Tuyl | 6 Jun 2012 23:14
Picon

Problems installing wxcore (space in path)


L.S.,

The following session seems to indicate that the setup of wxcore cannot  
handle a space in the pathname of the directory where packages are  
installed. I don't know how to change the location of this directory; any  
suggestions how to get wxcore installed? (System: Windows XP)

> cabal install wx --global
Resolving dependencies...
[1 of 1] Compiling Main             (  
C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-0.90.0.1\Setup.hs,  
C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-0.90.0.1\dist\setup\Main.o  
)
Linking  
C:\DOCUME~1\User\LOCALS~1\Temp\wxcore-0.90.0.1-2708\wxcore-0.90.0.1\dist\setup\setup.exe  
...
Configuring wxcore-0.90.0.1...
Generating class type definitions from .h files
generating: src/haskell/Graphics/UI/WXCore/WxcClassTypes.hs
reading class definitions:
parsing: C:\Program/include/wxc.h
wxdirect: C:\Program/include/wxc.h: openFile: does not exist (No such file  
or directory)
Generating class info definitions
generating: src/haskell/Graphics/UI/WXCore/WxcClassInfo.hs
reading class definitions:
parsing: C:\Program/include/wxc.h
wxdirect: C:\Program/include/wxc.h: openFile: does not exist (No such file  
or directory)
Generating class method definitions from .h files
parsing: Files\Haskell\wxc-0.90.0.3\ghc-7.4.1\include/wxc.h
wxdirect: Files\Haskell\wxc-0.90.0.3\ghc-7.4.1\include/wxc.h: openFile:  
does not exist (No such file or directory)
setup.exe: Missing dependency on a foreign library:
* Missing C library: wxc
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxcore-0.90.0.1 which failed to install.
wxcore-0.90.0.1 failed during the configure step. The exception was:
ExitFailure 1

Regards,
Henk-Jan van Tuyl

--

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
David Virebayre | 7 Jun 2012 09:55
Picon

Re: problems buiding wxHaskell on Windows


I've never managed to get wxHaskell running without problems on windows, last time I tried there was some kind of encoding problem, and I gave up.

That would be cool if there was an installer that would install wxHaskell with all dependences on top of a freshly installed haskell platform on windows.

I would be eternally thankful if someone could do that. 

David.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Antton Tapani | 7 Jun 2012 14:31
Picon

Re: problems buiding wxHaskell on Windows

I haven't updated haskell platform to newest, but I would find it
strange if the old version stopped working. If you merely had to
rebuild wxhaskell, the issue might be that 0.9 and 0.13.2.1 target
version 2.9 by default. Wx-0.13.2.1 can be configured to use your 2.8
installation. I roughly outlined the process in previous post.
http://www.mail-archive.com/wxhaskell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f <at> public.gmane.org/msg01139.html

As a side note, most of the mysterious cabal build errors I get (on
windows 7) are fixed by running
set LANG=C
in cmd before compiling (or setting it as permanent environment variable).

Installer would indeed be very nice, but it takes a lot of work to
create and maintain universal installer and it would currently benefit
only a handful of  people. I'm guessing the majority of wxhaskell
users are fairly savvy developers, so it would not seem worth the
trouble. That of course quickly becomes self fulfilling statement
since it will actively drive away people who have no interest in
fiddling with the nuances of the installation process. They may give
it a try, but fail and give up and you never hear from them.

I will devote some time on this if I end up using haskell on more
projects. Most people who wish to use wxhaskell are not likely to
participate in its development, but at the same time people are less
willing to develop a library with only few users. Haskell platform
itself is pretty much single click installation, and it is very easy
to get started with. Ideally that should be the case with every gui
toolkit as well.

Antton

On Thu, Jun 7, 2012 at 10:55 AM, David Virebayre
<dav.vire+haskell@...> wrote:
>
> I've never managed to get wxHaskell running without problems on windows,
> last time I tried there was some kind of encoding problem, and I gave up.
>
> That would be cool if there was an installer that would install wxHaskell
> with all dependences on top of a freshly installed haskell platform on
> windows.
>
> I would be eternally thankful if someone could do that.
>
> David.
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> wxhaskell-users mailing list
> wxhaskell-users@...
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Heinrich Apfelmus | 7 Jun 2012 15:30
Picon
Favicon
Gravatar

Re: problems buiding wxHaskell on Windows

Antton Tapani wrote:
> Installer would indeed be very nice, but it takes a lot of work to
> create and maintain universal installer and it would currently benefit
> only a handful of  people. I'm guessing the majority of wxhaskell
> users are fairly savvy developers, so it would not seem worth the
> trouble. That of course quickly becomes self fulfilling statement
> since it will actively drive away people who have no interest in
> fiddling with the nuances of the installation process. They may give
> it a try, but fail and give up and you never hear from them.
> 
> I will devote some time on this if I end up using haskell on more
> projects. Most people who wish to use wxhaskell are not likely to
> participate in its development, but at the same time people are less
> willing to develop a library with only few users. Haskell platform
> itself is pretty much single click installation, and it is very easy
> to get started with. Ideally that should be the case with every gui
> toolkit as well.

[Cross posting to the libraries list.]

Actually, maybe it's possible to integrate the creation of one-click 
installers with the Haskell Platform efforts?

The best option would be to have wxHaskell to become part of the 
platform, but it probably doesn't meet the criteria for inclusion right 
now. But the focus is on the underlying C libraries anyway, these are 
the things that are tricky to install.

Of course, someone has to prepare an installer, this amount of work 
doesn't magically disappear. But maybe it's a good idea to share common 
infrastructure, resources and knowledge with the Haskell Platform 
effort? Things that can be shared are:

* the guy with the hat on top (release manager) who prods people to stay 
in sync
* testing infrastructure (I have this romantic image where the Haskell 
Platforms hackers have access to a vast cloud of virtual machines to 
test their installation on different systems)
* shell scripts for automating the creation of installers. (I for one 
have no clue how to create an installer on MacOS X.)

So, the idea would be to have several installers: the Haskell Platform 
as a basis and then several "Pillars" on top, for instance the "GUI 
Pillar" that includes binaries for wxHaskell and GTK, or a "Web Pillar" 
that collects several web packages as soon as they become tricky to 
install with cabal ("yesod platform"). The latter should probably be a 
user install, not a global one.

Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Gregory Guthrie | 7 Jun 2012 18:12
Gravatar

Re: problems buiding wxHaskell on Windows

I did a complete re-build of wxWidgets2.9, and it seemed to complete successfully with a built library
files: gcc_mswuddll & gcc_mswudll.

Then I went into the samples directory and built all the samples, they all seemed to build fine, but when I try
to execute them they give:
"   wbase293ud_gcc_custom.dll not found ...".

And it still doesn't seem to have installed wxc or wxcore (not in the cabal directory).

Does anyone run WxHaskell 2.9 on Windows?
––––––––––––––––––––––––––––––––––––––––––––––––
> Cc: wxhaskell-users <at> lists.sourceforge.net
> Subject: Re: [wxhaskell-users] problems buiding wxHaskell on Windows
>
> I've never managed to get wxHaskell running without problems on windows, last time I tried there was some
kind of encoding problem, and I gave up.
>
>That would be cool if there was an installer that would install wxHaskell with all dependences on top of a
freshly installed haskell platform on windows.
>
>I would be eternally thankful if someone could do that. 
>
> David.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Gmane