Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.

make use of avian instead of JavaVM.framework (OSX) #3

Open
jonasschnelli opened this issue Sep 20, 2013 · 8 comments
Open

make use of avian instead of JavaVM.framework (OSX) #3

jonasschnelli opened this issue Sep 20, 2013 · 8 comments

Comments

@jonasschnelli
Copy link
Contributor

The required java on osx is a small show stopper.
How's the state with using avian instead?

@jonasschnelli
Copy link
Contributor Author

What's done so far (i can only see avian added as submodule)?
Where could i contribute?

@bazyli
Copy link
Contributor

bazyli commented Sep 20, 2013

There's a branch on the repo called integratedvm. It still needs a lot of work. You need to download sources for OpenJDK (because avian needs it) and then compile everything back together. It's not that simple though. Maven compiles the stuff separately and openJDK classes that avian uses are not seeing the bitcoinj classes at the same time. Check the prebuild script of the library on that branch to see more what's going on out there :)

@jonasschnelli
Copy link
Contributor Author

oh.. look after a lot of pain. :)
I probably stick to the JavaVM.framework for now.

@ghost
Copy link

ghost commented Apr 3, 2014

Asked @mikehearn take a look at this task and advise.

@mikehearn
Copy link

It should be easier to use Avian these days, as it can be compiled with the Android class library. Back when I first tried this the sticking point was Apple breaks source/compiler compatibility with almost MacOS every release, and Java 7 wouldn't compile on the latest version anymore. As MacOS can't be virtualised either, you'd have to actually find/buy an old Mac and run an old MacOS on it, just to build Avian, or get someone to send you their build (which is what I did in the end but never got a chance to finish this). This is stupid but an inevitable consequence of Apple's policies.

Hopefully, Android actually can be compiled on the latest MacOS versions. If so then Avian should be buildable against that, and bitcoinj runs fine on Android, so then it should work.

@ghost
Copy link

ghost commented Apr 3, 2014

Do you see any issues there if we want to retain our 10.7+ compatibility then?

@mikehearn
Copy link

No, the issues are just about compiling. You might want to compile on 10.7 to ensure binaries work on 10.7, but that's a general issue.

@mikehearn
Copy link

I've started working on this. I have an Avian that was compiled on Mavericks against OpenJDK 8. It needed a small patch but seems to work fine. I was able to sync a chain etc. The bitcoinj test suite doesn't pass because something goes wrong trying to load scrypt (heap corruption occurs trying to use the native library), and there's another bug with those that try to do trust store loading for the payment protocol.

Once the bcj unit tests are all passing, the next step is to find a way to bundle Avian into BitcoinKit and make BitcoinKit use it instead of the system JVM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants