SWI-Prolog comes with ABSOLUTELY NO WARRANTY. To make sure SWI-Prolog is found on-PATH, add the following script as "logic.sh" to `/etc/profile.d/` (this should work but may depend on the system) :Īnd create the symlink corresponding to `/usr/local/logic/swipl`, linking to `/usr/local/logic/swipl/swiplexe_8.3.7` or similar. # you are still inside "swipl-devel/build" (Note that if you want to compile the Prolog-Java bridge "JPL", you will have to have a discoverable JDK on the system for testing you will need the hamcrest jar and junit jar but this is going too far now) Ninja # Compile it! A lot of energy comes out of the CPU as waste heat.Ĭtest -j 4 # Run tests concurrently 4-fold. In particular, GMP, ODBC, JPL, graphics.īuild files have been written to: /home/myuser/COMPILE/swipl-devel/build īy default the system configures all features (depending on whether the required packages these features depend on exist on the system). You may want to prepare the installation directory: # Define a shell variable with the location value If you install it in your home directory, there is no need to change to user root below. You can also install it somewhere in your home directory, or at some other place, it's up to you. Suppose we want to install SWIPL into this directory: ninja-build must have been installed (on Fedora: `dnf install ninja-build`).CMAKE must have been installed (on Fedora this is done with `dnf install cmake` but your system may have some different package tool than dnf, for example apt).Compiling manuallyīuilding is done using cmake, and it uses ninja-build to compute dependencies and build. This may have to be followed by some symlink changes or PATH modifications. To install the compilate into the configured directory, su to root, then change to the build directory and issue ninja install. The script will run the tests, which should succeed but occasionally may fail. The script needs to find the jars for hamcrest and junit in a directory called jars at the same level as the directory into which the SWI-Prolog distribution is cloned: To compile and test "JPL", the Java-Prolog bridge, you need to have a valid Java SDK on your system (Java 8 is recommended but Adopt JDK 14 seems to work too). The following jar directory exists : /home/paquette/Development/swiplmaking/swiplmaking7/jarsĪnd the hamcrest jar exists : /home/paquette/Development/swiplmaking/swiplmaking7/jars/hamcrest-2.2.jarĪnd the junit4 jar exists : /home/paquette/Development/swiplmaking/swiplmaking7/jars/junit-4.13.jar The installation directory is : /usr/local/logic/swiplexe_8.3.7 The build directory is : swipl-devel_original/build Going to build the SWI-Prolog distro in: swipl-devel_original The version string obtained from the version file is '8.3.7'įull build ordered but directory 'build' already exists in '/home/paquette/Development/swiplmaking/swiplmaking7/system/swipl-devel_original' - removing it swiprologpull.sh build system to build the SWI-Prolog distro.swiprologpull.sh clone system to download the SWI-Prolog distro/modules.
0 Comments
Leave a Reply. |