1.5. Building XSB, Flora, and Other Common Dependencies

1.5.1. Requirements

  • A working Maven configuration that builds Sunflower
  • A fully configured Eclipse environment to develop Sunflower Studio.
  • Build environment
Platform Tool URL Notes
All CMake http://www.cmake.org/install/ (OS X) install using homebrew: brew install cmake.
All MySQL Community Server http://dev.mysql.com/downloads/mysql/ Install version 5.6.23
Macintosh Xcode App Store or http://developer.apple.com You must also install the command line tools
Windows Visual Studio Community 2013 https://www.visualstudio.com/en-us/products/visual-studio-community-vs  
Windows Git-Bash http://git-scm.com/download/win  
Linux build-essential   On Ubuntu, sudo apt-get install build-essential and then press TAB key.

1.5.2. Native Source Code

The source code for all of the Sunflower Native applications and dependencies are located in SRI’s SCM Manager Git repository. The repository is located at:

https://scm.sri.com/scm/git/ROR/sunflower-native

and can be cloned using the following command line syntax:

git clone https://<USERNAME>@scm.sri.com/scm/git/ROR/sunflower-native

the project is structured into 5 different folders.

.
├── build
├── dep-source
├── scripts
├── sunflower-native
└── sunflower-native-build

For additional details regarding the usage, management, and building of sunflower-native, refer to the README files located throughout the sunflower-native’s folder hierarchy.

1.5.3. Building Flora and XSB

  1. Ensure you have a Maven settings file configured to access Artifactory.

  2. Open a bash or git-bash shell.

  3. cd to <path>/RAVE/sunflower-native/sunflower-native.

  4. type:

    $ MVN_SETTINGS=/path/to/mvn-settings.xml ./build-fetch-deps.sh
    $ ./build-min-deps.sh 2>&1 | tee build.log
    

1.5.4. Notes

  • The build process can take anywhere from 30 minutes to over an hour.
  • Built binaries will be located in <path>/sunflower-native/sunflower-native/flserver-build/ext.
  • Do not use the build version of MySQL - it is an incomplete distribution for build purposes only.

1.5.5. Usage

To use the built versions with Sunflower, if you will need to ensure your environment is configured accordingly:

Platform Environment Variable Note
Macintosh DYLD_LIBRARY_PATH If MySQL client library is not installed in /usr/lib or /usr/local/lib, then you must define DYLD_LIBRARY_PATH=<path to MySql>/lib in .bashrc
Linux LD_LIBRARY_PATH If MySQL client library is not installed in /usr/lib or /usr/local/lib, then you must define LD_LIBRARY_PATH=<path to MySql>/lib in .bashrc
Windows Path You will need to add <path to MySQL server>/lib to your Path environment variable.