Opened 7 years ago

Closed 7 years ago

#2802 closed bug (invalid)

Download bundle for Linux libedit2 has reference to libedit0 in editline lib

Reported by: Ashley Yakeley Owned by:
Priority: normal Milestone:
Component: Build System Version: 6.10.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

To reproduce:

  1. Download GHC 6.10.1 binary bundle for Linux x86_64 with libedit2.

Link is http://www.haskell.org/ghc/dist/6.10.1/ghc-6.10.1-x86_64-unknown-linux-libedit2.tar.bz2

  1. Install
  2. do "ghc-pkg describe editline"

Results: "extra-libraries: edit ncurses" Expected "extra-libraries: edit2 ncurses"

  1. do "cabal install haddock"

Results: "/usr/bin/ld: cannot find -ledit" Expected: success

Change History (5)

comment:1 Changed 7 years ago by Ashley Yakeley

To reproduce:

  1. Download GHC 6.10.1 binary bundle for Linux x86_64 with libedit2.

Link is http://www.haskell.org/ghc/dist/6.10.1/ghc-6.10.1-x86_64-unknown-linux-libedit2.tar.bz2[[BR]]

  1. Install
  2. do "ghc-pkg describe editline"

Results: "extra-libraries: edit ncurses"
Expected "extra-libraries: edit2 ncurses"

  1. do "cabal install haddock"

Results: "/usr/bin/ld: cannot find -ledit"
Expected: success

comment:2 Changed 7 years ago by duncan

That is not the cause of not being able to find -ledit. The shared lib name is the same for libedit.so.0 and libedit.so.2. Check that you have one of these two files installed in /usr/lib or some other dir that's on the linker path.

It's slightly odd though as if ld cannot find it, it makes one wonder how come ghc runs, given that it also links to libedit. Perhaps check the output of ldd on the ghc binary (not the shell script) to see exactly where it is finding the libedit.so.*. eg:

ldd /usr/local/lib/ghc-6.10.1/ghc-6.10.1

comment:3 Changed 7 years ago by Ashley Yakeley

Duh, you're right.

It looks like the problem is that I don't have the /usr/lib/libedit.so symlink. I only have libedit.so.2 and libedit.so.2.11. I fixed this with "sudo aptitude install libedit-dev" (on Ubuntu 8.10).

comment:4 Changed 7 years ago by duncan

Perhaps configure should check for this.

comment:5 Changed 7 years ago by igloo

  • difficulty set to Unknown
  • Resolution set to invalid
  • Status changed from new to closed

I don't think configure checking for it would be useful; it can't install a non-libedit ghc if it finds you don't have libedit. And it's hard for configure to give advice for such an OS/distro-specific problem. Also, you get a working GHC regardless; you just can't link programs that depend on the editline package.

Note: See TracTickets for help on using tickets.