Re: Build failure under Fedora 21

On 12/01/15 04:00, Dominick Samperi wrote:
Hi Roman.
As I said in my comments I tried the binary distribution provided for CentOS65 Linux but ran into problems. I also tried the distribution provided for Debian Linux; this installed, but there were problems.
Fedora is the most "cutting edge" distro, and there is no ghc binary provided for it. I was able to build from source under Fedora 20 about a year ago.
% lsb_release -d Description: Fedora release 21 (Twenty One) % ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.3 There's no reason the binary ghc release shouldn't work for you (specifically, the deb7 one). What problems did you run into? (There's also no reason you shouldn't be able to build from source; but if all you want is just a working ghc installation, installing the bindist is much easier and faster.) Roman

Hi Roman,
Thank you for suggesting that I take another look at compiling from
source under Fedora 21. This is indeed quite straightforward
(configure --prefix=..., make, make install). The reason it failed
earlier is that I had the latest build (from HEAD) in my path:
ghc=7.11.20150111. Bootstrapping using this version of GHC is not
supported. I should have paid closer attention to the diagnostics!
After installing from the supplied binaries (for CentOS or Debian) I
ran into problems installing pandoc (cabal install pandoc). There was
an unresolved reference to libHSprimitive-0.5.4.0.so, I think.
Cheers,
Dominick
On Mon, Jan 12, 2015 at 3:34 AM, Roman Cheplyaka
On 12/01/15 04:00, Dominick Samperi wrote:
Hi Roman.
As I said in my comments I tried the binary distribution provided for CentOS65 Linux but ran into problems. I also tried the distribution provided for Debian Linux; this installed, but there were problems.
Fedora is the most "cutting edge" distro, and there is no ghc binary provided for it. I was able to build from source under Fedora 20 about a year ago.
% lsb_release -d Description: Fedora release 21 (Twenty One)
% ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.3
There's no reason the binary ghc release shouldn't work for you (specifically, the deb7 one). What problems did you run into?
(There's also no reason you shouldn't be able to build from source; but if all you want is just a working ghc installation, installing the bindist is much easier and faster.)
Roman

I also have ghc-7.8.4 builds available in https://copr.fedoraproject.org/coprs/petersen/ghc-7.8.4/ if that helps, though they replace the Fedora ghc packages. Jens

It turns out that the undefined reference to libHSprimitive-0.5.4.0.so
when installing pandoc is not related to the use of CentOS or Debian
binaries. I get the same undefined reference when I try to use
ghc-7.8.4 compiled from source under Fedora 21. Here is the output of
'locate libHSprimitive':
/home/dsamperi/.cabal/lib/primitive-0.5.4.0/ghc-7.8.4/libHSprimitive-0.5.4.0.a
/usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1-ghc7.6.3.so
/usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1.a
/usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1_p.a
So there is a .a library, but no .so (shared) lib in the build from
source. Can someone explain how to get the build process to create all
necessary shared libs?
Thanks,
Dominick
On Thu, Jan 15, 2015 at 4:55 AM, Jens Petersen
I also have ghc-7.8.4 builds available in
https://copr.fedoraproject.org/coprs/petersen/ghc-7.8.4/
if that helps, though they replace the Fedora ghc packages.
Jens

On 2015-01-17 at 09:22:05 +0100, Dominick Samperi wrote:
It turns out that the undefined reference to libHSprimitive-0.5.4.0.so when installing pandoc is not related to the use of CentOS or Debian binaries. I get the same undefined reference when I try to use ghc-7.8.4 compiled from source under Fedora 21. Here is the output of 'locate libHSprimitive':
/home/dsamperi/.cabal/lib/primitive-0.5.4.0/ghc-7.8.4/libHSprimitive-0.5.4.0.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1-ghc7.6.3.so /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1_p.a
So there is a .a library, but no .so (shared) lib in the build from source. Can someone explain how to get the build process to create all necessary shared libs?
How did you compile GHC? Iirc `primitive` isn't supposed to be built/installed/used unless you enable DPH (otherwise, it would lead to a similiar issue like https://ghc.haskell.org/trac/ghc/ticket/8919) Cheers, hvr

Hello hvr,
I compiled from the source for ghc-7.8.4 by first creating mk/build.mk
from the supplied template build.mk.sample with BuildFlavour = quick,
then the usual: ./configure --prefix=<users-home-dir>/bin/ghc-7.8.4;
make install...
Perhaps there is a different build configuration where all necessary
shared libs are created, as in the build
for ghc-7.6.3?
On Sat, Jan 17, 2015 at 3:36 AM, Herbert Valerio Riedel
On 2015-01-17 at 09:22:05 +0100, Dominick Samperi wrote:
It turns out that the undefined reference to libHSprimitive-0.5.4.0.so when installing pandoc is not related to the use of CentOS or Debian binaries. I get the same undefined reference when I try to use ghc-7.8.4 compiled from source under Fedora 21. Here is the output of 'locate libHSprimitive':
/home/dsamperi/.cabal/lib/primitive-0.5.4.0/ghc-7.8.4/libHSprimitive-0.5.4.0.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1-ghc7.6.3.so /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1_p.a
So there is a .a library, but no .so (shared) lib in the build from source. Can someone explain how to get the build process to create all necessary shared libs?
How did you compile GHC? Iirc `primitive` isn't supposed to be built/installed/used unless you enable DPH
(otherwise, it would lead to a similiar issue like https://ghc.haskell.org/trac/ghc/ticket/8919)
Cheers, hvr

Dominick Samperi wrote:
It turns out that the undefined reference to libHSprimitive-0.5.4.0.so when installing pandoc is not related to the use of CentOS or Debian binaries. I get the same undefined reference when I try to use ghc-7.8.4 compiled from source under Fedora 21. Here is the output of 'locate libHSprimitive':
/usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1-ghc7.6.3.so /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1_p.a
So there is a .a library, but no .so (shared) lib in the build from source. Can someone explain how to get the build process to create all necessary shared libs? Try adding `--enable-shared` to your cabal command to build the shared object libraries. You might have to tell cabal to reinstall your existing
/home/dsamperi/.cabal/lib/primitive-0.5.4.0/ghc-7.8.4/libHSprimitive-0.5.4.0.a primitive-0.5.4.0 or blow away your ~/.cabal and ~/.ghc directories. HTH Peter

The best way to move beyond the somewhat dated version of the Haskell
Platform that is distributed with Fedora 21 is to install the version
available at http://www.haskell.org/platform instead of the version
installed by yum. This fixes all of the shared library issues that
arise when installing pandoc. Thanks to John MacFarlane (pandoc
author) for this tip.
On Sat, Jan 17, 2015 at 7:15 AM, Peter Trommler
Dominick Samperi wrote:
It turns out that the undefined reference to libHSprimitive-0.5.4.0.so when installing pandoc is not related to the use of CentOS or Debian binaries. I get the same undefined reference when I try to use ghc-7.8.4 compiled from source under Fedora 21. Here is the output of 'locate libHSprimitive':
/usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1-ghc7.6.3.so /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1.a /usr/lib64/ghc-7.6.3/primitive-0.5.0.1/libHSprimitive-0.5.0.1_p.a
So there is a .a library, but no .so (shared) lib in the build from source. Can someone explain how to get the build process to create all necessary shared libs? Try adding `--enable-shared` to your cabal command to build the shared object libraries. You might have to tell cabal to reinstall your existing
/home/dsamperi/.cabal/lib/primitive-0.5.4.0/ghc-7.8.4/libHSprimitive-0.5.4.0.a primitive-0.5.4.0 or blow away your ~/.cabal and ~/.ghc directories.
HTH Peter
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

Hi Dominic,
On 23 January 2015 at 03:14, Dominick Samperi
The best way to move beyond the somewhat dated version of the Haskell Platform that is distributed with Fedora 21 is to install the version available at http://www.haskell.org/platform instead of the version installed by yum.
Okay, or if you only need a pandoc executable you can use my pandoc Fedora Copr repo: https://copr.fedoraproject.org/coprs/petersen/pandoc/ It is built with ghc-7.6.3 and a cabal-install-1.20 sandbox. We are currently working on updating the Fedora Rawhide development tree to ghc-7.8.4, haskell-platform-2014.2, pandoc-1.13, etc. Jens
participants (5)
-
Dominick Samperi
-
Herbert Valerio Riedel
-
Jens Petersen
-
Peter Trommler
-
Roman Cheplyaka