Git Product home page Git Product logo

crystal-for-legacy-dist's Introduction

Crystal for Legacy Linux Distributions

This repository provides a Dockerfile to build [Crystal]1 for legecy Linux distributions, such as SLES 11, RHEL 6 and CentOS 6.

The bundled libgc.a with the official distribution of Crystal 0.31.0 or later needs GNU ld version 2.26 or later (ref. 2 and 3, and note that this problem has been solved). So, the main purpose of this repository is the building bdwgc under older GCC.

This build also includes all mandatory libraries to run any Crystal programs, which is not included by the official distribution.

Requirements

  • The built binary is statically linked with LLVM, but other libraries are shared linked. Required external libraries are:
    • glibc (>= 2.10),
    • libgcc (>= 3.3),
    • ncurses (libncurses.so.5), and
    • zlib (>= 1.2).
  • You need a C compiler and development files of glibc to build a crystal application.
  • You need to install Git to use shards.
  • You may need to build libraries or install development files of them if your program depends on some parts of Crystal standard libraries, for example, OpenSSL (OpenSSL, LibreSSL, etc), XML (libxml), etc.

Notes

  • The binaries are built under SLES 11.4, acknowledgement to the Docker image provided by [barebuild]4.
  • The package includes the full installation of bdwgc, libevent, pcre and libyaml, with both of shared and static libraries. But these libraies are not fully configured. For example, pcre does not built with C++ support.
    • To link your program statically, you also need the static version of glibc, which may be available from the OS repository.
  • An application built by this compiler is considered to be for your environment. It is not guaranteed to work on other environments.
    • For example, if you build an application with installed glibc 2.17, it is considered to need glibc 2.17 must be installed, not 2.10 (of the compiler's dependency).
  • You should NOT report any issues with using the package provided here, to the upstream directly. Only if you can confirm your problem with the official binary too, please refer upstream's [CONTRIBUTING]5 and [ISSUE TEMPLATE]6.

Limitations

  • Multithreading is not tested, and considered not to work (#1).
  • The make spec has not been run (#2).
  • Shards may use some new features which is not implemented in vendor-provided Git. But you can build the newer version of Git which is supported by Shards. Git is not included.
  • Built shared linked executable (and crystal compiler itself too) cannot be run with setuid bit set (ref. 7).
    • You have to remove RUNPATH (or RPATH) with chrpath command and use LD_LIBRARY_PATH to do this.
  • The compiler may not generate Position Independent Executable.

Footnotes

  1. http://crystal-lang.org

  2. https://stackoverflow.com/questions/52737698/unable-to-compile-unrecognized-relocation-0x2a-in-section-text

  3. https://github.com/crystal-lang/crystal/issues/8653

  4. https://hub.docker.com/r/barebuild/sles

  5. https://github.com/crystal-lang/crystal/blob/master/CONTRIBUTING.md

  6. https://github.com/crystal-lang/crystal/blob/master/ISSUE_TEMPLATE.md

  7. https://amir.rachum.com/blog/2016/09/17/shared-libraries/#runtime-search-path-security

crystal-for-legacy-dist's People

Contributors

lugia-kun avatar

Watchers

James Cloos avatar  avatar

crystal-for-legacy-dist's Issues

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.