Coder Social home page Coder Social logo

alexxnica / mozart2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozart/mozart2

0.0 1.0 0.0 40.5 MB

Mozart Programming System v2

Home Page: http://mozart.github.io/

License: BSD 2-Clause "Simplified" License

CMake 1.09% C++ 24.24% Shell 0.15% Scala 4.34% Batchfile 0.01% Inno Setup 0.20% Oz 66.63% Emacs Lisp 2.92% Makefile 0.01% HTML 0.41%

mozart2's Introduction

Mozart-Oz v2

Join the chat at https://gitter.im/mozart/mozart2

The Mozart Programming System is an open source implementation of Oz 3. This repository contains the upcoming version 2 of the system.

The status of Mozart 2 is currently alpha quality. It is not ready for production, but it can be used for experimenting, testing, and obviously, for contributing.

Downloads

Binary packages for Linux, Mac OS and Windows are built from time to time and made available on SourceForge.

Mac support is provided for 10.8.x and recent versions (2.x) of Aquamacs.

The binary distribution requires that you have installed Tcl/Tk 8.5 on your system.

Build Instructions

This main Readme is shamefully biased towards Linux. Side-along Readmes are available for Mac OS, Windows, and OpenBSD.

Prerequisites

In order to build Mozart 2, you need the following tools on your computer:

  • git and Subversion to grab the source code
  • java >= 1.6.0
  • gcc >= 4.7.1 on Windows, Linux and Mac OS < 10.8; or clang >= 3.1 on Mac OS >= 10.8
  • cmake >= 2.8.6
  • Boost >= 1.53.0 (with development files)
  • Tcl/Tk 8.5 or 8.6 (with development files)
  • emacs

For building CLANG/LLVM:

  • LibXML2-dev (tested with version 2.9.3)
  • OCaml-findlib
  • libCTypes-OCaml-dev (>= 0.4 - available in Debian Unstable as of Jan. 2016)

On Linux, use your favorite package manager to grab these tools. Refer to the specialized Readmes for recommendations on Mac OS and Windows.

Pre-generated source tree

The release source snapshots contain pre-generated C++ code that allows you to build without requiring LLVM or Clang. This is the easiest way to build a version of Mozart 2 from source. The latest pre-generated source snapshot is mozart2-2.0.0-beta.0-Source.zip.

To build from the snapshot:

$ wget https://github.com/layus/mozart2/releases/download/v2.0.0-beta.0/mozart2-2.0.0-beta.0-Source.zip
$ unzip mozart2-2.0.0-beta.0-Source.zip
$ cd mozart2-2.0.0-beta.0-Source/
$ cmake .
$ make
$ make install

To change the directory where Mozart 2 is installed add -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install to the cmake command:

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/oz2 . && make && make install

If you want to work on developing Mozart 2 itself you'll probably want to regenerate the C++ headers interfacing to Oz objects at some point. In that case you should use the build instructions below.

Git Build instructions

You will need LLVM and Clang installed to build Mozart 2 from the git repository. Some Linux distros don't seem to ship the required LLVM/Clang cmake support files so the steps below go through building a local version of LLVM and Clang for the Mozart 2 build system to use. The steps below assume you are in an empty directory to build LLVM, Clang and Mozart 2:

$ mkdir oz2
$ cd oz2

Building LLVM and Clang

To build LLVM following the following steps:

$ git clone --branch release_39 https://github.com/llvm-mirror/llvm
$ cd llvm/tools
$ git clone --branch release_39 https://github.com/llvm-mirror/clang
$ cd ..
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release  \
        -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/../../llvm-install \
        ..
$ make
$ make install
$ cd ../..
$ export PATH=`pwd`/llvm-install/bin:$PATH

You may wish to add -j n to the make command line with n set to the number of CPUs to perform some of the build steps in parallel to reduce the build time.

This will install to an llvm-install directory off the root directory created previously and add it to the front of the PATH so i t can be found in the Mozart 2 build.

Clone the Mozart repository

As the Mozart repository contains submodules, you should clone recursively:

$ git clone --recursive https://github.com/mozart/mozart2

You can also fetch the submodules separately using:

$ git clone https://github.com/mozart/mozart2
$ cd mozart2
$ git submodule update --init
$ cd ..

Build Mozart

Mozart 2 is built with cmake. The following steps will perform the build:

$ mkdir build
$ cd build
$ CXXFLAGS=-I`pwd`/../llvm-install/include cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install \
        ../mozart2
$ make
$ make install

You may wish to add -j n to the make command line with n set to the number of CPUs to perform some of the build steps in parallel to reduce the build time.

Change /path/to/install to the location where Mozart 2 should be installed.

On distros like Arch Linux and Nixos, Boost static libraries have been removed. Please add -DMOZART_BOOST_USE_STATIC_LIBS=OFF to your cmake command.

Other cmake options can be given with the form -DOPTION=Value. The table below lists the options you can add.

OptionValueRequired if
CMAKE_BUILD_TYPE Debug or Release Always
CMAKE_INSTALL_PREFIX Where `make install` should install -
CMAKE_CXX_COMPILER Path to your C++ compiler Mac OS: must be forced to clang++
CMAKE_MAKE_PROGRAM Path to your make program Windows: must be forced to MinGW make
GTEST_SRC_DIR and GTEST_BUILD_DIR Paths to the source and build directories of GTest If not present, GTest will be downloaded and built automatically
LLVM_SRC_DIR and LLVM_BUILD_DIR Paths to the source and build directories of LLVM If not present, LLVM will be downloaded and built automatically
CLANG_SRC_DIR Paths to the source directory of CLANG Use this if cmake cannot find the CLANG sources
EMACS Path to the Emacs executable Required on Windows (on Unix it can be found automatically, in principle)
CPACK_GENERATOR Comma-separated list of generators for CPack Optional, see CPack documentation

There is a NixOS expression to install the Mozart2 binary: nix-env -i mozart-binary

mozart2's People

Contributors

sjrd avatar eregon avatar sjmackenzie avatar kennytm avatar layus avatar yjaradin avatar ggutierrez avatar francoisfonteyn avatar anthonygego avatar allentiak avatar mon-ouie avatar nruth avatar doublec avatar exlevan avatar dskecse avatar gdeb avatar jakepetroules avatar necrodome avatar gitter-badger avatar alexgian avatar andre-rifaut avatar suzaku avatar

Watchers

 avatar

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.