Difference between revisions of "Yhc/Building"

From HaskellWiki
< Yhc
Jump to navigation Jump to search
(I found this other link more useful.)
 
(4 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
The process of building Yhc requires [http://haskell.org/ghc/ ghc-6.4] or later and [http://darcs.net/ darcs].
 
The process of building Yhc requires [http://haskell.org/ghc/ ghc-6.4] or later and [http://darcs.net/ darcs].
   
== Getting the Code ==
+
== Getting the code ==
   
 
The source code is stored in a [http://www.darcs.net/ darcs] repo, to get the code do:
 
The source code is stored in a [http://www.darcs.net/ darcs] repo, to get the code do:
   
darcs get --partial http://darcs.haskell.org/yhc
+
darcs get --partial http://darcs.haskell.org/york-compiler98/
   
  +
{- maybe darcs get --partial http://www.cs.york.ac.uk/fp/darcs/yhc/ is more recent? -}
You can browse the code and its history on-line through a [http://darcs.haskell.org/darcsweb/darcsweb.cgi?r=yhc;a=summary darcsweb] interface.
 
   
 
There is a buildbot script that runs on every change, the results of which are available [http://www.indiegigs.co.uk:8010/ here]. If the build is busted, hopefully the developers will fix it soon. If your build is busted, but the buildbot succeeds, [[Yhc/Buildbot| consider adding your machine as a buildbot slave]] - then it will never get broken again.
 
There is a buildbot script that runs on every change, the results of which are available [http://www.indiegigs.co.uk:8010/ here]. If the build is busted, hopefully the developers will fix it soon. If your build is busted, but the buildbot succeeds, [[Yhc/Buildbot| consider adding your machine as a buildbot slave]] - then it will never get broken again.
Line 40: Line 40:
 
Please report any problems you have to the mailing list.
 
Please report any problems you have to the mailing list.
   
  +
<small>
== Scons Options ==
 
  +
Please also note that these steps do not currently build the Javascript backend; please refer to [[Yhc/Javascript/Users_guide|Yhc/Javascript/Users guide]] for information how to build '''ycr2js'''.
  +
</small>
  +
 
== Scons options ==
   
 
Options can be given to scons by either passing the flags on the command line 'core=1' or by creating a file called options.txt in the root Yhc directory. The available flags are:
 
Options can be given to scons by either passing the flags on the command line 'core=1' or by creating a file called options.txt in the root Yhc directory. The available flags are:
Line 49: Line 53:
 
* threads=0 (default=1, except on ppc where the default is 0) - disables threading
 
* threads=0 (default=1, except on ppc where the default is 0) - disables threading
   
== If Something Goes Wrong ==
+
== If something goes wrong ==
   
 
If the build fails for any reason, try the following steps:
 
If the build fails for any reason, try the following steps:
Line 57: Line 61:
   
 
Then try building again.
 
Then try building again.
  +
  +
== Build options ==
  +
  +
"scons help" shows some options for the build process.
  +
  +
To build with additional library/header paths, e.g. for GMP:
  +
  +
CCFLAGS="-I/.../include" LIBPATH=/.../lib scons

Latest revision as of 16:33, 22 October 2010

Part of Yhc

(Download)

Requirements

You need a C compiler - both gcc and MS Visual C are known to be OK.

You need scons, which in turn requires Python to be installed. We require Python 2.3 or later to be installed.

The process of building Yhc requires ghc-6.4 or later and darcs.

Getting the code

The source code is stored in a darcs repo, to get the code do:

darcs get --partial http://darcs.haskell.org/york-compiler98/
{- maybe darcs get --partial http://www.cs.york.ac.uk/fp/darcs/yhc/ is more recent? -}

There is a buildbot script that runs on every change, the results of which are available here. If the build is busted, hopefully the developers will fix it soon. If your build is busted, but the buildbot succeeds, consider adding your machine as a buildbot slave - then it will never get broken again.

Building

To build yhc simply type 'scons' into a console Window. This should automatically detect your build environment and place the Yhc binaries into inst/

To build parts of Yhc separately the following commands can be used:

  • scons configure - Just configure.
  • scons build - Don't update dependencies, just build.
  • scons build yhi - Only build the interpretor.
  • scons build yhc - Only build the compiler.
  • scons build library - Only build the libraries.

Other commands available are:

  • scons clean - Remove temporary files.
  • scons fullclean - Completely wipe everything created by the build process.
  • scons depends - Download or update the dependencies
  • scons help - Show a help message

To test Yhc has been build correctly type 'scons test'.

Please report any problems you have to the mailing list.

Please also note that these steps do not currently build the Javascript backend; please refer to Yhc/Javascript/Users guide for information how to build ycr2js.

Scons options

Options can be given to scons by either passing the flags on the command line 'core=1' or by creating a file called options.txt in the root Yhc directory. The available flags are:

  • core=1 (default=1) - generate Yhc Core files for each file in the libraries
  • arch=X86 (default=calculated) - override the arch, useful for building 32 bit version on a 64 bit kernel.
  • type=release/debug/normal (default=normal) - enables debug information or optimisation
  • threads=0 (default=1, except on ppc where the default is 0) - disables threading

If something goes wrong

If the build fails for any reason, try the following steps:

; scons fullclean
; scons depends

Then try building again.

Build options

"scons help" shows some options for the build process.

To build with additional library/header paths, e.g. for GMP:

CCFLAGS="-I/.../include" LIBPATH=/.../lib scons