ef3d96 | 2001-10-16 | Martin Nilsson | |
|
6e610b | 2013-06-20 | Martin Nilsson | | HOW TO BUILD PIKE FROM GIT
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
775245 | 2007-03-12 | Johan Sundström | | If you like to live at the bleeding edge you can download Pike from
|
6e610b | 2013-06-20 | Martin Nilsson | | git with all the latest additions from the developers. There are two
|
9a06b4 | 2002-04-08 | Mikael Brandström | | major branches in the archive, the latest stable branch and latest
|
775245 | 2007-03-12 | Johan Sundström | | development branch. Stable versions have an even minor version
number, i.e. 7.0.x, 7.2.x, 7.4.x, whereas the development branches
have an odd minor version.
|
9a06b4 | 2002-04-08 | Mikael Brandström | |
|
6e610b | 2013-06-20 | Martin Nilsson | | Keep in mind that the git versions are under heavy development and
|
c87264 | 2014-08-12 | Martin Nilsson | | have not been tested nearly as well as the official releases. You
use the code AT YOUR OWN RISK.
|
9a06b4 | 2002-04-08 | Mikael Brandström | |
|
33b795 | 2003-09-27 | H. William Welliver III | |
|
775245 | 2007-03-12 | Johan Sundström | | DEPENDENCIES
|
6e610b | 2013-06-20 | Martin Nilsson | | Building from git requires the same tools as building from a source
|
775245 | 2007-03-12 | Johan Sundström | | distribution (gnu m4, bison and a C compiler, suggested also GNU make
and libz), and then some. In addition to thosee requirements, you
need a working Pike, autoconf and gcc (to generate the dependency
files; another compiler can be used to do the actual compilation).
Not all autoconf versions meet Pike's requirements. Autoconf version
2.13 and 2.52 are known to work. Versions 2.53 through at least 2.57
are known to not work.
|
6e610b | 2013-06-20 | Martin Nilsson | | CHECKING OUT PIKE FROM GIT
|
27b6d6 | 2002-04-11 | Martin Stjernholm | |
|
6e610b | 2013-06-20 | Martin Nilsson | | 1. Get a recent version of git (1.7.2 or later).
|
27b6d6 | 2002-04-11 | Martin Stjernholm | |
|
6e610b | 2013-06-20 | Martin Nilsson | | 2. Clone the git repository with
|
9a06b4 | 2002-04-08 | Mikael Brandström | |
|
6e610b | 2013-06-20 | Martin Nilsson | | git clone git://pike-git.lysator.liu.se/pike.git
|
9a06b4 | 2002-04-08 | Mikael Brandström | |
The top-level makefile (in this directory, not the src directory) has
|
6e610b | 2013-06-20 | Martin Nilsson | | all the magic you need to build Pike directly from git. Just type
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | 'make'. It is preferable to build from the toplevel since it avoids
|
9a06b4 | 2002-04-08 | Mikael Brandström | | contaminating the source tree with object files and other generated
files.
|
3cc109 | 2002-04-06 | Mikael Brandström | | Other interesting make targets are:
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | install Compile and install in default location.
install_interactive Interactive install.
tinstall Test install, i.e. install in build directory.
verify Do a test install and run the testsuite with the
|
58ad4e | 2003-11-05 | Martin Nilsson | | installed Pike.
just_verify Run the testsuite directly with the Pike binary in
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | the build tree.
|
58ad4e | 2003-11-05 | Martin Nilsson | | run_hilfe Run hilfe without installing Pike.
pike Build only the Pike core, do not recurse into the
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | module directories.
documentation Build the reference documentation from the
source. See the refdoc subdirectory.
depend Build the files that tracks dependencies between
the source files. This is necessary to ensure
correct rebuilding if some of the source files
change, but not if you only intend to use the
|
59ecf5 | 2003-02-20 | Martin Stjernholm | | build tree once. It's not run by default.
|
692ab3 | 2003-03-21 | Martin Stjernholm | | source Prepare the source tree for compilation without
|
58ad4e | 2003-11-05 | Martin Nilsson | | the need for a preexisting installed Pike.
|
692ab3 | 2003-03-21 | Martin Stjernholm | | force_autoconfig Force a build of the configure scripts. This is
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | useful e.g. if a new module directory is added in
|
6e610b | 2013-06-20 | Martin Nilsson | | the git.
|
303843 | 2007-03-12 | Johan Sundström | | force_configure Force configure to be run (recursively).
reconfigure Remove the cached results from previous configure
runs and rerun configure recursively. If you have
installed a new library and want Pike to detect it
then the simplest way is to use this target.
|
692ab3 | 2003-03-21 | Martin Stjernholm | | dump_modules Dump the Pike modules directly in the build tree.
|
58ad4e | 2003-11-05 | Martin Nilsson | | That makes Pike load faster if it's run directly
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | from there, e.g. through the bin/pike script (see
below). These dumped modules are not used for
anything else. After this has been run once, any
changed Pike modules will be redumped
automatically by the main build targets.
|
692ab3 | 2003-03-21 | Martin Stjernholm | | undump_modules Remove any modules dumped by dump_modules, and
remove the redump step described above.
force_dump_modules Force all Pike modules to be redumped, not just
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | those whose source files have changed.
snapshot Create a snapshot export tarball.
export Create a source dist and bump up the build number
|
6e610b | 2013-06-20 | Martin Nilsson | | (if you have git write access). Please do not
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | check in the generated files.
|
692ab3 | 2003-03-21 | Martin Stjernholm | | clean Remove all the built binary files.
|
6e610b | 2013-06-20 | Martin Nilsson | | gitclean Remove all files that are generated automatically,
|
692ab3 | 2003-03-21 | Martin Stjernholm | | i.e. bring the tree back to the state as if it
|
6e610b | 2013-06-20 | Martin Nilsson | | was checked out from the git.
|
27b6d6 | 2002-04-11 | Martin Stjernholm | |
|
775245 | 2007-03-12 | Johan Sundström | |
CONFIGURE OPTIONS AND BUILD VARIABLES
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | If you want to pass arguments to the configure script (see below), the
simplest way is to use the CONFIGUREARGS variable, like this:
make CONFIGUREARGS="--prefix=/usr/local/my-pike --with-security"
The arguments passed through CONFIGUREARGS are remembered in the build
tree and reused if CONFIGUREARGS is undefined or the empty string.
You therefore don't need to repeat them every time, but you can still
change them later if you like. There's a special case for the --help
argument: If CONFIGUREARGS is set to '--help' then the help text from
the configure script is shown and nothing else is done, and the stored
CONFIGUREARGS setting isn't affected.
The build targets also creates a script 'pike' in the bin subdirectory
which runs the built Pike directly without installing it first. If
you want to use Pike this way (which is mainly useful if you update
|
6e610b | 2013-06-20 | Martin Nilsson | | from git often), you should consider doing 'make dump_modules' to make
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | it start faster.
Some options for the configure script are:
--prefix=/foo/bar if you want to install Pike in /foo/bar,
default is /usr/local.
--without-gdbm compile without gdbm support
--without-bignums disable support for large integers
--without-gmp compile without gmp support (implies
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | --without-bignums)
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | --with-rtldebug compile with runtime debug checks
--without-cdebug compile without debug symbols (-g)
--with-debug same as --with-rtldebug --with-cdebug
--without-debug same as --without-rtldebug --without-cdebug
--without-copt compile without -O2
--without-threads compile without threads support (see
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | also the section 'If It Doesn't Work' below)
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | --without-zlib compile without gzip compression libary
support
--without-dynamic-modules compile statically, no dynamic loading
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | used (makes the binary larger)
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | --without-mysql compile without mysql support
|
58ad4e | 2003-11-05 | Martin Nilsson | | --with-profiling enables profiling Pike code but slows
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | down interpreter a little
--with-poll use poll instead of select
|
58ad4e | 2003-11-05 | Martin Nilsson | | --with-dmalloc compile with memory tracking, makes Pike
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | very slow, use for debugging only.
--with-security enable internal object security system
|
775245 | 2007-03-12 | Johan Sundström | |
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | You might also want to set the following environment variables:
CFLAGS Put extra flags for your C compiler here.
CPPFLAGS Put extra flags for your C preprocessor here
(such as -I/usr/gnu/include)
LDFLAGS Put extra flags to your linker here, such as
|
f8cc4d | 2002-07-24 | Martin Stjernholm | | -L/usr/gnu/lib and -R/usr/gnu/lib
|
27b6d6 | 2002-04-11 | Martin Stjernholm | |
MANUAL BUILDING
Instructions if you want to do the build more manually:
1. cd src ; ./run_autoconfig
|
ef3d96 | 2001-10-16 | Martin Nilsson | | This creates configure files and Makefile.in files.
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | 2. Create a build directory an cd to it. Do NOT build in the source
|
73c4fb | 2001-11-05 | Martin Nilsson | | dir, doing so will make it impossible to do 'make export' later.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | 3. Run the newly created configure file located in the src dir from
|
73c4fb | 2001-11-05 | Martin Nilsson | | the build dir. Make sure to use an absolute path! This creates the
Makefiles you need, e.g. Makefile from Makefile.in and machine.h
from machine.h.in. If you don't use an absolute path the debug
information will be all warped...
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
58ad4e | 2003-11-05 | Martin Nilsson | | 4. If needed, edit config.h and Makefile to suit your purposes. We
|
67f820 | 2002-04-11 | Johan Sundström | | have tried to make it so that you don't have to change config.h or
|
3a2675 | 2002-02-15 | Johan Sundström | | Makefile at all. If you need to do what you consider 'unnecessary
changes' then mail us and we'll try to fit it into configure. If
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | possible, use gnu make, gcc, gnu sed and bison.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
58ad4e | 2003-11-05 | Martin Nilsson | | 5. Run 'make'
This builds Pike.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
58ad4e | 2003-11-05 | Martin Nilsson | | 6. Optionally, run 'make verify' to check that the compiled driver
|
73c4fb | 2001-11-05 | Martin Nilsson | | works as it should (might be a good idea). This will take a little
|
3a2675 | 2002-02-15 | Johan Sundström | | time and use quite a lot of memory, because the test program is
|
73c4fb | 2001-11-05 | Martin Nilsson | | quite large. If everything works out fine no extra messages are
written.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
58ad4e | 2003-11-05 | Martin Nilsson | | 7) If you want to install Pike, write 'make install'. This will put
your Pike in <prefix>/pike/<version>/. This way, you can install
many Pike versions in parallell on the system if you want to. To
put it below <prefix> directly, as other packages usually do, run
'make INSTALLARGS="--traditional" install' instead.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | After doing this, DO NOT commit the generated files. They are placed
|
6e610b | 2013-06-20 | Martin Nilsson | | in .gitignore files so you shouldn't have to bother with them.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
27b6d6 | 2002-04-11 | Martin Stjernholm | |
IF IT DOESN'T WORK
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
o Try again.
|
58ad4e | 2003-11-05 | Martin Nilsson | | o Try running 'make depend'.
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | o Your sh might be too buggy to run ./configure (this is the case on
A/UX). Try using bash, zsh or possibly ksh. To use bash, first
run /bin/sh and type:
|
ef3d96 | 2001-10-16 | Martin Nilsson | | $ CONFIG_SHELL=full_path_for_bash
$ export CONFIG_SHELL
$ $CONFIG_SHELL ./configure
|
73c4fb | 2001-11-05 | Martin Nilsson | | o If you are not using GNU make, compile in the source dir rather
than using a separate build dir.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
73c4fb | 2001-11-05 | Martin Nilsson | | o ./configure relies heavily on sed, if you have several sed in your
|
3a2675 | 2002-02-15 | Johan Sundström | | path try another sed (preferably gnu sed).
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
73c4fb | 2001-11-05 | Martin Nilsson | | o configure might have done something wrong, check machine.h and
|
3a2675 | 2002-02-15 | Johan Sundström | | report any errors back to us.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
73c4fb | 2001-11-05 | Martin Nilsson | | o Your gmp/gdbm libraries might not be working or incorrectly
|
3a2675 | 2002-02-15 | Johan Sundström | | installed; start over by running configure with the appropriate
|
73c4fb | 2001-11-05 | Martin Nilsson | | --without-xxx arguments. Also note that threads might give
problems with I/O and signals. If so you need to run configure
--without-threads.
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
3a2675 | 2002-02-15 | Johan Sundström | | o Try a different compiler, malloc, compiler-compiler and/or make
(if you have any other).
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
BUGS
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | If you find a bug in the interpreter, typically if Pike dumps core,
the first thing to do is to make sure it is compiled with the
--with-rtldebug configure flag. If not, reconfigure and recompile
with that and see if you get another error. When you've done this,
please report the bug to us at http://community.roxen.com/crunch/ and
include as much as you can muster of the following:
|
ef3d96 | 2001-10-16 | Martin Nilsson | |
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | o The Pike version. (Try pike --version or look in src/version.h)
|
ef3d96 | 2001-10-16 | Martin Nilsson | | o What kind of system hardware/software you use (OS, compiler, etc.)
|
73c4fb | 2001-11-05 | Martin Nilsson | | o The piece of code that crashes or bugs, preferably in a very
|
58ad4e | 2003-11-05 | Martin Nilsson | | small Pike-script with the bug isolated. Please send a complete
|
27b6d6 | 2002-04-11 | Martin Stjernholm | | running example of something that causes the bug.
|
ef3d96 | 2001-10-16 | Martin Nilsson | | o A description of what it is that bugs and when.
|
3a2675 | 2002-02-15 | Johan Sundström | | o If you know how, then also give us a backtrace and dump of vital
|
73c4fb | 2001-11-05 | Martin Nilsson | | variables at the point of crash.
|
3a2675 | 2002-02-15 | Johan Sundström | | o Or, if you found the error and corrected it, just send us the
|
73c4fb | 2001-11-05 | Martin Nilsson | | bugfix along with a description of what you did and why.
|