Re: [Haskell-cafe] Problems building lambdabot on osx
Hi, there is a conflict between ghc' libiconv and Ports installed libiconv. make sure first sudo port deactivate -f libiconv then install again, it should work. however, it is very ugly since your other port installed libraries needs libiconv, like gnuplot, so when you need port installed libiconv, sudo port activate -f libiconv again. 于 11-8-8 下午9:38, Adam Turoff 写道: I've tried off and on the last couple of days to build Lambdabot on Mac OS X (before and after the upgrade from 10.6 to 10.7) and I keep running into linker errors with the 64-bit Haskell Platform (ghc 7.0.3). First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Linking dist/build/lambdabot/lambdabot ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame Undefined symbols for architecture x86_64: _rl_insert_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa5_info in libHSreadline-1.0.1.0.a(Readline.o) _rl_possible_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa7_info in libHSreadlin (full error report at http://hpaste.org/50036 ) I did manage to install readline through macports: $ port installed readline The following ports are currently installed: readline @6.2.000_0 (active) $ file /opt/local/lib/libreadline.dylib /opt/local/lib/libreadline.dylib: Mach-O 64-bit dynamically linked shared library x86_64 and I did manage to get readline installed properly by specifying the include/lib dirs from macports: cabal install readline --configure-option=--with-readline-libraries=/opt/local/lib --configure-option=--with-readline-includes=/opt/local/include and readline does work in ghci: $ ghci GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help Prelude :m + System.Console.Readline Prelude System.Console.Readline readline testing testing exit exit Just exit Prelude System.Console.Readline The only issue, which has me stumped, is that lambdabot can't seem to find the readline dependency. Adding the --with-readline options when trying to build lambdabot has no effect. Neither does adding --extra-lib-dirs=/opt/local/lib to cabal install. Anyone have a clue where to start to work around this? Would switching to ghc HEAD help here? Thanks, -- Adam ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems building lambdabot on osx
On Mon, Aug 8, 2011 at 21:38, Adam Turoff adam.tur...@gmail.com wrote: First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Yes, because now it's finding the system readline, which isn't actually readline (Apple ships a readline which is actually BSD editline, so you get missing symbols for things editline doesn't support such as completion). I think you'll need to temporarily deactivate MacPorts' iconv instead of using --extra-lib-dirs. This can't really be fixed by either GHC or MacPorts; there doesn't seem to be a good solution as yet, although the MacPorts folks may end up implementing a hacky solution because Apple has introduced *another* MacPorts-breaking library conflict in Lion (libnotify). -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems building lambdabot on osx
I didn't have any trouble building lambdabot when linking to readline built through Homebrew. Currently using Lion, Xcode 4.1, and GHC 7.0.4. On Aug 9, 2011, at 11:59 AM, Brandon Allbery wrote: On Mon, Aug 8, 2011 at 21:38, Adam Turoff adam.tur...@gmail.com wrote: First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Yes, because now it's finding the system readline, which isn't actually readline (Apple ships a readline which is actually BSD editline, so you get missing symbols for things editline doesn't support such as completion). I think you'll need to temporarily deactivate MacPorts' iconv instead of using --extra-lib-dirs. This can't really be fixed by either GHC or MacPorts; there doesn't seem to be a good solution as yet, although the MacPorts folks may end up implementing a hacky solution because Apple has introduced *another* MacPorts-breaking library conflict in Lion (libnotify). -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Jack Henahan jhena...@uvm.edu == Computer science is no more about computers than astronomy is about telescopes. -- Edsger Dijkstra == 398E692F.gpg Description: application/apple-msg-attachment ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems building lambdabot on osx
From: Brandon Allbery allber...@gmail.com On Mon, Aug 8, 2011 at 21:38, Adam Turoff adam.tur...@gmail.com wrote: First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Yes, because now it's finding the system readline, which isn't actually readline (Apple ships a readline which is actually BSD editline, so you get missing symbols for things editline doesn't support such as completion). I think you'll need to temporarily deactivate MacPorts' iconv instead of using --extra-lib-dirs. This can't really be fixed by either GHC or MacPorts; there doesn't seem to be a good solution as yet, although the MacPorts folks may end up implementing a hacky solution because Apple has introduced *another* MacPorts-breaking library conflict in Lion (libnotify). Yep, this is Apple's problem and everyone else just has to put up with it. If you want to mix macports and a non-macports ghc, I think the best solution is to self-compile ghc against the macports libiconv. This is easy, just configure ghc with ./configure --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib I haven't had a problem since I started building ghc this way (10.5 and 10.6). John L. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems building lambdabot on osx
On Aug 9, 2011, at 7:17 PM, John Lato wrote: From: Brandon Allbery allber...@gmail.com Yes, because now it's finding the system readline, which isn't actually readline (Apple ships a readline which is actually BSD editline, so you get missing symbols for things editline doesn't support such as completion). I think you'll need to temporarily deactivate MacPorts' iconv instead of using --extra-lib-dirs. This can't really be fixed by either GHC or MacPorts; there doesn't seem to be a good solution as yet, although the MacPorts folks may end up implementing a hacky solution because Apple has introduced *another* MacPorts-breaking library conflict in Lion (libnotify). Yep, this is Apple's problem and everyone else just has to put up with it. Thanks. That got lambdabot happy and installed. For the record (and for the lazyweb): $ sudo port deactivate -f libiconv $ cabal install lambdabot $ sudo port activate libiconv If you want to mix macports and a non-macports ghc, I think the best solution is to self-compile ghc against the macports libiconv. This is easy, just configure ghc with ./configure --with-iconv-includes=/opt/local/include --with-iconv-libraries=/opt/local/lib I haven't had a problem since I started building ghc this way (10.5 and 10.6). I may try that with a source install for the next release of the Haskell Platform. Thanks again everyone, -- Adam ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Problems building lambdabot on osx
I've tried off and on the last couple of days to build Lambdabot on Mac OS X (before and after the upgrade from 10.6 to 10.7) and I keep running into linker errors with the 64-bit Haskell Platform (ghc 7.0.3). First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Linking dist/build/lambdabot/lambdabot ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame Undefined symbols for architecture x86_64: _rl_insert_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa5_info in libHSreadline-1.0.1.0.a(Readline.o) _rl_possible_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa7_info in libHSreadlin (full error report at http://hpaste.org/50036 ) I did manage to install readline through macports: $ port installed readline The following ports are currently installed: readline @6.2.000_0 (active) $ file /opt/local/lib/libreadline.dylib /opt/local/lib/libreadline.dylib: Mach-O 64-bit dynamically linked shared library x86_64 and I did manage to get readline installed properly by specifying the include/lib dirs from macports: cabal install readline --configure-option=--with-readline-libraries=/opt/local/lib --configure-option=--with-readline-includes=/opt/local/include and readline does work in ghci: $ ghci GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help Prelude :m + System.Console.Readline Prelude System.Console.Readline readline testing testing exit exit Just exit Prelude System.Console.Readline The only issue, which has me stumped, is that lambdabot can't seem to find the readline dependency. Adding the --with-readline options when trying to build lambdabot has no effect. Neither does adding --extra-lib-dirs=/opt/local/lib to cabal install. Anyone have a clue where to start to work around this? Would switching to ghc HEAD help here? Thanks, -- Adam ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems building lambdabot on osx
On Mon, Aug 8, 2011 at 8:38 PM, Adam Turoff adam.tur...@gmail.com wrote: I've tried off and on the last couple of days to build Lambdabot on Mac OS X (before and after the upgrade from 10.6 to 10.7) and I keep running into linker errors with the 64-bit Haskell Platform (ghc 7.0.3). First, there's the issue with linking against libiconv, which is solved this way: cabal install --extra-lib-dirs=/usr/lib That leaves a whole mess of link errors against libHSreadline: Linking dist/build/lambdabot/lambdabot ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame Undefined symbols for architecture x86_64: _rl_insert_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa5_info in libHSreadline-1.0.1.0.a(Readline.o) _rl_possible_completions, referenced from: _readlinezm1zi0zi1zi0_SystemziConsoleziReadline_zdwa7_info in libHSreadlin (full error report at http://hpaste.org/50036 ) I did manage to install readline through macports: $ port installed readline The following ports are currently installed: readline @6.2.000_0 (active) $ file /opt/local/lib/libreadline.dylib /opt/local/lib/libreadline.dylib: Mach-O 64-bit dynamically linked shared library x86_64 and I did manage to get readline installed properly by specifying the include/lib dirs from macports: cabal install readline --configure-option=--with-readline-libraries=/opt/local/lib --configure-option=--with-readline-includes=/opt/local/include and readline does work in ghci: $ ghci GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help Prelude :m + System.Console.Readline Prelude System.Console.Readline readline testing testing exit exit Just exit Prelude System.Console.Readline The only issue, which has me stumped, is that lambdabot can't seem to find the readline dependency. Adding the --with-readline options when trying to build lambdabot has no effect. Neither does adding --extra-lib-dirs=/opt/local/lib to cabal install. Anyone have a clue where to start to work around this? Would switching to ghc HEAD help here? My usually technique for solving readline-related issues is to rip-out readline from whatever I want to build, substituting in Haskeline if I want nice editing. It isn't very scientific, but I find it to be a more interesting problem to solve. I've given this a try in the Lambdabot source, but I'm getting unrelated errors building it so I'm not sure it works. Ripping out readline should be a brief bit of hacking in Plugin/OfflineRC.hs, from what I can tell. Antoine ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe