Can not create libCLIPSJNI.so

29 views
Skip to first unread message

Руслан Сорокин

unread,
May 7, 2022, 10:53:57 AM5/7/22
to CLIPSESG
Hi,
Downloaded and unzip clips_jni_640.zip.
Tried to run: make -f makefile.lnx mint from CLIPSJNI directory.
Got this error: make: *** No rule to make target 'mint'.  Stop.
Tried this: make -f makefile.lnx
Successfully.
Did not find libCLIPSJNI.so file anywhere.
What to do?

Thanks in advance.

Sincerely,
Ru

CLIPS Support

unread,
May 7, 2022, 1:00:23 PM5/7/22
to CLIPSESG

These are the relevant instructions for building the library from the Interfaces Guide:

7.6.3 Creating the Native Library On Linux

Launch the Terminal application (as described in section 7.2). Set the directory to the CLIPSJNI/ library-src directory (using the cd command).

To create a native library, enter the following command (where <distribution> is either ubuntu, fedora, debian, mint, or centos):

make -f makefile.lnx <distribution>

Once you have create the shared library, copy the libCLIPSJNI.so file from the CLIPSJNI/library-src to the top-level CLIPSJNI directory.

So you need to be in the CLIPSJNI/library-src directory to build libCLIPSJNI.so, not in CLIPSJNI. Issuing the make command in CLIPSJNI will build the jar files.

Руслан Сорокин

unread,
May 8, 2022, 3:40:02 AM5/8/22
to CLIPSESG
Thank you very much! My fault. But this is a thin thing. A file with a same name in a different folder. I examined the file makefile.lnx in CLIPSJNI folder and wondere that nowhere is mentioned "mint" or ".so".

суббота, 7 мая 2022 г. в 20:00:23 UTC+3, CLIPS Support:

CLIPS Support

unread,
May 8, 2022, 3:04:20 PM5/8/22
to CLIPSESG
The makefile in CLIPSJNI directory builds the Java source code and the one in library-src directory builds the shared library from the C source code. The location of the JNI header files referenced by the C source code is not the same for all linux distributions, so the makefile for the library needs to know which Linux distribution is being used, whereas the makefile for the Java code does not. The CLIPSJNI library is referenced and loaded within the Java code which is why you don't see any reference to it in the Java makefile.
Reply all
Reply to author
Forward
0 new messages