Unable to install packages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to install packages

Roland Senn
  I learned a little bit Haskell with Hugs on Windows and now I want to
develop on Linux.

I installed the Haskell Platform on Unbunto 10.10. There were no problems.
Then I tried to install Leksah with
sudo cabal install leksah --global
It failed with:
Resolving dependencies...
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/Gtk2HsSetup.hs:25:0:
      warning: #warning Setup.hs is guessing the version of Cabal. If
compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal
version 1.x.0 when building (prefixed by --ghc-option= when using the
'cabal' command)
[1 of 2] Compiling Gtk2HsSetup      (
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/Gtk2HsSetup.hs,
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/dist/setup/Gtk2HsSetup.o
)
[2 of 2] Compiling Main             (
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/Setup.hs,
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/dist/setup/Main.o )
Linking
/tmp/gtksourceview2-0.11.12661/gtksourceview2-0.11.1/dist/setup/setup ...
Configuring gtksourceview2-0.11.1...
Preprocessing library gtksourceview2-0.11.1...
Building gtksourceview2-0.11.1...
[ 1 of 13] Compiling Graphics.UI.Gtk.SourceView.Signals (
dist/build/Graphics/UI/Gtk/SourceView/Signals.hs,
dist/build/Graphics/UI/Gtk/SourceView/Signals.o )
Graphics/UI/Gtk/SourceView/Signals.chs:51:46:
     Module `System.Glib.UTFString' does not export `maybePeekUTFString'
cabal: Error: some packages failed to install:
gtksourceview2-0.11.1 failed during the building phase. The exception was:
ExitFailure 1
leksah-0.8.0.8 depends on gtksourceview2-0.11.1 which failed to install.

I searched the Internet on "gtksourceview2 maybePeekUTFString" and found
a patch:
http://www.mail-archive.com/gtk2hs-devel@.../msg00971/gtk_0_11_2-needs-glib--__-0_11_2-for-maybepeekutfstring.dpatch

As a newby with the Haskell tools, I searched the Internet on how to
install a patch.
I found dpm and I tried to install it with:

sudo cabal install dpm --global

It failed with:
configure: error: in `/tmp/terminfo-0.3.1.31936/terminfo-0.3.1.3':
configure: error: curses headers could not be found, so this package
cannot be built
See `config.log' for more details.
cabal: Error: some packages failed to install:
DPM-0.2.1 depends on terminfo-0.3.1.3 which failed to install.
darcs-2.5 depends on terminfo-0.3.1.3 which failed to install.
haskeline-0.6.3.2 depends on terminfo-0.3.1.3 which failed to install.
terminfo-0.3.1.3 failed during the configure step. The exception was:
ExitFailure 1

So after installing Haskell Platform, I only found broken packages!

What can I do to install Leksah?
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Joachim Breitner-2
Hi,

Am Samstag, den 27.11.2010, 19:13 +0100 schrieb Roland Senn:
> I installed the Haskell Platform on Unbunto 10.10. There were no
> problems. Then I tried to install Leksah

on Debian and Ubuntu it works generally to install as much as possible
from the Debian (Ubuntu) repositories. There is, for example, a
libghc6-gtksourceview2-dev package. And there is even a leksah package
on Debian, and in Ubuntu since natty.

Greetings,
Joachim

--
Joachim "nomeata" Breitner
  mail: [hidden email] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [hidden email] | http://www.joachim-breitner.de/
  Debian Developer: [hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Roland Senn
  Am 27.11.2010 19:36, schrieb Joachim Breitner:
> Hi,
> And there is even a leksah package
> on Debian, and in Ubuntu since natty.
>
> Greetings,
> Joachim
I tried:
sudo apt-get install leksah
and got:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package leksah

Has this package an other name?

Many thanks
    Roland
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Joachim Breitner-2
Hi,

Am Samstag, den 27.11.2010, 19:55 +0100 schrieb Roland Senn:

> Am 27.11.2010 19:36, schrieb Joachim Breitner:
> > Hi,
> > And there is even a leksah package
> > on Debian, and in Ubuntu since natty.
> >
> > Greetings,
> > Joachim
> I tried:
> sudo apt-get install leksah
> and got:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package leksah
>
> Has this package an other name?
no:
http://packages.ubuntu.com/search?keywords=leksah
but maybe you don’t have the universe sources active? Or are not
actually running Ubuntu natty? I don’t know much about Ubuntu myself,
sorry.

Greetings,
Joachim

--
Joachim "nomeata" Breitner
  mail: [hidden email] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [hidden email] | http://www.joachim-breitner.de/
  Debian Developer: [hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Moisei
At the Leksah website there are instructions for installing it on
Ubuntu.
   1. sudo apt-get install cabal-install
   2. sudo apt-get install libghc6-zlib-dev
   3. cabal update
   4. sudo cabal install cabal-install --global
   5. sudo apt-get install libgtk2.0-dev
   6. sudo apt-get install libgtksourceview2.0-dev
   7. sudo cabal install alex --global
   8. sudo cabal install happy --global
   9. sudo cabal install gtk2hs-buildtools --global
  10. sudo apt-get install libglade2-dev
  11. sudo cabal install glade --global
  12. sudo cabal install leksah --global


On Nov 27, 4:50 pm, Joachim Breitner <[hidden email]> wrote:

> Hi,
>
> Am Samstag, den 27.11.2010, 19:55 +0100 schrieb Roland Senn:
>
>
>
> > Am 27.11.2010 19:36, schrieb Joachim Breitner:
> > > Hi,
> > > And there is even a leksah package
> > > on Debian, and in Ubuntu since natty.
>
> > > Greetings,
> > > Joachim
> > I tried:
> > sudo apt-get install leksah
> > and got:
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > E: Unable to locate package leksah
>
> > Has this package an other name?
>
> no:http://packages.ubuntu.com/search?keywords=leksah
> but maybe you don’t have the universe sources active? Or are not
> actually running Ubuntu natty? I don’t know much about Ubuntu myself,
> sorry.
>
> Greetings,
> Joachim
>
> --
> Joachim "nomeata" Breitner
>   mail: [hidden email] | ICQ# 74513189 | GPG-Key: 4743206C
>   JID: [hidden email] |http://www.joachim-breitner.de/
>   Debian Developer: [hidden email]
>
>  signature.asc
> < 1KViewDownload
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Joachim Breitner-2
Hi,

Am Samstag, den 27.11.2010, 21:37 -0800 schrieb Moisei:

> At the Leksah website there are instructions for installing it on
> Ubuntu.
>    1. sudo apt-get install cabal-install
>    2. sudo apt-get install libghc6-zlib-dev
>    3. cabal update
>    4. sudo cabal install cabal-install --global
>    5. sudo apt-get install libgtk2.0-dev
>    6. sudo apt-get install libgtksourceview2.0-dev
>    7. sudo cabal install alex --global
>    8. sudo cabal install happy --global
>    9. sudo cabal install gtk2hs-buildtools --global
>   10. sudo apt-get install libglade2-dev
>   11. sudo cabal install glade --global
>   12. sudo cabal install leksah --global
I would not recommend using --global on Debian/Ubuntu-systems, as it
might interfere with packages installed by Debian. I recommend to not
use --global and install it into your /home (and add ~/.cabal/bin to
your PATH).

And I wonder if they really need the very latest versions of alex and
happy (Debian is one or two minor versions behind) or whether apt-get
install alex happy would suffice...

Greetings,
Joachim
--
Joachim "nomeata" Breitner
  mail: [hidden email] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [hidden email] | http://www.joachim-breitner.de/
  Debian Developer: [hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Ketil Malde-5
Joachim Breitner <[hidden email]> writes:

> I would not recommend using --global on Debian/Ubuntu-systems, as it
> might interfere with packages installed by Debian.

But 'cabal install --global' installs in /usr/local/, does it not?
And official packages (i.e. debs) put stuff in /usr, so these would be
separate.

> And I wonder if they really need the very latest versions of alex and
> happy (Debian is one or two minor versions behind) or whether apt-get
> install alex happy would suffice...

It would be nice if cabal could be aware of OS package managers, and
suggest this as an option - or be configured to just use the OS package
by default, as long as it provides the requried versions.

-k
--
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Albert Y. C. Lai
On 10-11-28 09:55 AM, Ketil Malde wrote:
> Joachim Breitner<[hidden email]>  writes:
>
>> I would not recommend using --global on Debian/Ubuntu-systems, as it
>> might interfere with packages installed by Debian.
>
> But 'cabal install --global' installs in /usr/local/, does it not?
> And official packages (i.e. debs) put stuff in /usr, so these would be
> separate.

Metadata is more important than data.

In the case of Debian/Ubuntu's GHC, both 'cabal install --global' and
'apt-get install' records in /var/lib/ghc-6.12.3/package.conf.d

If you cabal install one version and apt-get another version, sure, they
are two different records in the metadata, no immediate problem.

But how about

   cabal install --global binary
   apt-get install libghc6-binary-dev

They are the same version (at the time of writing, and assume Ubuntu
10.10) and they will fight for the unique throne of "binary-0.5.0.2" in
the metadata.

The immediate problem: they likely have different ABI hashes because
they're built differently. Suppose you

   cabal install --global binary
   (suppose it becomes binary-0.5.0.2-300339c66a688207241e4643a9e17721)
   cabal install --global I-depend-on-binary
   apt-get install libghc6-binary-dev
   (this is binary-0.5.0.2-32d59ff8fdfc79aa888e82997612374d in Ubuntu
10.10 i386 32-bit)

Now I-depend-on-binary is hosed. It was built against
binary-0.5.0.2-300339c66a688207241e4643a9e17721 but that's usurped.

OK, who would knowingly usurp his/her own binary-0.5.0.2? Of course no
one knowingly does. But everyone does it unknowingly:

   cabal install --global maccatcher
   (this brings in binary)
   apt-get install libghc6-agda-dev
   (this brings in libghc6-binary-dev)

Now maccatcher is hosed.

See also my http://www.vex.net/~trebla/haskell/sicp.xhtml

P.S. Deleting "--global" mitigates this problem but causes some other
problem. I will describe it in my article in the future.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Albert Y. C. Lai
On 10-11-29 03:15 PM, Albert Y. C. Lai wrote:
> cabal install --global binary
> apt-get install libghc6-binary-dev
>
> They are the same version (at the time of writing, and assume Ubuntu
> 10.10) and they will fight for the unique throne of "binary-0.5.0.2" in
> the metadata.

Oh bother, Debian/Ubuntu's packages are even more treacherous. They
circumvent the uniqueness checks of ghc-pkg register. They just smuggle
records into /var/lib/ghc-6.12.1/package.conf.d and call ghc-pkg
recache. This procedure allows both binary-0.5.0.2 instances to be
recorded, both as global. Ironically, ghc-pkg check does not see a problem.

But this is more corruption, not less:

> cabal install --global maccatcher
> (this brings in binary)
> apt-get install libghc6-agda-dev
> (this brings in libghc6-binary-dev)

The same problem remains. When you finally try to use binary, GHC still
picks one instance only. Depend on luck, one of maccatcher and agda is
hosed.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Ketil Malde-5

Thanks for the clarification, the SICP article was something I feel I
should have known, but did not.

It seems to me that while there are *three* ways to install stuff: apt-get
install, cabal install --global, and cabal install --user, there are
just *two* ways things get installed, globally and user(ly?).

The "obvious" solution would be to have three package.confs as well, say
"system" (/var/lib), "global" (/usr/lib?), and "user" (~/.ghc).
Is there a fundamental limitation of GHC or something that makes it
impossible to work with three package configuration files?  Or would
this not solve anything after all?  

-k

"Albert Y. C. Lai" <[hidden email]> writes:

> On 10-11-29 03:15 PM, Albert Y. C. Lai wrote:
>> cabal install --global binary
>> apt-get install libghc6-binary-dev
>>
>> They are the same version (at the time of writing, and assume Ubuntu
>> 10.10) and they will fight for the unique throne of "binary-0.5.0.2" in
>> the metadata.
>
> Oh bother, Debian/Ubuntu's packages are even more treacherous. They
> circumvent the uniqueness checks of ghc-pkg register. They just
> smuggle records into /var/lib/ghc-6.12.1/package.conf.d and call
> ghc-pkg recache. This procedure allows both binary-0.5.0.2 instances
> to be recorded, both as global. Ironically, ghc-pkg check does not see
> a problem.
>
> But this is more corruption, not less:
>
>> cabal install --global maccatcher
>> (this brings in binary)
>> apt-get install libghc6-agda-dev
>> (this brings in libghc6-binary-dev)
>
> The same problem remains. When you finally try to use binary, GHC
> still picks one instance only. Depend on luck, one of maccatcher and
> agda is hosed.
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe

--
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Unable to install packages

Albert Y. C. Lai
On 10-11-30 05:19 AM, Ketil Malde wrote:
> It seems to me that while there are *three* ways to install stuff: apt-get
> install, cabal install --global, and cabal install --user, there are
> just *two* ways things get installed, globally and user(ly?).
>
> The "obvious" solution would be to have three package.confs as well, say
> "system" (/var/lib), "global" (/usr/lib?), and "user" (~/.ghc).
> Is there a fundamental limitation of GHC or something that makes it
> impossible to work with three package configuration files?  Or would
> this not solve anything after all?

GHC is glad to take more databases, using -package-conf and
GHC_PACKAGE_PATH.
http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html#package-databases

However, all tricks of installing a million instances of binary-0.5.0.2
are in vain — GHC will still pick one instance by a priority rule and
ignore the rest.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe