Git Product home page Git Product logo

pads's Introduction

=========================================
  Building, Intalling, and Testing
   the PADSC Compiler and Library
=========================================

  Note: these instructions use GNU make (often called gmake or make).
  Be sure that the make program you are using is GNU make before
  proceeding.  All of the gmake commands below are issued from directory
  $PADS_HOME.

  Once you have done the first two steps below, all the build
  steps can be done with one command.

    * NB: Make sure you do *not* have an 'nmake' program in your path.
      If you do, you should temporarily modify your PATH environment
      variable to remove the dir(s) that have nmake.  After performing
      an initial gmake you can restore your PATH to its previous setting.
  
  > gmake

  and all of the test steps can be done with one command,

  > gmake regress

  The detailed build and test instructions (steps 3-7)
  show you how to to build and test the library and compiler
  separately.

STEP 1: ENVIRONMENT SETUP

  Suppose you checked out the pads module in /home/fred/pads.  You must
  arrange to have env variable PADS_HOME set to this location before
  doing other steps.  Once PADS_HOME is set, you can source a DO_SETENV
  script that will set the other env variables that you will need
  (INSTALLROOT,  PATH, LD_LIBRARY_PATH, etc.).  DO_SETENV will also make
  your installation directories (rooted at INSTALLROOT) if they do not
  exist yet.

  To control the C-compiler used, do 
  > setenv CC path-to-desired-compiler
  
  Below are instructions for different kinds of shells.  You could do
  the following by hand, or add them to your shell init script.  Note:
  Use DO_SETENV rather than Q_DO_SETENV when running from the command
  line to see how the env variables that are set up.
  
  Example for csh/tcsh users:
    setenv PADS_HOME /home/fred/pads
    source $PADS_HOME/scripts/Q_DO_SETENV.tcsh
  
  Example for sh/ksh/bash users:
    export PADS_HOME=/home/fred/pads
    . $PADS_HOME/scripts/Q_DO_SETENV.sh

[OPTIONAL]: For the PADS-Galax project only, you may wish to set
   the following env variables to override their default values.

   Example for csh/tcsh users:
     setenv GALAX_HOME    /home/fred/Galax
     setenv PADSGLX_HOME  /home/fred/pads-glx/api
     setenv OCAML_LIB_DIR /home/fred/ocaml
     setenv PCRE_LIB_DIR  <location of libpcre.so version 4.5>
     setenv USE_GALAX     1

   Example for sh/ksh/bash users:
     export GALAX_HOME=/home/fred/Galax
     export PADSGLX_HOME=/home/fred/pads-glx/api
     export OCAML_LIB_DIR=/home/fred/ocaml
     export PCRE_LIB_DIR=<location of libpcre.so version 4.5>
     export USE_GALAX=1

STEP 2: INSTALL SML / SML RUNTIME

  To build the padsc compile, you need the Standard ML of NJ
  compiler (sml), version 110.59 or later.

  One the padsc compiler is built, you only require the SML runtime 
  to execute padsc.
  
  (a) Install SML

  The sml compiler and directions on how to install it are
  available from the SMLNJ installation notes page:
     http://smlnj.sourceforge.net/install/index.html.
  The SMLNJ home page may be found at:
     http://smlnj.sourceforge.net/index.html.

  The simplest thing to do is to install the entire SML.  (Advanced users
  may decide to only install the runtime and the sml startup script
  once padsc has been built.)

  (b) Put the sml startup script in your path, or
      set the environment variable SML to the
      location of this script.
  
  Example for csh/tcsh users:
    setenv SML /usr/common/sml/bin/sml
  
  Example for sh/ksh/bash users:
    export SML=/usr/common/sml/bin/sml

STEP 3: BUILD AND INSTALL libast.a

  Folks at AT&T Labs Research collect many useful C routines in a single
  library called libast.  PADS uses this library.
  
  IMPORTANT: BEFORE you issue the gmake command for libast you must:
  
    * Make sure INSTALLROOT has been set -- see step 1 above.
  
    * Make sure you do *not* have an 'nmake' program in your path.
      If you do, you should temporarily modify your PATH environment
      variable to remove the dir(s) that have nmake.  After performing
      this step, restore your PATH to its previous setting.
  
  Now issue the following gmake command:
  
  > gmake ast_lib
  
  If everything goes as planned, the following file will be installed:
  
    $PADS_HOME/ast-ast/arch/$AST_ARCH/lib/libast.a
  
  (or the equivalent library name for your architecture).

STEP 4: BUILD AND INSTALL THE PADSC LIBRARY

  > gmake padsc_lib

STEP 4B [OPTIONAL]: BUILD AND INSTALL THE PGLX LIBRARY

  For the PADS-Galax project only, you need to do:

  > gmake USE_GALAX=1 pglx_lib

STEP 5: TEST THE PADSC LIBRARY

  > gmake test_libpads

  This causes a set of regression tests for the library to be built and
  run.  If you see a message of the form

      test_foo DIFFERS

  then there is a problem with the test_foo test.

STEP 6: BUILD THE COMPILER

  > gmake padsc_comp

STEP 7: TEST THE COMPILER

  > gmake test_comp

  This causes a set of regression tests for the compiler/library to be
  built and run. If you see a message of the form

      test_foo DIFFERS

  then there is a problem with the test_foo test.

=========================================
  Rebuilding the Compiler and Libraries
=========================================

  As mentioned at the start, all of the build steps can be done
  together using:
  
  > gmake
  
  and all of the test steps can be done together using:
  
  > gmake regress

  [OPTIONAL]: Or, for the PADS-Galax project only, use

  > gmake USE_GALAX=1
  

  If you install a major upgrade to the source, you may need to do:
  
  > gmake veryclean
  
  before you do a new build.
  
=========================================
  Using the PADSC Compiler and Library
=========================================

  The padsc script is in $PADS_HOME/scripts.
  The compiler regression is a good place to look for simple examples.

pads's People

Contributors

athleens avatar

Stargazers

brian flagg avatar Karl avatar Steve avatar  avatar  avatar LU Jialin avatar Dylan McNamee avatar Brendan Zabarauskas avatar Tito Brasolin avatar Tomoki Nakamaru avatar Drew Tate avatar Alireza Rafiei avatar Andrew avatar Martin Vahi avatar Michael Goff avatar  avatar Yuval Kogman avatar  avatar  avatar Carl avatar

Watchers

Hugo Pacheco avatar Mark Wiebe avatar  avatar Chablisaren avatar James Cloos avatar  avatar Dmitry Atamanov avatar Jonathan DiLorenzo avatar David Walker avatar Dmitrii avatar zaf avatar  avatar brian flagg avatar Dheeraj Chakilam avatar

pads's Issues

Cannot compile libast.a

Hello,
I'm trying to install PADS on my laptop (Ubuntu 18.04 64bits, gcc 7.5.0)
I installed the following dependencies:

sudo apt install make libcsfml-dev ml-yacc ml-lpt gcc

Here are the commands I ran:

export PADS_HOME=$HOME/git/pads
. $PADS_HOME/scripts/Q_DO_SETENV.sh
make ast_lib

It returns me the following error message (cropped for lisibility):

./ast_stdio.h:82:15: error: conflicting types for ‘_sfio_FILE’
 #define FILE  _sfio_FILE
               ^
./ast_stdio.h:80:24: note: previous declaration of ‘_sfio_FILE’ was here
 typedef struct _sfio_s _sfio_FILE;
                        ^~~~~~~~~~
mamake [lib/libast]: *** exit code 1 making stdio_gnu.o

What should I do?
Thanks,
best regards.

Installation: make padsc_comp fails

On Ubuntu 14.04, 64 bit machine.
Following the README,

make padsc_comp

pads/padsc/comp/build-exec-45.sml tries to write in pads/lib.
(in pads/padsc/comp/main.sml, line 462 and below )

Such directory does not exist and is not created automatically, making the installation fail.

Preconditions:
a) be root
b) the $PADS_HOME directory tree with the most liberal permissions all the way down.
c) freshly checked out pads repository

  1. changed permissions all the way down with chmod 777 pads -R
  2. set correctly $PADS_HOME and $SML as specified in README
  3. ran . /home/gapag/devel/pads/scripts/Q_DO_SETENV.sh
  4. make ast_lib , creating
    • ./ast-ast/arch/linux.i386-64/src/lib/libast/libast.a
    • ./ast-ast/arch/linux.i386-64/lib/libast.a
  5. make padsc_lib , creating
    • ./ast-ast/arch/linux.i386-64/lib/libpads-g.a
    • ./ast-ast/arch/linux.i386-64/lib/libpads.a
    • ./padsc/libpads/linux.i386-64/libpads-g.a
    • ./padsc/libpads/linux.i386-64/libpads.a
  6. make test_libpads , output: http://pastebin.com/062fkE4T

seem to go fine. Until here no pads/lib directory has been created,
but libast.a and libpads.a have been created and tests seem to succeed.

7 . make padsc_comp
results in a writing error: http://pastebin.com/g1RKundm

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.