GithubHelp home page GithubHelp logo

ghc-alt-libc's Introduction

GHC compiled against alternative C standard libraries on Linux

This repository contains precompiled binary releases of GHC (The Glasgow Haskell Compiler) for linux using musl and uClibc instead of glibc.

These are fully bootstrapped (i.e. stage 2) GHC binaries and not cross compilers. So they will not work in a typical glibc based linux distribution. You need a complete musl/uclibc based environment to use them. Also, the binaries produced by these compilers will all depend on musl/uclibc and not work on most glibc based distros. On the other hand, statically linked binaries should work everywhere.

Downloads

How to use this

You need a complete musl/uClibc based environment. See here for an example using the experimental gentoo image based on musl.

Notes

  • Notes for the musl releases.
  • Notes for the uClibc releases.

ghc-alt-libc's People

Contributors

redneb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghc-alt-libc's Issues

Add build scripts

Hi, could you show the instructions that were used to compile these releases? Thank you!

fails to compile libraries which use ffi?

When I try to build postgresql-libpq or entropy package, the error message is as follows:

$ cabal new-build postgresql-libpq
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built (use -v for more details):
 - postgresql-libpq-0.9.4.2 (lib:postgresql-libpq) (requires build)
Starting     postgresql-libpq-0.9.4.2 (all, legacy fallback)
cabal: Failed to build postgresql-libpq-0.9.4.2. The failure occurred during
the configure step. The build process segfaulted (i.e. SIGSEGV).

This is my build environment:

  1. Built a docker image using the latest gentoo musl release from here.
  2. Installed the musl variant of ghc 8.6.4 from this repo.
  3. Downloaded musl variant of cabal from here.
  4. Tried to build my project with cabal with --keep-going. The build fails on postgresql-libpq and entropy packages.

Did you ever encounter such errors? Both these packages seem to use ffi.

P.S Thanks for the detailed docs on how to set the whole system up

docker build fail with alpine images

I tried to build a docker image using ghc-8.8.1, but result in

Error relocating /opt/ghc/lib/ghc-8.8.1/bin/ghc-pkg: set_curterm: symbol not found
890make[1]: *** [ghc.mk:993: install_packages] Error 127
891make: *** [Makefile:51: install] Error 2

Detailed logs are showed in build log.

What i miss?

Support using ld.gold as the linker

Currently, the musl based ghc binaries provided by this repo are configured using the --disable-ld-override flag, which forces ghc to be built with the GNU ld instead of ld.gold. It also instructs ghc to use GNU ld as it's linker. The reason that we do that, is because when ld.gold is used, the build process fails. Also, when ghc is built with GNU ld (so that the build succeeds) but then is instructed to use ld.gold as its linker, the binaries that it produces segfault immediately at startup.

@nh2 has filed an upstream bug that seems to describe the same issue.

No Version Detected

I was trying to use your repo to bootstrap a native musl build but I keep getting the following error

checking version of ghc... unknown
configure: error: Cannot determine the version of /home/host/.cache/kiss/proc/10671/build/ghc/ghc-bootstrap/bin/ghc.  Is it really GHC?

Using ghc-9.4.3-musl

Bootstrap aarch64?

We have aarch64 debian bindists, but none with musl. To build static binaries for aarch64, a musl GHC would be required.

It would probably be enough to bootstrap one, say, GHC-8.6.5 at least and then people can bootstrap later versions if they need to.

Doesn't run on alpine

Alpine currently doesn't even provide 32bit GHC, so this seems the only musl bootstrapped one. However, because gentoo splits ncurses into libtinfo, it requires symlink hack on musl.

One option would be to compile two versions, since ghc allows to build ncurses two ways.

Bindist doesn't install `haddock` binary

The bindist in ghc-8.6.5-x86_64-unknown-linux-musl.tar.xz doesn't appear to install haddock when installed using ./configure --prefix=โ€ฆ && make install on Alpine Linux.

I haven't checked any other bindists, so not sure if this is specific to this bindist or applies to all of them.

(I'm investigating whether these bindists can be used to add first-class Alpine/musl support to Stack, and it's looking very promising aside from this. See commercialhaskell/stack#2387 (comment).)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.