Skip to content

Instantly share code, notes, and snippets.

@pedro-w
Last active September 9, 2018 18:50
Show Gist options
  • Save pedro-w/ddda79546aa10cb6553f3423ba161e45 to your computer and use it in GitHub Desktop.
Save pedro-w/ddda79546aa10cb6553f3423ba161e45 to your computer and use it in GitHub Desktop.

Instructions for building dylan on macOS 10.13

Introduction

This is a bit tricky because

  1. opendylan-2013.2 (the latest binary for macOS) can't compile a 64-bit dylan
  2. Neither can the 2014.1 source release
  3. The Boehm garbage collector (a required dependency) is no longer available from homebrew as a universal binary

So you need to build a 32-bit version of the current git source using 2013.2 and then use that to build the 64-bit dylan. 64-bit capability is needed because Apple are soon to deprecate 32-bit binaries.

These instructions assume your downloads go into ~/Downloads and your working files are under ~/Projects/

Requirements

  • opendylan-2013.2-x86-darwin.tar.bz2 binary from opendylan.org
  • Boehm garbage collector from http://www.hboehm.info/gc/gc_source/
    • gc-7.6.4.tar.gz
    • libatomic_ops-7.6.2.tar.gz
  • Latest opendylan from github
  • Apple build tools (C compiler etc)
  • automake & autoconf (via homebrew)

Boehm Garbage Collector

  • Unpack the gc
  • Unpack libatomic_ops inside it
  • Rename it
  • Configure, make and install
    cd ~/Projects
    tar xf ~/Downloads/gc-7.6.4
    cd gc-7.6.4
    tar  xf ~/Downloads/libatomic_ops-7.6.2/tar.gz
    mv libatomic_ops-7.6.2 libatomic_ops
    ./configure --prefix=/opt/local CFLAGS="-arch i386 -arch x86_64"
    make
    sudo make install

Dylan 32-bit

  • Install 2013.2
  • git clone and dependencies
  • Build current git version 32-bit
    cd /opt/local
    sudo tar xf ~/Downloads/opendylan-2013.2-x86-darwin.tar.bz2
    cd ~/Projects
    export PATH=$PATH:/opt/local/opendylan-2013.2/bin
    git clone https://github.com/dylan-lang/opendylan.git
    cd opendylan
    ./autogen.sh
    git submodule update --init
    ./configure --build=i386-apple-darwin17.2.0 --with-gc=/opt/local --prefix=/opt/local
    make
    sudo make install

Then you can set your path to include /opt/local/opendylan/bin (in bash_profile or whatever), and go on to work with 64-bit Dylan.

    make distclean
    ./autogen.sh
    ./configure
    make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment