X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ce3b234c639f0d20b4fc60704294b0cb32d4b2cb..1c178c9855b20b64211ebea92eb9f783b875bbe1:/doc/doxygen/install.doc diff --git a/doc/doxygen/install.doc b/doc/doxygen/install.doc index b257156a11..9e165cb47a 100644 --- a/doc/doxygen/install.doc +++ b/doc/doxygen/install.doc @@ -62,7 +62,10 @@ will appear on the top of the resulting page. @subsection install_src_deps Getting the Dependencies Recompiling an official archive is not much more complex. SimGrid only uses very standard tools: - - C compiler, C++ compiler, make and friends. + - C compiler, C++ compiler, make and friends. SimGrid is rather + demanding on the compiler. We use the C++11 standard, and older + compilers tend to fail on us. It seems that g++ 5.0 or higher is + required nowadays (because of boost). - perl (but you may try to go without it) - We use cmake to configure our compilation ([download page](http://www.cmake.org/cmake/resources/software.html)). @@ -72,11 +75,12 @@ Recompiling an official archive is not much more complex. SimGrid only uses very - Max OS X: with [fink](http://www.finkproject.org/): `fink install boost1.53.nopython`, or with homebrew: `brew install boost` - Debian / Ubuntu: `apt-get install libboost-dev libboost-context-dev` - - Java (if you want to build the Java bindings): Grab a - [full JDK](http://www.oracle.com/technetwork/java/javase/downloads) + - Java (if you want to build the Java bindings): + - Mac OS X or Windows: Grab a [full JDK](http://www.oracle.com/technetwork/java/javase/downloads) + - Debian / Ubuntu: `apt-get install default-jdk` For platform-specific details, please see @ref install_cmake_mac, -@ref install_cmake_windows and @ref install_src_32bits +@ref install_cmake_windows, @ref install_java and @ref install_src_32bits @subsection install_src_fetch Getting the Sources @@ -110,8 +114,8 @@ to do so. First, you can use environment variables. For example, you can change commands before launching cmake: @verbatim -export CC=gcc-4.7 -export CXX=g++-4.7 +export CC=gcc-5.1 +export CXX=g++-5.1 @endverbatim Note that other variables are available, such as CFLAGS and CXXFLAGS to add options respectively for the C and C++ @@ -170,11 +174,10 @@ In addition to the classical cmake configuration variables, SimGrid accepts seve @li enable_maintainer_mode (ON/OFF) is only needed if you plan to modify very specific parts of SimGrid (e.g., the XML parsers and other related elements). Moreover, this adds an extra dependency on flex and flexml. - @li enable_mallocators (ON/OFF) has to be disabled when tracking memory issues within SimGrid, or the caching - mechanism used internally will fool the debuggers. + @li enable_mallocators (ON/OFF) has to be disabled when tracking memory issues within SimGrid, + or our internal memory caching mechanism will fool the debuggers. - @li enable_model-checking (ON/OFF) if you actually plan to - use the model-checking feature of SimGrid. This execution mode + @li enable_model-checking (ON/OFF) This execution gear is very usable now, but enabling this option at compile time will **hinder simulation speed** even when the model-checker is not activated at run time. @@ -255,6 +258,44 @@ with MS Visual C. cl sounds promising to fix this. If you get something working, please @ref community_contact "tell us". +@subsubsection install_java Build the Java bindings + +Once you have the [full JDK](http://www.oracle.com/technetwork/java/javase/downloads) installed +(on Debian/Ubuntu, grab the package ```default-jdk``` for that), things should be as simple as: + +~~~~{.sh} +cmake -Denable_java=ON . +make +~~~~ + +After the compilation, the file ```simgrid.jar``` is produced in the +root directory. If you only want to build the jarfile and its +dependencies, type ```make simgrid-java_jar```. It will save you the +time of building every C examples and other things that you don't need +for Java. + +** **Error: jni could not be found**. Sometimes, the build system fails +to find the JNI headers. In this case, you need to first locate them as follows: + +~~~~{.sh} +$ locate jni.h +/usr/lib/jvm/java-7-openjdk-amd64/include/jni.h +/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h +~~~~ + +Then, set the JAVA_INCLUDE_PATH environment variable to the right +path, and relaunch cmake. If you have several version of jni installed +(as above), use the right one (check the java version you use with +```javac -version```). + +~~~~{.sh} +export JAVA_INCLUDE_PATH=/usr/lib/jvm/java-8-openjdk-amd64/include/ +cmake -Denable_java=ON . +make +~~~~ + +Note that the filename ```jni.h``` was removed from the path. + @subsubsection install_src_32bits 32 bits Builds on Multi-arch Linux On a multiarch x86_64 Linux, it should be possible to compile a 32 bit