[MCOL-1044] inconsistent library naming for JAVA write SDK Created: 2017-11-21  Updated: 2023-10-26  Resolved: 2017-11-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.1.3

Type: Bug Priority: Major
Reporter: David Thompson (Inactive) Assignee: David Thompson (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-23

 Description   

On CentOS 7 the java library is named _javamcsapi.so, but on Ubuntu16 it is named javamcsapi.so. This is problematic as you need to have 2 sets of instructions. There must be an issue with the cmake settings.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2017-11-21 ]

This is due to swig, either swig itself or the cmake wrapper for swig. I haven't figured out which but it will take a little bit of research to figure out. Hence the packaging workaround for now.

Comment by Andrew Hutchings (Inactive) [ 2017-11-22 ]

The SWIG wrapper in CMake < 3.0 has a bug which can add the underscore. My patch is a bit crude, basically clones two macros from CentOS 7's CMake and fixes them so they don't add the underscore. It will use the OS's CMake modules for >=3.0.

Tested in CentOS 7 and Ubuntu 16.04 and seems to work.

Comment by David Thompson (Inactive) [ 2017-11-22 ]

the java unit tests do not run on debian9. The issue is that you must reference the name of the library and at least for me on centos7 it's lib_javamcsapi.so but on deb9 its libjavamcsapi.so. So we need to get these consistent.

Comment by David Thompson (Inactive) [ 2017-11-22 ]

java/src/test/java/com/mariadb/columnstore/api/BasicTest.java. See the static init:
static

{ System.loadLibrary("_javamcsapi"); }

all being equal i'd say lets go without the underscrore.

Comment by Andrew Hutchings (Inactive) [ 2017-11-22 ]

This second patch should make the library naming consistent as "libjavamcsapi.so" across platforms and modify the test to use that.

Comment by David Thompson (Inactive) [ 2017-11-23 ]

I ran into an issue in centos but after some combo of reboot and git clean it is all fine so think my git tree was in a bad state. Think we have this resolved now!

Generated at Thu Feb 08 02:25:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.