-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JBake fails to run or build on Apple Silicon #709
Comments
Facing same issue, is there already some idea/agreement if moving to sqlite for future releases might be the right approach? @mhberger saw that you continue to update your fork. Is that fork more or less usable on M1 ? |
Hi. In reply to about whether it is more or less usable, it builds (using I use it mainly on M1. Once I unzip the installaiton and set path, it
But to get it polished and merged back into master/main will require some Currently the work on the Prototype/PR branch includes the following
|
Thanks, just tried it out and compiles and runs fine on my M1 and even feels faster (btw my website uses asciidoc + freemarker) But it seems it doesn't handle custom doc types yet. But this could also be a 2.7.x compatibility issue since previously I used the maven plugin and I guess that is still on the 2.6.x version. Need to invest a bit more. |
K. Have you got an example using custom doc types? It could be that I missed something moving away from OrientDB. |
I guess the easiest way would be to clone my website (small one):
But if a dedicated example is more useful, just let me know and I'll make one. |
That is great. Thanks. Let me take a look and I will see if I can figure it out. |
P.S the default type is a custom type. So these two lines in the jbake.properties files are relevant:
|
Thanks again. I understand what is supposed to happen. And I can see in the code where it is “failing”. I will find the functionality and associated test (if there is not one will try and put something together). |
That's is quick, thanks!!! If there are some test or samples that required that I can help with, just let me know. |
Doh! I missed a call to |
Just tested it also and it works great!!! My website generates correctly and also very fast. Possible part of this is due to the M1 chip, but I also think SQLite might have less overhead, especially for smaller sites. |
@jonbullock Would you consider moving (or supporting) JBake to SQLLite in the future, or are there obstacles in doing so? |
Hi. I have created a new branch (mhb/sqlite-2022-01-04) off the old one The use case I have been focusing on is unzipping the dist zip and Have tested it on Apple M1 and Apple Intel with my blog and with I need to think of a way of tidying up the branch to make it easier to Updated: fixed typo. |
Apologies for the delay in replying to this. First off let me say thanks to you both for spending time looking into this. I'm not adverse to supporting a different content store other than OrientDB (maybe via a config option so end users have a choice?). However, a non-relational data store (Document support in OrientDB) was selected to enable users to have flexibility in the schema when it comes to content and it's metadata. I've not looked at the SQLite implementation yet but this is the major consideration that came to mind. If SQLite didn't support a flexible schema this would be a hurdle as it would negatively impact users. |
I also didn't look into the details of the SQL Lite implementation, but I'm having some custom content types and properties and they seem to be working fine. A simple key/value pair table in traditional RDBMS can go a long way to support flexible schemes ;) P.S For me one of the biggest benefit besides it is now also running on Apple M1, is the speed improvements. |
Very true, could be solved in that way. From the brief research I've done the root cause of the issue seems to be in JNA that OrientDB uses, but I can't find any reported issue in the OrientDB project. I'll raise one to see what the project maintainers say about it. I hadn't realised a fork of OrientDB had occurred recently too. How much improvement are you seeing with SQLite? |
I didn’t time the improvements, but if I have some time will give it a go. But from just watching the console output it was clearly noticeable. |
Hi Jon. Thanks for feedback. re SQLite/JDBC. Although it is a relational, it is being used as a The ContentStore interface should allow changing implementations. At runtime, which contentstore to use is controlled via jbake.properties The DocumentModel is still the main interface between parsers/templates re speed. This requires care when comparing. One has to take account the
I am going to work on tidying up the commits probably organising them
|
Hi guys, OrientDB is not supported anymore. We are working on ArcadeDB, a fork of OrientDB with an active community and a new engine that is much lighter and faster than OrientDB maintaining the same SQL and similar API. Also, ArcadeDB supports Cypher and GraphQL in case you need it, and much more. Last but not least, it's embeddable in Java, exactly like OrientDB and it has zero or minimal dependencies based on the configuration used. If you're interested I'd be happy to help in the update to ArcadeDB, just give me some hint where the repository layer is located and I can do a quick POC ;-) |
Hi @mhberger Thanks for the stats regarding speed. It's more the custom metadata per content file than custom types of content I'm concerned about: https://jbake.org/docs/2.6.7/#custom_metadata |
Hi @lvca The big question is does ArcadeDB work on Apple Silicon? |
Hi @jonbullock yes it does. It's 100% pure Java, there is no JNI, JNA, or other esoteric configuration like OrientDB ;-) |
I've replaced OrientDB with ArcadeDB in the PR #745. It was easy and quick, the SQL is the same, just a little change in the API. |
Same issue here, a blocker because these M1 macs are exploding in popularity |
I did manage a workaround by patching JNA in jbake with the latest JNA distribution |
@jonbullock Is this supposed to be fixed with the upcoming 2.7.0? |
Simplest way to resolve this is to just upgrade the versions of JNA in the next JBake release |
@lprimak Thanks for the hint, can you raise a PR? |
@kwin probably not in a timely fashion |
OrientDB migrated from JNA to JNR in orientechnologies/orientdb@74276df and was recently updated to a version supporting Apple Silicon (orientechnologies/orientdb#9762). The most recent release 3.1.16 should contain that fix (https://github.com/orientechnologies/orientdb/commits/3.1.x) |
Is there anything that can be done to move this forward? I was just trying to setup a new website using JBake and ran into this roadblock so now I'm looking for another Java-based alternative supporting Asciidoc unless I can somehow get this issue unblocked somehow... |
@lprimak Can you elaborate on how you patched it? Were you able to force the JNA version in the gradle config? Or did you update the jar file manually somehow? FWIW, I'm trying to use the Maven plugin. |
I just put latest JNA JARs into binary distribution |
@lprimak Ugh ok, not so easy to do that when using via a Maven plugin. Is there any prospect of a proper fix landing? |
I'm dealing with same issue while evaluating different static site generators... Seems the version update of OrientDB by @kwin #709 (comment) should resolve the problem? But it isn't part of the next release yet, correct or did I overlook it in the release notes? |
I meet the same issue when Maybe ArcadeDB is good choice for apple sillicon user. |
For those that are using the Maven plugin, you can add the following to the jbake-maven-plugin dependencies section in your pom and then it works (at least on my M1). This will force the plugin to use a newer version of OrientDB library that works on M1.
Normally this dependencies section already exists and has your template engine(s) libraries mentioned, so just add this to that list. Later versions (3.2.x) of the lib don't work since JBake use the default username/password for OrientDB which will throw an error (and only a warning in the 3.1.x versions). |
Had indeed the same experience (also just added a comment to #755) , but wondering if that is perhaps junit specific?OrientDB doesn't want to create the DB with the provided name in those failed test case, but perhaps the junit tmp directory is not yet ready (would be strange) or too long or wrong permissions ???? |
No idea, but I think #745 is more promising. For now I just went around this issue by using https://multipass.run/ and running the JBake build inside an Ubuntu VM. The same could probably be achieved with Docker. |
I can put up my build with latest JNA on my nexus server if there is any interest |
@lprimak I assume that would be the JBake library not the maven plugin correct? (since I believe those are resolved against the Apache Maven repo) |
Not sure. I’d have to look. It I don’t see why it wouldn’t work. |
Ok, I got maven plugin to work as well by using Complete project that works on Apple Silicon available here: |
Upgraded OrientDB to 3.1.20. Updated tests as OrientDB v3.1.x doesn't allow DB name to be a path. Groovy template test was flaky, so removed override which made it more reliable.
This issue is closed, but I still seem to hit the same error. Also with the pom-example shared above by @lprimak
|
Same here, on an Apple Macbook Pro M1 , using JBake 2.6.5 or newer: java.lang.UnsatisfiedLinkError: (blabla JNA blabla...) : tried: '/private/var/folders/8q/lqlsfbh934v75wff63tmhky00000gn/T/jna-97692050/jna8664779561218046705.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e))). ...or some similar error msg, depending on JBake version used. Bottomline is that OrientDB wants some JNA lib but only an Intel x86_64 version is found, while (ofcourse) an ARM64 version is needed on a Mac M1 (or M2). However: When using 2.6.0 ... 2.6.4 it's working fine WITH OrientDB! |
Try the latest release candidate available here: https://github.com/jbake-org/jbake/releases It includes a later version of OrientDB which supports Apple Silicon. |
Indeed, this is still an issue. I'm facing this problem on M2 |
Can you try jbake-examples-plugin again? I enabled dependabot and updated a whole bunch of dependencies. I have been running consistently on M1 mac and it works perfectly. |
After updating jbake dependency to Thanks @lprimak |
Hi there
Thank you for JBake – I have been using it since June 2015 (that is when
I get the urge to write something pithy at Code is Mandatory)
Recently I started using a MacBook Air (with Apple M1 Silicon) for
processing and unfortunately JBake does not run or build on Apple M1
Silicon. It works fine on Apple Intel.
Exceptions and references to the underlying issue are listed below.
Digging in it is appears to be an issue with OrientDB.
As a result of nosing around and to solve this itch, I have started work
on removing the dependency of OrientDB and using JDBC and Groovy Sql with
the implementation done in SQLite.
The work is ongoing on a “Prototype PR” type branch that is really rough as guts at the moment.
Exceptions caused trying to run
Exceptions caused trying to run tests
Related Git Hub Issues
Test failures on Apple silicon (aarch64) #1323
Add darwin-aarch64 support #1297
Enable building jna for Darwin arm64 #1238
Support for Apple silicon #20
Fix variadic arguments on arm64 darwin ABI #577
Enable Strict Type Enforcement for Dynamic Method Dispatching
Software environment
The text was updated successfully, but these errors were encountered: