Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 520933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:11:49+00:00 2026-05-13T08:11:49+00:00

I’m trying to build and install readline on a i386 MacBook with Snow Leopard.

  • 0

I’m trying to build and install readline on a i386 MacBook with Snow Leopard.

I have made the following steps:

download and extract readline-6.0.tar.gz
./configure
make everything
sudo make install

I checked the examples and they appear to work (for instance rltest has support for history).
This is the output of
file libreadline.6.0.dylib :

libreadline.6.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64

I expected it to be i386 instead, but then if the examples work…

then I have installed the readline package from cabal with the following:

cabal install readline --reinstall --configure-option=--with-readline-includes="/usr/local/include" --configure-option=--with-readline-libraries="/usr/local/lib"

It appears to work: note that without the configure-options installation fails. I have used the –reinstall flag to force reinstallation since I have already made many trials.

This is the output of cabal info:

$ cabal info readline
* readline         (library)
    Synopsis:      An interface to the GNU readline library
    Latest version available: 1.0.1.0
    Latest version installed: 1.0.1.0
    Homepage:      [ Not specified ]
    Bug reports:   [ Not specified ]
    Description:   More information on readline can be found at
                   http:\/\/www.gnu.org\/directory\/readline.html.
    License:       GPL
    Maintainer:    libraries@haskell.org
    Source repo:   [ Not specified ]
    Flags:         split-base
    Dependencies:  base >=3, process -any, base <3
    Documentation: [ Not installed ]
    Cached:        Yes
    Modules:
        System.Console.Readline
        System.Console.SimpleLineEditor

Ok, it seems that I am done. No, I am not:

GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> import System.Console.Readline
Prelude System.Console.Readline> do { readline "Prompt" }
Loading package syb ... linking ... done.
Loading package base-3.0.3.1 ... linking ... done.
Loading package filepath-1.1.0.2 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.2 ... linking ... done.
Loading package unix-2.3.2.0 ... linking ... done.
Loading package directory-1.0.0.3 ... linking ... done.
Loading package process-1.0.1.1 ... linking ... done.
Loading package readline-1.0.1.0 ... linking ... <interactive>: 
/Users/macbook/.cabal/lib/readline-1.0.1.0/ghc-6.10.4/HSreadline-1.0.1.0.o: unknown symbol `_rl_basic_quote_characters'
ghc: unable to load package `readline-1.0.1.0'

Unsuprisingly, I am also unable to build packages which depend on readline (eg JHC).

Can you point me in the right direction? Tell me if you need other info.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:11:49+00:00Added an answer on May 13, 2026 at 8:11 am

    I have found the following procedure which has worked very well for me. I hope it can serve for future reference.

    As I suspected, I wasn’t correctly compiling readline. The giveaway for this was

    1. file explicity told me that the library was 64 bit
    2. as per rtperson advice, compiling a test example was illuminating: linking was failing for that.
    

    Look at the output:

    ghc --make test_readline.hs 
    Linking test_readline ...
    ld: warning: in /usr/local/lib/libreadline.dylib, file is not of required architecture
    

    So I set up to compile readline with the correct architecture, it was not guessing correctly. I simply cleaned the build dirs (make distclean), then configured passing the flag -m32 to gcc:

    ./configure CC="gcc -m32"
    

    and then rebuilt everything (make everything) and installed it (sudo make install).
    Now the filetype is encouraging:

    ~ 628 $ file /usr/local/lib/libreadline.dylib 
    /usr/local/lib/libreadline.dylib: Mach-O dynamically linked shared library i386
    

    and readline is working, at last.

    PS: you can also build the readline-1.0.1.0 package by hand, as detailed on the “Configuring cabal install readline on Snow Leopard with MacPorts” thread in the haskell-cafe mailing list on 29 dec 2009.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.