Apple M1 and the new machines. Defold?

Unfortunately, the error is the same but with the different sdk. Yes, I use native extensions, sorry if that was important.

Working...Build Remote Engine...
Building engine...ERROR: unspecified:-1: 'com.dynamo.bob.CompileExceptionError: 'x86_64-osx' could not be built. Sdk version: '034112d0a45c425a830194dd67f6833a8b453d59'
Log: 'Internal Server Error''

Exception in thread "main" com.dynamo.bob.CompileExceptionError: 'x86_64-osx' could not be built. Sdk version: '034112d0a45c425a830194dd67f6833a8b453d59'
Log: 'Internal Server Error'
        at com.dynamo.bob.bundle.BundleHelper.buildEngineRemote(BundleHelper.java:1155)
        at com.dynamo.bob.Project.buildEngine(Project.java:793)
        at com.dynamo.bob.Project.doBuild(Project.java:996)
        at com.dynamo.bob.Project.build(Project.java:516)
        at com.dynamo.bob.Bob.mainInternal(Bob.java:632)
        at com.dynamo.bob.Bob.main(Bob.java:681)
Caused by: com.defold.extender.client.ExtenderClientException: Failed to build source.
        at com.defold.extender.client.ExtenderClient.build(ExtenderClient.java:205)
        at com.dynamo.bob.bundle.BundleHelper.buildEngineRemote(BundleHelper.java:1097)
        ... 5 more

By the way, why does the Editor do it without errors?

Hmm, perhaps if you use the “–build-server https://build-stage.defold.com
(It is an unreleased/beta version after all)

Build server in the Editor preferences is https://build.defold.com.

Will keep in touch if there is any new clue.

Tried this special build with a project without NE:

The build failed for the following reasons:
ERROR builtins/fonts/system_font.font:0 Could not initialize class com.dynamo.bob.TexcLibrary

Created the issue #5949.

Did anyone solve to run bob.jar on M1 during this time? Can anyone confirm that they have the same problem? I really want to get my debugger working again in VSCode, but it depends on bob.jar :slight_smile:

That fix was merged about months ago, but it somehow fell out of the release notes (which I’ve now updated)

https://forum.defold.com/t/defold-1-2-185-has-been-released

4 Likes

Oh, that’s great news! It’s time to update my version of Defold!

2 Likes

Sorry guys, but I came back with bugs again.

A project without NE on 1.2.168
$ java -jar bob.jar --variant debug build

Working...Cleaning engine... ...done!
2147483647% ...done!           
Reading tasks... ...done!
Building... 1% 2% 3% 4% 5% 6% 7% 8% 9% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 33% 34% 35% 36% 37% 38% 39% 40%java.lang.NoClassDefFoundError: Could not initialize class com.dynamo.bob.TexcLibrary
        at com.dynamo.bob.font.Fontc.generateGlyphData(Fontc.java:641)
        at com.dynamo.bob.font.Fontc.compile(Fontc.java:939)
        at com.dynamo.bob.pipeline.FontBuilder.build(FontBuilder.java:65)
        at com.dynamo.bob.Project.runTasks(Project.java:1269)
        at com.dynamo.bob.Project.doBuild(Project.java:1094)
        at com.dynamo.bob.Project.build(Project.java:521)
        at com.dynamo.bob.Bob.mainInternal(Bob.java:687)
        at com.dynamo.bob.Bob.main(Bob.java:736)
 96% ...done!
 100% ...done!

The build failed for the following reasons:
ERROR builtins/fonts/system_font.font:0 Could not initialize class com.dynamo.bob.TexcLibrary
A project with NE on 1.2.186
$ java -jar bob.jar --variant debug build
Working...Build Remote Engine...
Building engine... ...done!
2147483647% ...done!           
Reading tasks... ...done!
Building... 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15%java.lang.UnsatisfiedLinkError: /private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: dlopen(/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp, 1): no suitable image found.  Did find:
	/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: no matching architecture in universal wrapper
	/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: no matching architecture in universal wrapper
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383)
	at java.base/java.lang.Runtime.load0(Runtime.java:746)
	at java.base/java.lang.System.load(System.java:1877)
	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:761)
	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
	at com.sun.jna.Native.<clinit>(Native.java:131)
	at com.dynamo.bob.TexcLibrary.<clinit>(TexcLibrary.java:53)
	at com.dynamo.bob.pipeline.TextureGenerator.generateFromColorAndFormat(TextureGenerator.java:250)
	at com.dynamo.bob.pipeline.TextureGenerator.generate(TextureGenerator.java:438)
	at com.dynamo.bob.pipeline.TextureGenerator.generate(TextureGenerator.java:393)
	at com.dynamo.bob.pipeline.TextureBuilder.build(TextureBuilder.java:63)
	at com.dynamo.bob.Project.runTasks(Project.java:1269)
	at com.dynamo.bob.Project.doBuild(Project.java:1094)
	at com.dynamo.bob.Project.build(Project.java:521)
	at com.dynamo.bob.Bob.mainInternal(Bob.java:687)
	at com.dynamo.bob.Bob.main(Bob.java:736)
 98% ...done!
 100% ...done!

The build failed for the following reasons:
ERROR assets/images/ui/emotion_b4.png:0 /private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: dlopen(/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp, 1): no suitable image found.  Did find:
	/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: no matching architecture in universal wrapper
	/private/var/folders/9v/js0sqc_55gzgvbygq89zfrp00000gn/T/jna-93122623/jna12569627446179218184.tmp: no matching architecture in universal wrapper

What can I do wrong? Is the bugfix tested on M1?

Could this java be a problem?

$ java -version
openjdk version "17" 2021-09-14
OpenJDK Runtime Environment Homebrew (build 17+0)
OpenJDK 64-Bit Server VM Homebrew (build 17+0, mixed mode)

Works fine with java that included in Defold.app.

$ sudo /Applications/Defold.app/Contents/Resources/packages/jdk11.0.1-p1/bin/java -jar bob.jar --variant debug build
Password:
Working...Build Remote Engine...
Building engine... ...done!
2147483647% ...done!           
Reading tasks... ...done!
Building... 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% ...done!

Looks like my java from homebrew is not ready to use with Defold.

3 Likes

I have tried it in the latest MacBook PRO M1 and works acceptably. It’s not the best machine to work with it, but you could do stuff with it.

1 Like

Hi! M1 user. I have noticed no difference between Defold on the M1 and Defold on my old mac.

And guess what? I’ve also been testing defold on a 2010 Mac Mini server. Works fine, if a little slow to get build :grinning:

5 Likes

Hi @88.josh and all other M1 users, I would like to buy my very first Mac and am thinking about the mini M1.
It would be used for Defold, obviously, some photo editing and running vector graphics software. My projects are simple and small, but sometimes use a lot of images. At times, I would like to connect a second monitor.
I would like to ask those who use the mini M1: do you think the entry level model with 8 GB RAM is enough for this? The 16 GB model is quite a bit more expensive…

2 Likes

Defold Editor itself takes about 1-2 GB of RAM.

If you are in the habit of closing all unused programs and browser tabs, 8 GB should be enough. But remember that this is an investment in the future, and 8 GB today is already on the edge. It may be better to buy 16 GB and not regret the purchase in 2-4 years.

Using a second monitor and the amount of memory are not correlated, don’t worry about that.

1 Like

Hello @astrochili - thank you very much for your advice!
I find the extra amount for a mere 8 GB RAM more rather eyewatering.
But you are right, with future-proofing in mind, I should probably bite the bullet and go for 16 GB, especially since the RAM cannot be extended later. Well, it can, rumour has it, but I would certainly not try this myself!
So, you are happy with the performance of your Air M1? I have looked at some benchmarks and the Air M1 and the Mini M1 seem be quite similar in this respect.

Yes, they have the identical core stuff, and that stuff is the M1 (CPU / GPU)

I’m absolutely happy with the Macbook Air M1. Maybe except for the inability to run old Windows games like Heroes 3 or Fallout 2 via Wine because of the architecture. But I hope it’s just a matter of time.

1 Like

Thank you @astrochili, this sounds very good!

Brigitte

The Macbook Air M1 is a truly fantastic laptop for so many reasons. It has received near-universal praise from critics and I would say it is unbeatable in its price range. Downsides: relatively low quality webcam image, upgrades are expensive, poor (or no) repairability, the new model is likely to come out soon(ish), some people don’t like MacOS. There are also many cheaper options available, as is always the case - the mac mini, for example (which is not a laptop). It’s available on Amazon for 900GBP, which is an incredible price.

For my use (defold, amateur music & video editing, videocalling) it is perfect. If you need a machine capable of seriously heavy lifting (video editing, or if you want to play this year’s triple AAA video games on the highest settings) you should look elsewhere… but in terms of an all-round general use laptop, I would say it is the best option by far.

With that said, other forum users have much more technical know-how than me and may be able to give you more information about the downsides.

3 Likes

Good morning @88.josh, thank you very much for sharing your experience with the M1!

Yes exactly, these raving reviews are the reason why I started to look into the Mini M1.

Yup, I was amazed to find out that there is such an affordable Mac available. Here in DE, I could get the entry model of the Mini M1 for €650, the 16GB one for about €1000.

I wouldn’t use it for gaming or any heavy lifting, so from what you describe, the mini M1 would fit my bill, too. Plus, I could easily squeeze this little box onto my incredibly cluttered desk.

I never understood this "my OS is better than yours“ thing and am keen to add MacOS to the ones I already use. Each has their merits (and downsides, of course). And I would then be able make apps for iOS as well.

You and @astrochili actually use the M1 for making apps with Defold, so your opinion is invaluable to me – thank you guys!
Just one thing left: may I ask how much RAM your Macbook Air M1 has?

Cheers

Brigitte

1 Like

8gb and it’s never given me any problems except when I tried to do a very intense video editing project (3/4 layers of video at 1080p w/ green screen). I am not sure if that is a really ram-intensive task… As I say I am not technically minded.

2 Likes

Hi again @88.josh, I would think video editing is indeed RAM-intensive. Your info is very helpful, thanks a lot for it!