Stardog-admin server can't find starrocks library but it's on disk (M1 Mac)

Hello,
I'm trying to get stardog server running on M1 Mac.

I followed the instructions on:

To install an x86 JDK using rosetta.

But I'm getting this Failed to load any starrocks library error.
Even though I have the .so and .lib files here

/opt/stardog/stardog-8.1.1/lib
MSVCP140.dll
Starrocks.dll
VCRUNTIME140.dll
libStarrocks-CentOS-7.so
libStarrocks.dylib
libStarrocks.so

What am I missing?
Thanks

stardog-admin server start
ERROR 2022-11-23 18:51:05,639 [main] com.stardog.starrocks.StarrocksUtils:loadLibrary(73): Failed to load any starrocks library
ERROR 2022-11-23 18:51:05,642 [main] com.stardog.starrocks.StarrocksUtils:loadLibrary(75): Failed to load Starrocks
java.lang.UnsatisfiedLinkError: no Starrocks in java.library.path: [/opt/stardog/stardog-8.1.1/bin/../lib]
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673) ~[?:?]
	at java.lang.Runtime.loadLibrary0(Runtime.java:830) ~[?:?]
	at java.lang.System.loadLibrary(System.java:1873) ~[?:?]
	at com.stardog.starrocks.StarrocksUtils.loadLibrary(StarrocksUtils.java:63) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog.<init>(Stardog.java:167) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog.<init>(Stardog.java:65) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:672) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:177) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:43) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.admin.CLI.main(CLI.java:168) [stardog-cli-8.1.1.jar:?]
ERROR 2022-11-23 18:51:05,648 [main] com.stardog.starrocks.StarrocksUtils:dumpLibraryInformation(115): Unable to load native library(Starrocks):
java.library.path = </opt/stardog/stardog-8.1.1/bin/../lib>
LD_LIBRARY_PATH = {/opt/stardog/stardog-8.1.1/bin/../lib}
java.lang.UnsatisfiedLinkError: no Starrocks in java.library.path: [/opt/stardog/stardog-8.1.1/bin/../lib]
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673) ~[?:?]
	at java.lang.Runtime.loadLibrary0(Runtime.java:830) ~[?:?]
	at java.lang.System.loadLibrary(System.java:1873) ~[?:?]
	at com.stardog.starrocks.StarrocksUtils.loadLibrary(StarrocksUtils.java:63) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog.<init>(Stardog.java:167) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog.<init>(Stardog.java:65) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:672) [stardog-8.1.1.jar:?]
	at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:177) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:43) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56) [stardog-cli-8.1.1.jar:?]
	at com.complexible.stardog.cli.admin.CLI.main(CLI.java:168) [stardog-cli-8.1.1.jar:?]
Failed to load any starrocks library

Jeroen,

Our upcoming 8.2 release is the first to include an M1 compatible libStarrrocks. The immediate alternative is to install Apple's Rosetta software that emulates an x86_64 on the M1 hardware.

Today is a holiday in the U.S. Later today or tomorrow I might be able to build an 8.1.1 library for you. I will be in touch.

Matthew

I have reread your original post and see you may already have Rosetta. My guess is that you have an M1 native Java, not an x86_64 built Java installed. An M1 Java requires and M1 library. Rosetta only applies to the entire process space, not per library.

If this is correct, you can either install an x86_64 Java instead of M1 Java ... or wait until I have time this afternoon or tomorrow to build an 8.1.1 M1 library.

Matthew

Hi @matthewv, thanks for your reply and generous offer to build 8.1.1 library.
I neglected to mention I followed the more specific instructions on this other page:

i.e.

softwareupdate --install-rosetta

arch -x86_64 /bin/zsh -c "brew tap adoptopenjdk/openjdk && brew install adoptopenjdk11"

java -version
openjdk version "11.0.17" 2022-10-18 LTS
OpenJDK Runtime Environment Microsoft-6841889 (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-6841889 (build 11.0.17+8-LTS, mixed mode)

Unless I'm missing something, it looks like I might need to wait for your 8.1.1 M1 library.

With gratitude on this day of thanks. :pray:t4:

Jeroen

Jeroen,

Thank you for the added details. Sadly those details do not match what I expected. But then I have never spent time with a "mixed mode" build.

Attached is a fresh build of the library on an M1 machine that does not have Rosetta installed. Going to be the closest thing to "pure M1" as I know how to create. Here is the output from executing Apple's file command against the build:

file libStarrocks.dylib
libStarrocks.dylib: Mach-O 64-bit dynamically linked shared library arm64

... hmm ... one moment as I figure out how to make the upload work ...

Matthew

Jeroen,

I am not going to get an official Stardog download location quickly. Here is an unofficial site with this unofficial build:

https://www.matthewv.com/download/libStarrocks.dylib

md5 libStarrocks.dylib
MD5 (libStarrocks.dylib) = ef235e6a0e1cc6fc78c7ac1dbefe2952

Matthew

Awesome!

I'll let you know if I get this to work.
Many thanks.

Jeroen

Alas, when I try to download the file I get an error.

Please upload here:
https://drive.google.com/drive/folders/1jjNXflwqQlbY6plTKlP7zhwzTt-kOZEN?usp=sharing

Thanks again.

No clue why that is happening. The server in question is eight feet from me, not drive.google.com.

I have added a second copy that is renamed in case this is a security issue with .dylib / binary downloads: libStarrocks_dylib.txt. Same md5

It is a 12Mbyte file. Might be able to email. You could use direct message on this site to send me an email address to try.

Again it took a couple of rereads before I realized you were offering me the google drive. I have copied the file there.

I see you uploaded it to my google drive.
I downloaded it and will let you know how it goes.
Thanks again.

Hi @matthewv,
that worked!

stardog-admin server start
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.assistedinject.FactoryProvider2 (file:/opt/stardog/stardog-8.1.1/client/api/guice-assistedinject-4.2.3.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of com.google.inject.assistedinject.FactoryProvider2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

************************************************************
This copy of Stardog is licensed to Jeroen Lapre (jeroen.lapre@gmail.com), Distant Galaxy
This is a Enterprise license
This license will expire in 181 days on Wed May 24 19:28:17 PDT 2023
************************************************************

                                                             :;
                                      ;;                   `;`:
  `'+',    ::                        `++                    `;:`
 +###++,  ,#+                        `++                    .
 ##+.,',  '#+                         ++                     +
,##      ####++  ####+:   ##,++` .###+++   .####+    ####++++#
`##+     ####+'  ##+#++   ###++``###'+++  `###'+++  ###`,++,:
 ####+    ##+        ++.  ##:   ###  `++  ###  `++` ##`  ++:
  ###++,  ##+        ++,  ##`   ##;  `++  ##:   ++; ##,  ++:
    ;+++  ##+    ####++,  ##`   ##:  `++  ##:   ++' ;##'#++
     ;++  ##+   ###  ++,  ##`   ##'  `++  ##;   ++:  ####+
,.   +++  ##+   ##:  ++,  ##`   ###  `++  ###  .++  '#;
,####++'  +##++ ###+#+++` ##`   :####+++  `####++'  ;####++`
`####+;    ##++  ###+,++` ##`    ;###:++   `###+;   `###++++
                                                    ##   `++
                                                   .##   ;++
                                                    #####++`
                                                     `;;;.
************************************************************


Stardog server 8.1.1 started on Thu Nov 24 10:07:07 PST 2022.

I'll ignore the warnings for now. At least I can resume my evaluation of StarDog for now.
Many thanks!
Jeroen

The reflective warnings are typical with Java 11. We have that listed as a bug to fix in the next cycle.

Glad you are now operational. As I mentioned previously, Stardog 8.2 will ship with the necessary M1 .dylib.

Thanks again, @matthewv. Much appreciated. :vulcan_salute:t4: