Can't install on Ubuntu 14.04. #39

Closed
Rmano opened this Issue Mar 10, 2015 · 8 comments

Comments

Projects
None yet
5 participants

Rmano commented Mar 10, 2015

Hi, I tried to install and test hoodle on Ubunut 14.04 but I can't go past an error.
I had to add some package to the list of pre-install requirements:

sudo apt-get install libgtk2.0-dev librsvg2-dev libpoppler-glib-dev libgd2-xpm-dev pdftk  ghc alex happy cabal-install gtk2hs-buildtools libghc-cairo-dev 
cabal update 
cabal install gtk2hs-buildtools
cabal install hoodle

But (after a looong while) the compilation stopped with

Resolving dependencies...
Failed to install cairo-0.13.1.0
Failed to install glib-0.13.1.0
cabal: Error: some packages failed to install:
cairo-0.13.1.0 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.18 but no
suitable version is installed.)
gio-0.13.0.4 depends on glib-0.13.1.0 which failed to install.
glib-0.13.1.0 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.18 but no
suitable version is installed.)
gtk-0.13.4 depends on glib-0.13.1.0 which failed to install.
hoodle-0.4.0 depends on glib-0.13.1.0 which failed to install.
hoodle-core-0.15.0 depends on glib-0.13.1.0 which failed to install.
hoodle-publish-0.2.0 depends on glib-0.13.1.0 which failed to install.
hoodle-render-0.5.0 depends on glib-0.13.1.0 which failed to install.
pango-0.13.0.5 depends on glib-0.13.1.0 which failed to install.
poppler-0.13 depends on glib-0.13.1.0 which failed to install.
svgcairo-0.13.0.2 depends on glib-0.13.1.0 which failed to install.

...Ubuntu LTS come with libghc-cairo-dev 0.12.4.

Is there a workaround for this?
Thanks

@Rmano Rmano changed the title from Can't install on Ubunut 14.04. to Can't install on Ubuntu 14.04. Mar 10, 2015

tormec commented May 26, 2015

Same issue.
Using Synaptic I installed "cabal-install" version 1.16 but it wasn't sufficient.
So, from https://www.haskell.org/cabal/download.html I installed the last version, but it didn't solve the problem because now I get:

Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /tmp/cairo-0.13.1.0-3838/cairo-0.13.1.0/SetupWrapper.hs, /tmp/cairo-0.13.1.0-3838/cairo-0.13.1.0/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /tmp/cairo-0.13.1.0-3838/cairo-0.13.1.0/Setup.hs, /tmp/cairo-0.13.1.0-3838/cairo-0.13.1.0/dist/setup/Main.o )
Linking /tmp/cairo-0.13.1.0-3838/cairo-0.13.1.0/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring cairo-0.13.1.0...
setup: The program 'gtk2hsC2hs' version >=0.13.12 is required but the version
found at /usr/bin/gtk2hsC2hs is version 0.13.6
Failed to install cairo-0.13.1.0
[1 of 2] Compiling SetupWrapper     ( /tmp/glib-0.13.1.0-3838/glib-0.13.1.0/SetupWrapper.hs, /tmp/glib-0.13.1.0-3838/glib-0.13.1.0/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /tmp/glib-0.13.1.0-3838/glib-0.13.1.0/Setup.hs, /tmp/glib-0.13.1.0-3838/glib-0.13.1.0/dist/setup/Main.o )
Linking /tmp/glib-0.13.1.0-3838/glib-0.13.1.0/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring glib-0.13.1.0...
setup: The program 'gtk2hsC2hs' version >=0.13.12 is required but the version
found at /usr/bin/gtk2hsC2hs is version 0.13.6
Failed to install glib-0.13.1.0
cabal: Error: some packages failed to install:
cairo-0.13.1.0 failed during the configure step. The exception was:
ExitFailure 1
gio-0.13.1.0 depends on glib-0.13.1.0 which failed to install.
glib-0.13.1.0 failed during the configure step. The exception was:
ExitFailure 1
gtk-0.13.6 depends on glib-0.13.1.0 which failed to install.
hoodle-0.4.0 depends on glib-0.13.1.0 which failed to install.
hoodle-core-0.15.0 depends on glib-0.13.1.0 which failed to install.
hoodle-publish-0.2.0 depends on glib-0.13.1.0 which failed to install.
hoodle-render-0.5.0 depends on glib-0.13.1.0 which failed to install.
pango-0.13.1.0 depends on glib-0.13.1.0 which failed to install.
poppler-0.13 depends on glib-0.13.1.0 which failed to install.
svgcairo-0.13.0.3 depends on glib-0.13.1.0 which failed to install.

tormec commented May 26, 2015

I've executed these steps:
https://www.haskell.org/downloads/linux
then I've executed

cabal install hoodle

and long after wards I've got:

[...]
cabal: Error: some packages failed to install:
hoodle-0.4.0 depends on poppler-0.13 which failed to install.
hoodle-core-0.15.0 depends on poppler-0.13 which failed to install.
hoodle-publish-0.2.0 depends on poppler-0.13 which failed to install.
hoodle-render-0.5.0 depends on poppler-0.13 which failed to install.
poppler-0.13 failed during the configure step. The exception was:
ExitFailure 1

so I've done:

cabal install poppler

but

Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /tmp/poppler-0.13-801/poppler-0.13/SetupWrapper.hs, /tmp/poppler-0.13-801/poppler-0.13/dist/setup/SetupWrapper.o )

/tmp/poppler-0.13-801/poppler-0.13/SetupWrapper.hs:118:28: Warning:
    In the use of ‘configCompiler’
    (imported from Distribution.Simple.Configure):
    Deprecated: "'configCompiler' is deprecated. Use 'configCompilerEx' instead."
[2 of 2] Compiling Main             ( /tmp/poppler-0.13-801/poppler-0.13/dist/setup/setup.hs, /tmp/poppler-0.13-801/poppler-0.13/dist/setup/Main.o )
Linking /tmp/poppler-0.13-801/poppler-0.13/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )

Gtk2HsSetup.hs:161:28:
    Couldn't match expected type ‘IO
                                    (Distribution.InstalledPackageInfo.InstalledPackageInfo_
                                       ModuleName)’
                with actual type ‘FilePath
                                  -> PackageDB
                                  -> IO Distribution.InstalledPackageInfo.InstalledPackageInfo’
    Probable cause: ‘generateRegistrationInfo’ is applied to too few arguments
    In a stmt of a 'do' block:
      installedPkgInfoRaw <- generateRegistrationInfo
                               verbosity pkg lib lbi clbi inplace distPref
    In the expression:
      do { installedPkgInfoRaw <- generateRegistrationInfo
                                    verbosity pkg lib lbi clbi inplace distPref;
           dllsInScope <- getSearchPath >>= (filterM doesDirectoryExist)
                          >>= getDlls;
           let libs = fixLibs dllsInScope (extraLibraries installedPkgInfoRaw)
               installedPkgInfo = ...;
           case () of {
             _ | modeGenerateRegFile -> die "Generate Reg File not supported"
               | modeGenerateRegScript -> die "Generate Reg Script not supported"
               | otherwise
               -> registerPackage
                    verbosity installedPkgInfo pkg lbi inplace packageDbs } }

Gtk2HsSetup.hs:162:63:
    Couldn't match type ‘[Char]’ with ‘Bool’
    Expected type: Bool
      Actual type: FilePath
    In the 7th argument of ‘generateRegistrationInfo’, namely
      ‘distPref’
    In a stmt of a 'do' block:
      installedPkgInfoRaw <- generateRegistrationInfo
                               verbosity pkg lib lbi clbi inplace distPref
Failed to install poppler-0.13
cabal: Error: some packages failed to install:
poppler-0.13 failed during the configure step. The exception was:
ExitFailure 1
Owner

wavewave commented May 27, 2015

The current version of poppler is not compatible with ghc 7.10 and the newest version of cabal-install. I have fixed some issues (I am also a maintainer of haskell poppler library) but didn't upload the newest version yet. I will test builds on other version of ghc and cabal and upload it soon.

ocharles commented Sep 7, 2015

Is there any progress on 7.10 support?

zenny commented Sep 25, 2015

Yep, this is the bottlneck! :(

Owner

wavewave commented Sep 26, 2015

I've uploaded the newest version on hackage (0.13.1) which is compatible with ghc-7.10. Would you try to install it after cabal update? Thanks!

tormec commented Dec 12, 2015

Beat the drums! Blow the horns! Finally hoodle-0.4.0 on my Xubuntu 14.04!!

In my case, was very important to set:

if [ -d "$HOME/.cabal/bin" ] ; then
    PATH="$HOME/.cabal/bin:$PATH"
fi

in my .profile, since cabal install installs executables in $HOME/.cabal/bin while some old fles are in /usr/bin so it's important the order (see the difference):
PATH="$HOME/.cabal/bin:$PATH"
PATH="$PATH:$HOME/.cabal/bin"
Remeber to log-out / log-in in order to applay the new path.

Further info here http://stackoverflow.com/questions/10197712/how-to-upgrade-gtk2hsc2hs

Then:
cabal update
cabal install gtk2hs-buildtools
cabal install glib-0.13.2.1
cabal install poppler-0.13.1
cabal install hoodle

Owner

wavewave commented Dec 13, 2015

Thanks for the success report! So with correct dependencies, this shows that hoodle is installable on ubuntu 14.04.

Eventually, I will use stack for hoodle and register it to stackage, and then I hope that the installation will be much easier than now.

@wavewave wavewave closed this Dec 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment