z0w0/helm

Installation instructions fail on Fedora 20.

davidmason opened this issue · 5 comments

I've been following the Linux installation instructions at with a clean Fedora 20 install, and I've hit a few issues with cabal complaining of missing dependencies (alex and happy). I got them working by running cabal install alex and cabal install happy before installing gtk2hs-buildtools, but I have hit some similar issues with cabal install helm.

I'll keep working through it until I get helm working, then make a pull request with updated instructions.

z0w0 commented

Cheers. Can you post exactly what issues you've had with regards to the second part of the installation (running cabal install helm)?

setup is complaining that it can't find cairo, glib-2.0 and sdl2:

  • The pkg-config package 'cairo' version >=1.2.0 is required but it could not be found.
  • The pkg-config package 'glib-2.0' is required but it could not be found.
  • The pkg-config package 'sdl2' version >=2.0.3 is required but it could not be found.

I have used yum to successfully install the packages for cairo and sdl2 at least. The steps I have gone through so far are roughly:

yum install ghc  # gives 7.6.3
yum install cairo  # already has 1.13.1
yum install SDL2  # gives 2.0.3-1
yum install pango  # already has 1.36.1
yum install cabal-install
cabal update
# tried cabal install gtk2hs-buildtools here but it failed
cabal install alex
cabal install happy
cabal install gtk2hs-buildtools
cabal install helm  # gives the output below
cabal install helm
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /tmp/cairo-0.12.5.3-18328/cairo-0.12.5.3/SetupWrapper.hs, /tmp/cairo-0.12.5.3-18328/cairo-0.12.5.3/dist/setup/SetupWrapper.o )

/tmp/cairo-0.12.5.3-18328/cairo-0.12.5.3/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/cairo-0.12.5.3-18328/cairo-0.12.5.3/dist/setup/setup.hs, /tmp/cairo-0.12.5.3-18328/cairo-0.12.5.3/dist/setup/Main.o )
Linking /tmp/cairo-0.12.5.3-18328/cairo-0.12.5.3/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.12.5.3...
setup: The pkg-config package 'cairo' version >=1.2.0 is required but it could
not be found.
Failed to install cairo-0.12.5.3
[1 of 2] Compiling SetupWrapper     ( /tmp/glib-0.12.5.4-18328/glib-0.12.5.4/SetupWrapper.hs, /tmp/glib-0.12.5.4-18328/glib-0.12.5.4/dist/setup/SetupWrapper.o )

/tmp/glib-0.12.5.4-18328/glib-0.12.5.4/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/glib-0.12.5.4-18328/glib-0.12.5.4/dist/setup/setup.hs, /tmp/glib-0.12.5.4-18328/glib-0.12.5.4/dist/setup/Main.o )
Linking /tmp/glib-0.12.5.4-18328/glib-0.12.5.4/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.12.5.4...
setup: The pkg-config package 'glib-2.0' is required but it could not be
found.
Failed to install glib-0.12.5.4
Configuring sdl2-1.1.0...
cabal: The pkg-config package 'sdl2' version >=2.0.3 is required but it could
not be found.
Failed to install sdl2-1.1.0
cabal: Error: some packages failed to install:
cairo-0.12.5.3 failed during the configure step. The exception was:
ExitFailure 1
glib-0.12.5.4 failed during the configure step. The exception was:
ExitFailure 1
helm-0.6.1 depends on sdl2-1.1.0 which failed to install.
pango-0.12.5.3 depends on glib-0.12.5.4 which failed to install.
sdl2-1.1.0 failed during the configure step. The exception was:
ExitFailure 1

I got cabal install helm working: I needed to install the 'devel' packages for cairo, pango and SDL2:

yum install cairo-devel
yum install SDL2-devel
yum install pango-devel
cabal install helm
...
Registering helm-0.6.1...
Installed helm-0.6.1

You will have to install many *-devel packages to compile most things that use bindings. This can be frustrating sometimes as Fedora packages may differ from what they're named on Debian or Arch based systems. rpmfind can search similar to yum provides, but more broadly, which makes finding packages much easier when this is the case. (Fellow Fedora user here.)

Glad you got it compiling. Just thought I'd give some advice to make possible problems in the future easier to solve.

z0w0 commented

Yeah the dependencies for the engine are in a pretty annoying state currently.

I've said it time and time again, but once we move to OpenGL this won't be such a big problem. The problem is having something as a detailed as the Cairo rendering engine is going to take a long, long time.