Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
OK, I got it installed, but build warned me of duplicate dylibs, and
running my program gave a bus error.

So I port uninstalled gtk2, so now it compiled without warnings, but
the program won't run because I had been forced to uninstall pangoft
to uninstall gtk2.

So now I need to uninstall the gtk framework - how do I do that?

Then i can re-install the macports version and have a working system again.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Hans Aberg

On 22 Mar 2009, at 10:28, Colin Adams wrote:


OK, I got it installed, but build warned me of duplicate dylibs, and
running my program gave a bus error.

So I port uninstalled gtk2, so now it compiled without warnings, but
the program won't run because I had been forced to uninstall pangoft
to uninstall gtk2.

So now I need to uninstall the gtk framework - how do I do that?

Then i can re-install the macports version and have a working system  
again.


You might move it out of the way:
  sudo mv /opt /opt1
and then move it back. To get rid of ports altogether,
  sudo rm -rf /opt
(But be careful so you type right when removing as root, as errors can  
screw up the whole installation.)


I looked up my records - I compiled gtk2hs, and as was remarked, the  
one in MacPorts (but not gtk2 alone) insists on installing its own  
GHC. When taking down the sources (external to MacPorts) of gtk2hs,  
the .tgz ones worked, but the sources from the archive caused some  
problems with autoconf - despite intense discussions also on the  
gtk2hs list, this problem was left unresolved.


The libraries might cause problems when compiling, because even if a  
libpath is included in the compile, if there are system ones  
available, then may be used - a GCC quirk. So in such cases, one might  
have to edit the libpath so that the system libraries are not at all  
there, moving selected one out of the way, using libtools or  
something. This is very technical, though.


  Hans Aberg


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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
I tried issuing the sudo port install command on the wiki page.

After some time running it failed with:

To fully complete your installation and make python 2.5 the default, please run

sudo port install python_select
sudo python_select python25

---  Cleaning python25
---  Fetching py25-hashlib
---  Attempting to fetch Python-2.5.2.tar.bz2 from
http://www.python.org/ftp/python/2.5.2/
---  Verifying checksum(s) for py25-hashlib
---  Extracting py25-hashlib
---  Configuring py25-hashlib
---  Building py25-hashlib with target build
Error: Target org.macports.build returned: shell command  cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-hashlib/work/Python-2.5.2/Modules
 /opt/local/bin/python2.5 setup.py build  returned error 1
Command output: running build
running build_ext
building '_hashlib' extension
creating build
creating build/temp.macosx-10.3-i386-2.5
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
unable to execute -DNDEBUG: No such file or directory
error: command '-DNDEBUG' failed with exit status 1

Error: The following dependencies failed to build: gtk-doc
gnome-doc-utils iso-codes py25-hashlib libxslt py25-gobject
py25-libxml2 py25-numeric rarian getopt gtk2 cairo jasper pango
hicolor-icon-theme libgnomeui gnome-icon-theme icon-naming-utils
p5-xml-simple p5-xml-namespacesupport p5-xml-sax gnome-keyring
autoconf help2man p5-locale-gettext m4 gconf libgcrypt libgpg-error
libtasn1 libbonoboui gnome-vfs libglade2 libgnome esound
libgnomecanvas
Error: Status 1 encountered during processing.

Which is singularly uninformative to me. It looks like I am not going
to be able to do any haskell programming next week when I am away with
only a macbook.

2009/3/22 Hans Aberg hab...@math.su.se:
 On 22 Mar 2009, at 10:28, Colin Adams wrote:

 OK, I got it installed, but build warned me of duplicate dylibs, and
 running my program gave a bus error.

 So I port uninstalled gtk2, so now it compiled without warnings, but
 the program won't run because I had been forced to uninstall pangoft
 to uninstall gtk2.

 So now I need to uninstall the gtk framework - how do I do that?

 Then i can re-install the macports version and have a working system
 again.

 You might move it out of the way:
  sudo mv /opt /opt1
 and then move it back. To get rid of ports altogether,
  sudo rm -rf /opt
 (But be careful so you type right when removing as root, as errors can screw
 up the whole installation.)

 I looked up my records - I compiled gtk2hs, and as was remarked, the one in
 MacPorts (but not gtk2 alone) insists on installing its own GHC. When taking
 down the sources (external to MacPorts) of gtk2hs, the .tgz ones worked, but
 the sources from the archive caused some problems with autoconf - despite
 intense discussions also on the gtk2hs list, this problem was left
 unresolved.

 The libraries might cause problems when compiling, because even if a libpath
 is included in the compile, if there are system ones available, then may be
 used - a GCC quirk. So in such cases, one might have to edit the libpath so
 that the system libraries are not at all there, moving selected one out of
 the way, using libtools or something. This is very technical, though.

  Hans Aberg



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


[Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Achim Schneider
Colin Adams colinpaulad...@googlemail.com wrote:

 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include
 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
 unable to execute -DNDEBUG: No such file or directory

That's just flags, preceded by no command (or, rather, -DNDEBUG is
interpreted as a command, which doesn't make much sense). My crystal
ball says that the build script is dodgy and just tries to execute
$(CC) or something, which isn't set. You can investigate the script
and fix it, or complain with the python (or macports, whatever is
appropriate) guys.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Hans Aberg

On 22 Mar 2009, at 11:32, Colin Adams wrote:


creating build/temp.macosx-10.3-i386-2.5
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
include/python2.5

-c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
unable to execute -DNDEBUG: No such file or directory
error: command '-DNDEBUG' failed with exit status 1


A search on the Apple site says it is a compile option used to remove  
assert():

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/assert.3.html

The first line mentions macosx-10.3 - do you have a compiler for an  
old system, or something?


And I have a fairly recent python:
$ python --version
Python 2.5.1
$ which python
/usr/bin/python

Make sure to sign up (for free) as a developer at developer.apple.com  
and take down latest Xcode (mine is Version 3.1.2, though I do not  
know if it is the absolutely latest).


  Hans Aberg


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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
No. It's all recent.


2009/3/22 Hans Aberg hab...@math.su.se:
 On 22 Mar 2009, at 11:32, Colin Adams wrote:

 creating build/temp.macosx-10.3-i386-2.5
 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include

 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
 unable to execute -DNDEBUG: No such file or directory
 error: command '-DNDEBUG' failed with exit status 1

 A search on the Apple site says it is a compile option used to remove
 assert():
 http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/assert.3.html

 The first line mentions macosx-10.3 - do you have a compiler for an old
 system, or something?

 And I have a fairly recent python:
 $ python --version
 Python 2.5.1
 $ which python
 /usr/bin/python

 Make sure to sign up (for free) as a developer at developer.apple.com and
 take down latest Xcode (mine is Version 3.1.2, though I do not know if it is
 the absolutely latest).

  Hans Aberg



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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Hans Aberg

On 22 Mar 2009, at 12:45, Colin Adams wrote:


No. It's all recent.


And MacPorts installs its own gcc. Achim Scheider pointed out that the  
compiler name is missing, so the shell tries to execute '-DNDEBUG' as  
a program. When I try it, I get:

$ sudo port install python_select
Password:
---  Fetching python_select
---  Attempting to fetch select-0.2.1.tar.gz from 
http://arn.se.distfiles.macports.org/python_select
---  Verifying checksum(s) for python_select
---  Extracting python_select
---  Configuring python_select
---  Building python_select
---  Staging python_select into destroot
---  Installing python_select @0.2.1_0+darwin_9
---  Activating python_select @0.2.1_0+darwin_9
---  Cleaning python_select

$ sudo python_select python25
Selecting version python25 for python

Which perhaps only means that I already have it installed.

But I also get this:
$ which python
/opt/local/bin/python

$ python --version
Python 2.5.1

$ /usr/bin/python --version
Python 2.5.1

The version you tried to install is 2.5.2 - perhaps there is a script  
problem, then.


  Hans


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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Hans Aberg

On 22 Mar 2009, at 11:32, Colin Adams wrote:


I tried issuing the sudo port install command on the wiki page.


What did you try to install? ...


After some time running it failed with:

To fully complete your installation and make python 2.5 the default,  
please run


   sudo port install python_select
   sudo python_select python25


...The thing is that when I removed python_select and python, there  
remains a

  $ /opt/local/bin/python --version
  Python 2.5.1
So your package somehow needs 2.5.2, which may be the culprit.

  Hans


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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
2009/3/22 Hans Aberg hab...@math.su.se:
 On 22 Mar 2009, at 11:32, Colin Adams wrote:

 I tried issuing the sudo port install command on the wiki page.

 What did you try to install? ...

Just what it says on the wiki page:

sudo port install glade3 libglade2 gstreamer gst-plugins-base
gtksourceview cairo librsvg gtkglext firefox

 After some time running it failed with:

 To fully complete your installation and make python 2.5 the default,
 please run

       sudo port install python_select
       sudo python_select python25

 ...The thing is that when I removed python_select and python, there remains
 a
  $ /opt/local/bin/python --version
  Python 2.5.1
 So your package somehow needs 2.5.2, which may be the culprit.

Which package? None of them are mine.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Hans Aberg

On 22 Mar 2009, at 13:42, Colin Adams wrote:


After some time running it failed with:

To fully complete your installation and make python 2.5 the default,
please run

  sudo port install python_select
  sudo python_select python25


...The thing is that when I removed python_select and python, there  
remains

a
 $ /opt/local/bin/python --version
 Python 2.5.1
So your package somehow needs 2.5.2, which may be the culprit.


Which package? None of them are mine.


One of the packages you tried to install asked for this, in this list:


Just what it says on the wiki page:

sudo port install glade3 libglade2 gstreamer gst-plugins-base
gtksourceview cairo librsvg gtkglext firefox


Looking into your post:

---  Cleaning python25
---  Fetching py25-hashlib
---  Attempting to fetch Python-2.5.2.tar.bz2 from
http://www.python.org/ftp/python/2.5.2/
---  Verifying checksum(s) for py25-hashlib
---  Extracting py25-hashlib
---  Configuring py25-hashlib
---  Building py25-hashlib with target build
Error: Target org.macports.build returned: shell command  cd

it is py25-hashlib that is the culprit.

I was able to install it. Then I got a later Python:

---  Attempting to fetch Python-2.5.4.tar.bz2 from 
http://arn.se.distfiles.macports.org/python25


The procedure followed was (do a 'sudo -s' so save writing:

First uninstall python25 and dependencies:
# port uninstall python25
---  Unable to uninstall python25 2.5.2_5+darwin_8, the following  
ports depend on it:

--- py25-gobject
--- py25-numeric
--- gstreamer

# port uninstall gstrea...@0.10.19_0
---  Deactivating gstreamer @0.10.19_0
---  Uninstalling gstreamer @0.10.19_0

# port uninstall gstrea...@0.10.8_0
---  Uninstalling gstreamer @0.10.8_0

# port uninstall py25-gobject
---  Deactivating py25-gobject @2.14.2_0
---  Uninstalling py25-gobject @2.14.2_0

# port uninstall py25-numeric
---  Deactivating py25-numeric @24.2_1+macosx
---  Uninstalling py25-numeric @24.2_1+macosx

# sudo port uninstall python25

Then I noticed there was an unregistered python - those seems to  
confuse MacPorts. OS move it:

# cd /opt/local/bin/
# mv python python1

Then I installed python_select and python25:

# port install python_select
---  Fetching python_select
---  Verifying checksum(s) for python_select
---  Extracting python_select
---  Configuring python_select
---  Building python_select
---  Staging python_select into destroot
---  Installing python_select @0.2.1_0+darwin_9
---  Activating python_select @0.2.1_0+darwin_9
---  Cleaning python_select
bash-3.2# port install python25
---  Fetching python25
---  Attempting to fetch Python-2.5.4.tar.bz2 from 
http://arn.se.distfiles.macports.org/python25
---  Verifying checksum(s) for python25
---  Extracting python25
---  Applying patches to python25
---  Configuring python25
---  Building python25
---  Staging python25 into destroot
---  Installing python25 @2.5.4_0+darwin_9+macosx
---  Activating python25 @2.5.4_0+darwin_9+macosx

To fully complete your installation and make python 2.5 the default,  
please run


sudo port install python_select
sudo python_select python25

---  Cleaning python25

After that follow the instructions:

# sudo port install python_select
Skipping org.macports.activate (python_select +darwin_9) since this  
port is already active

---  Cleaning python_select

# sudo python_select python25
Selecting version python25 for python

And finally to py25-hashlib:

# port install py25-hashlib
Portfile changed since last build; discarding previous state.
---  Fetching openssl
---  Attempting to fetch openssl-0.9.8j.tar.gz from 
http://arn.se.distfiles.macports.org/openssl
---  Verifying checksum(s) for openssl
---  Extracting openssl
---  Applying patches to openssl
---  Configuring openssl
---  Building openssl
---  Staging openssl into destroot
---  Installing openssl @0.9.8j_0
---  Activating openssl @0.9.8j_0
Error: Target org.macports.activate returned: Image error: /opt/local/ 
share/man/man3/bn_print.3.gz already exists and does not belong to a  
registered port.  Unable to activate port openssl.

Error: The following dependencies failed to build: openssl
Error: Status 1 encountered during processing.

So here I just remove the unregistered file:
# rm /opt/local/share/man/man3/bn_print.3.gz
# port activate openssl @0.9.8j_0
---  Activating openssl @0.9.8j_0

So now it worked. Try py25-hashlib again:
# port install py25-hashlib
---  Fetching py25-hashlib
---  Verifying checksum(s) for py25-hashlib
---  Extracting py25-hashlib
---  Configuring py25-hashlib
---  Building py25-hashlib
---  Staging py25-hashlib into destroot
---  Installing py25-hashlib @2.5.4_0
---  Activating py25-hashlib @2.5.4_0
---  Cleaning py25-hashlib

So now I git t installed. - I got beyond the point where you got stuck.

  Hans


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Brandon S. Allbery KF8NH

On 2009 Mar 22, at 6:32, Colin Adams wrote:

creating build/temp.macosx-10.3-i386-2.5
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
include/python2.5

-c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
unable to execute -DNDEBUG: No such file or directory
error: command '-DNDEBUG' failed with exit status 1



I recall seeing that with an old version of MacPorts; have you run  
sudo port sync recently?  (Or better, sudo port selfupdate.)


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
No, I haven't done that - I forgot about that command since I first
installed macports nearly a year ago. :-(

Bit I DID manage to get the ports all installed (thanks to lots of
help from Hans, and lots of individual port uninstalls followed by
port installs). And configured gtk2hs ok.

But when I type make, I get (after a lot of compiling):

No rule to make target `glib/System/Glib/GObject_stub.p_o needed by' ...

I shall try again without enmabling profiling support.

2009/3/22 Brandon S. Allbery KF8NH allb...@ece.cmu.edu:
 On 2009 Mar 22, at 6:32, Colin Adams wrote:

 creating build/temp.macosx-10.3-i386-2.5
 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include

 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
 unable to execute -DNDEBUG: No such file or directory
 error: command '-DNDEBUG' failed with exit status 1


 I recall seeing that with an old version of MacPorts; have you run sudo
 port sync recently?  (Or better, sudo port selfupdate.)

 --
 brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
 system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
 electrical and computer engineering, carnegie mellon university    KF8NH



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


Re: [Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-22 Thread Colin Adams
2009/3/22 Colin Adams colinpaulad...@googlemail.com:
 No, I haven't done that - I forgot about that command since I first
 installed macports nearly a year ago. :-(

 Bit I DID manage to get the ports all installed (thanks to lots of
 help from Hans, and lots of individual port uninstalls followed by
 port installs). And configured gtk2hs ok.

 But when I type make, I get (after a lot of compiling):

 No rule to make target `glib/System/Glib/GObject_stub.p_o needed by' ...

 I shall try again without enmabling profiling support.


It's all working now. And I don't need profiling support on the mac anyway.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-21 Thread Achim Schneider
Ross Mellgren rmm-hask...@z.odi.ac wrote:

 

Way too many, definitely.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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


[Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-20 Thread Bjorn Buckwalter
Haskell on Mac OS X has been mostly painless for me. I have a PowerPC 
mac which means there are rarely binaries for me to download from
haskell.org. I've either used MacPorts or compiled the GHC from source, 
both have worked well. I prefer the latter, but you'll probably want
MacPorts anyway for gcc and non-haskell libs.

I did some HOpenGL stuff about a year ago and cannot recall having any
problems.

Occasionally you'll have to do something like install PCRE using
MacPorts and add /opt/local/lib to $LD_LIBRARY_PATH[1] but mostly
things just work.

I believe the readline/libedit thing caused minor headache at some point
(but far less than on the Red Hat linux box on which I have no root/sudo
access).

Everything certainly works infinitely better than on Cygwin. :P

Sorry about not being able to give more details, any issues I may have
had are not fresh in memory. But in short I don't think you'll have any
more/significantly different problems than on Linux, and probably
substantially less than on Windows (or I'm doing something wrong). 

Barring where the above contradicts him I concur with Thomas Davie. ;)

Thanks,
Bjorn Buckwalter

[1] http://tinyurl.com/cw64nd


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


[Haskell-cafe] Re: Ease of Haskell development on OS X?

2009-03-20 Thread Achim Schneider
Don Stewart d...@galois.com wrote:

 bulat.ziganshin:
  
  http://freearc.org
  
  btw, it have 35.000 downloads ATM
 
 Awesome, and congratulations! 
 
 I wonder: have you thought about adding a cabal file, so we can
 package it automatically for all the Linux distros? Then you'd have
 access to the distro packaging teams to help disperse the code.
 
A graphical frontend for a packer, under unix? Heresy!

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


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