GEZEL Installation Mac OS X

From Gezel2

Jump to: navigation, search

Contents

[edit] x86 architecture (Intel Mac)

[edit] Introduction

In order to compile and install gezel on an Intel Mac we first need to compile the GNU Multiple Precision Arithmetic Library. And after some simple patching it straight forward to compile and install gezel.

[edit] Compile and install libgmp (Current version: 4.2.4)

  1. Open a terminal
  2. Download gmp (http://gmplib.org/#DOWNLOAD):
    $ wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.bz2
  3. Unpack using tar and change dir:
    $ tar xfj gmp-4.2.4.tar.bz2
    $ cd gmp-4.2.4
  4. Configure:
    $ ./configure
  5. Compile:
    $ make
  6. Check:
    $ make check
  7. Install:
    $ sudo make install

[edit] Compile and install gezel (Current version: gezel-2.3)

  1. Download gezel (http://rijndael.ece.vt.edu/gezel2/index.php/Download):
    $ wget http://downloads.sourceforge.net/gezel/gezel2.3.tar.gz
  2. Unpack using tar and change dir:
    $ tar xfz gezel2.3.tar.gz
    $ cd gezel-2.3
  3. Patch:
    It is important that the newline remains in the command. The easiest way is to copy/paste the command into the terminal.
    $ sed -i -e '/^%option c++/ i\
    %option noyywrap
    ' gezel/fdl.ll
  4. Configure:
    $ ./configure --build=x86_64-apple-darwin9.5.0 --enable-standalone XCXXFLAGS=-m64 CFLAGS=-m64
  5. Compile:
    $ make
  6. Test:
    $ ./standalone/fdlsim test/gezel/euclid.fdl 30

    Should give an output of:

    cycle=0 m=912 n=28e
    cycle=22 gcd=6
  7. Install:
    $ sudo make install
You are now able to use fdlsim from the command line. The path to fdlsim should now be:
~/gezel-2.3/build/bin/fdlsim

[edit] Credits

This guide is currently maintained by Bo Stendal Sørensen, if you find any error, please edit this page or write an email to bo (at) stendal-sorensen.net

Personal tools