Last active
June 3, 2020 19:29
-
-
Save KavenTheriault/608266d8e64fe5adb5574f6b0b336ac4 to your computer and use it in GitHub Desktop.
Build glpk_java 1.0.22 with java 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Reset | |
rm -rf /home/$USER/src | |
rm -rf /home/$USER/glpk | |
#Set JAVA_HOME | |
export JAVA_HOME=/usr/lib/jvm/default-runtime | |
#Download source code | |
mkdir -p /home/$USER/src | |
cd /home/$USER/src | |
rm -rf glpk-4.47* | |
wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz | |
tar -xzf glpk-4.47.tar.gz | |
rm -rf libglpk-java-1.0.22* | |
wget http://download.sourceforge.net/project/glpk-java/glpk-java/glpk-java-1.0.22/libglpk-java-1.0.22.tar.gz | |
tar -xzf libglpk-java-1.0.22.tar.gz | |
#Build and install GLPK | |
cd /home/$USER/src/glpk-4.47 | |
./configure --prefix=/home/$USER/glpk | |
make | |
make check | |
make install | |
#Build and install GLPK for Java | |
cd /home/$USER/src/libglpk-java-1.0.22 | |
#Remove javadoc | |
rm /home/$USER/src/libglpk-java-1.0.22/swig/glpk_javadoc.i | |
touch /home/$USER/src/libglpk-java-1.0.22/swig/glpk_javadoc.i | |
#export CPPFLAGS="-I/home/$USER/glpk/include -I/home/kaven/Downloads/jdk1.8.0_202/include/" | |
export CPPFLAGS=-I/home/$USER/glpk/include | |
export SWIGFLAGS=-I/home/$USER/glpk/include | |
export LD_LIBRARY_PATH=/home/$USER/glpk/lib | |
./configure --prefix=/home/$USER/glpk | |
make | |
make check | |
make install | |
unset CPPFLAGS | |
unset SWIGFLAGS | |
#Add this to the "VM Options in intelliJ" | |
#-Djava.library.path=/home/$USER/glpk/lib/jni |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment