Linux/Unix

'''NOTE: These instructions are out of date and mostly relevant for version 3.2 and earlier. Please see the instructions at http://gridlab-d.shoutwiki.com/wiki/MinGW/Eclipse_Installation for the most up-to-date compiling instructions.'''

Prerequisites
Depending on your platform and options you desire, you may have to install the following


 * Autoconf : Version 2.63 or higher (required)
 * Xerces-C : The appropriate version of Xerces-C is available from the third_party folder in the source tree. To install it run the install_xerces script found there.  If you wish to download the latest version of Xerces-c you can use your package manager to install xerces-c-devel.
 * Matlab : If you intend to use the Matlab link, you must have Matlab installed on your system and the matlab -e command must work from the shell prompt.
 * MySQL : If you intend to use the MySQL module, you must have MySQL Connector C version 6.0 or higher installed in the /usr/local/mysql-connector-c folder so that include/mysql.h and the lib folder are found in that folder.
 * CppUnit : If you are building GridLAB-D Version 2.x, you must have CppUnit installed from the third_party folder. Use the install_cppunit</tt> script to install it.
 * Curses : Some platforms do not come with libcurses</tt> installed by default and you will have to install it yourself before building.

The autoconf</tt> process will verify and report whether all the necessary components are installed. Typically, GridLAB-D can be built if a component is missing (the exception is Xerces) but the affected modules or core capabilities will be disabled.

Build procedure
To build on Linux and Unix systems (include Mac OSX), the command sequence is as follows:

host% git clone 🇸🇮 workdir host% cd workdir host% git checkout branch/feature host% autoreconf -isf ... a few messages ... host% ./configure ... many messages followed by the installed component report ... host% make ... huge number of messages ... ... *** will preceded final build error report ... host% sudo make install ... lots of messages ... host% gridlabd --version ... check the version ... host% cd workdir host% gridlabd --validate ... validation report ...

Fedora 23

 * 1) There is a problem in the implementation of core/object.c:findin_tree</tt> that causes the -O2</tt> GCC optimization to improperly optimize the function, causing validation to fail.  If you encounter this problem, a simple solution is to edit configure</tt> after doing autoreconf</tt> and change the four instances of -O2</tt> to -O3</tt>, do a make clean</tt> followed by make</tt> and make install</tt>.  After doing this, gridlabd --validate</tt> should pass 100% of tests.