can someone give a step by step procedure on how to install clips and then clipspy in a linux environment. pip install clipspy
does not works for me as pip is not allowed in my organization. I need to build from source.
I tried python setup.py install
from clipspy-0.3.0
but compilation terminated.
gcc -pthread -B /anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /clips_core_source_630/core/ -fPIC -Ic -Itmpclips_core_source_630core -I/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/_clips.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_clips.o
build/temp.linux-x86_64-3.6/_clips.c:523:19: fatal error: clips.h: No such file or directory
#include <clips.h>
^
compilation terminated.
I understand I'll have to install clips_6.30 but there are many make files in src code
clips_core_source_630/makefiles> ls
makefile.g++ makefile.gcc makefile.lib makefile.lib++ makefile.win
I am not experienced in c/c++
technologies and not able to understand various makefiles present in clips_core_source_630
.
You can take a look at clipspy
travis installation script for a reference example.
Once you extract the CLIPS archive you can copy the makefile.lib
file in the source folder.
You then need to slightly modify the Makefile to build CLIPS as shared library. To do so, add the -fPIC
flag to the gcc
compile command. This will produce several .o
files suitable for inclusion in a library.
Use the make
command to build the sources.
You can then link the object files together to produce the library file.
ld -G *.o -o libclips.so
Once done, you can build and install clipspy
, make sure you have up-to-date cffi
and setuptools
Python modules.
python setup.py build_ext --include-dirs <clips_dir>/core/ --library-dirs <clips_dir>/core/
python setup.py install