Re: [Haskell-cafe] Building lambdabot

2011-01-18 Thread Joe Bruce
Wow, it sure has taken me a long time to get back to this, but I got it to
work!  Two ways actually.  I did them both from scratch, just to make sure I
understood what was going on and could communicate it for the next poor sap
that is as ignorant as I was.

All this is done with GHC-6.12.3, cabal, readline-1.0.1.0,

In both cases, readline needed to be install.  On a mac, this is troublesome
because the mac comes with editline.  Macports installs readline fine,
except you have to make sure it's universal ('port install readline
+universal') since GHC needs 32-bit libraries.  When installing the haskell
readline package, cabal has to be told where to find the macports readline
('cabal install
--configuration-option=--with-readline-libraries=/opt/local/lib
--configuration-option=--with-readline-includes=/opt/local/include
--extra-lib-dirs=/opt/local/lib --extra-include-dirs=/opt/local/include
readline').

The two ways of installing lambdabot branch from here.  The first is from
hackage, but it needs to be patched and I don't think the patch is complete
anymore.  The patch is at
http://www.haskell.org/haskellwiki/Image:Lambdabot.patch.

cabal unpack lambdabot
cd lambdabot
wget patch url -O | patch -p1
cabal install --extra-lib-dirs=/opt/local/lib
--extra-include-dirs=/opt/local/include

lambdabot should compile, but will complain about arrows when run (because
the patch is insufficient).  You can manually correct it, or try the other
method: installing from darcs.

'darcs get http://code.haskell.org/lambdabot'
(Note: you'll want mueval too:
http://www.haskell.org/haskellwiki/Lambdabot/Building)
I had to manually install Stream-0.3 as lambdabot required = 0.3 but
something else required Stream  0.4.  'cabal install' in the lambdabot dir
and it should be happy.

Should/can I update the haskellwiki with this install process?  Should the
mac readline info go there too?

Thank you to everyone who helped me sort this out; I learned quite a bit.
Joe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Building lambdabot

2011-01-07 Thread Joe Bruce
On Fri, Jan 7, 2011 at 8:00 AM, Max Bolingbroke
batterseapo...@hotmail.comwrote:

 I don't think readline links against iconv. What that error says to me
 is that GHC is failing to link against *any* iconv. I bet that it's
 because you have iconv installed via Macports without +universal. Try:

 $ file /opt/local/lib/libiconv.a

 It should say:

 /opt/local/lib/libiconv.a: Mach-O universal binary with 2 architectures
 /opt/local/lib/libiconv.a (for architecture i386):  current ar archive
 random library
 /opt/local/lib/libiconv.a (for architecture x86_64):current ar
 archive random library


If nothing else, I've learned about checking locations and architectures of
libraries in this little adventure, so I had checked that prior to writing.
 I do in fact have the universal binary installed.  What's more, both the
macport and system versions are universal.  I tried telling cabal to
explicitly use each, separately, and it failed both times, though it gave me
a different error when compiling against the system lib.  (It complained
about readline again, which is why I assumed readline had some dependency on
iconv.)

I'm going to try what Gwern recommended (using the darcs repository for
lambdabot) before I continue down this route.

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


Re: [Haskell-cafe] Building lambdabot

2011-01-06 Thread Joe Bruce
Thanks, Max.  I had seen that thread already, but I don't understand how it
helps me.  I'm on a x64 mac and I have both an i386 and x64 version of
readline installed (via macports install readline +universal).  Perhaps
cabal is choosing the wrong one.  How do I find out?  How do I tell it which
to use?  And which do I want it to use?

On Wed, Jan 5, 2011 at 11:59 PM, Max Bolingbroke batterseapo...@hotmail.com
 wrote:

 On 6 January 2011 07:27, Joe Bruce bruce.jo...@gmail.com wrote:
  Now I'm stuck on readline again [lambdabot build step 28 of 81]:
  /Users/joe/.cabal/lib/readline-1.0.1.0/ghc-6.12.3/HSreadline-1.0.1.0.o:
  unknown symbol `_rl_basic_quote_characters'

 This seems to have been covered on Stack Overflow:

 http://stackoverflow.com/questions/1979612/using-cabal-readline-package-on-i386-macbook-snow-leopard

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


Re: [Haskell-cafe] Building lambdabot

2011-01-06 Thread Joe Bruce
Thanks Max.  That makes a lot of sense.  That change got me to the point of
linking lambdabot.

I then encountered this error:

Linking dist/build/lambdabot/lambdabot ...
Undefined symbols:
  _iconv_open, referenced from:
  _hs_iconv_open in libHSbase-4.2.0.2.a(iconv.o)
 (maybe you meant: _hs_iconv_open)
  _iconv, referenced from:
  _hs_iconv in libHSbase-4.2.0.2.a(iconv.o)
 (maybe you meant: _hs_iconv_open, _hs_iconv , _hs_iconv_close )
  _iconv_close, referenced from:
  _hs_iconv_close in libHSbase-4.2.0.2.a(iconv.o)
 (maybe you meant: _hs_iconv_close)

Let's see if I'm catching on.  From
herehttp://osdir.com/ml/haskell-cafe@haskell.org/2010-09/msg00489.htmland
here http://stackoverflow.com/questions/2726248/ghc-6-12-and-macports, I
learned I have iconv from my Mac and iconv from MacPorts, but the solutions
didn't work, and didn't really make sense to me.  readline is compiled with
iconv from MacPorts, and base is compiled with iconv from my Mac, and
they're slightly different.  How do I fix this?  Can I tell readline to use
my Mac's iconv even though I installed it with MacPorts?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Building lambdabot

2011-01-05 Thread Joe Bruce
Rogan,

Thanks for taking a look at it.  No, mtl is not the problem, at least not
yet.

A detail that I've discovered is important: I'm on Mac OS X (10.6).
 readline is my problem, and readline + mac + haskell seems to be a bad mix.

Macports installs readline in /opt/local/ by default, so I discovered I
needed to install this way:
cabal install lambdabot
--configure-option=--with-readline-includes=/opt/local/include
--configure-option=--with-readline-libraries=/opt/local/lib

That got the readline dependency installed correctly, but then the lambdabot
build complained about the architecture (32- vs 64-bit).  This
threadhttp://osdir.com/ml/librar...@haskell.org/2010-04/msg00171.html
was
somewhat helpful.  I reinstalled readline via macports with the universal
flag and got past that error.

Now I'm stuck on readline again [lambdabot build step 28 of 81]:
/Users/joe/.cabal/lib/readline-1.0.1.0/ghc-6.12.3/HSreadline-1.0.1.0.o:
unknown symbol `_rl_basic_quote_characters'

What do I do with that?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Building lambdabot

2011-01-04 Thread Joe Bruce
I've had a bit of an adventure trying to build and run
lambdabothttp://hackage.haskell.org/package/lambdabot-4.2.2.1 on
my box.  'cabal install lambdabot' does not work.  It states it's not GHC
6.12 (and certainly not 7.0) compatible, but I tried 6.12 anyway and got
nowhere.  Next, I tried 6.10 but failed on the unix dependency (in the same
manner as this 
threadhttp://web.archiveorange.com/archive/v/nDNOvQMXUGwfkyy0ITet).
 The thread is unresolved, so I've not tried modifying the cabal
build-depends.  I'm hoping to find someone who has a working lambdabot setup
who can point me in the right direction.  What further information about my
struggles should I provide?

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