Skip to content
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

Support for macOS #107

Open
Cubitect opened this issue Feb 15, 2022 · 34 comments
Open

Support for macOS #107

Cubitect opened this issue Feb 15, 2022 · 34 comments

Comments

@Cubitect
Copy link
Owner

I created this issue to host a discussion regarding support for macOS.

I have no method of building for macOS, nor a way to verify pre-built binaries. For these reasons I will not be supplying official builds for that platform.

There have been offers to contribute by supplying compiled binaries, which users can do so here if they wish. However, my general recommendation would be to compile the application yourself.

The necessary build utilities and Qt dependency can be gotten with XCode and Homebrew:

$ xcode-select --install
$ brew install qt@5
$ brew link qt@5

(Thanks @rlvandaveer for these instructions)

@rlvandaveer
Copy link

I am curious how releases are created now. I don't see an Actions. It would not be a heavy lift to add a MacOS stage to an Action. Linux, Windows, and Mac could all be built in a matrix

@Cubitect
Copy link
Owner Author

I'm pretty sure GitHub Actions do not offer static Qt builds, since that requires compiling Qt from source and takes around 10GB of space.

Currently, I have a couple of basic VMs specifically setup to build the Linux and Windows releases. So far I hadn't really considered Actions, as I didn't think that it was worth the trouble to automate something that I only need about once a month.

@emmekappa
Copy link

@Cubitect have you seen this community action? https://github.com/marketplace/actions/install-qt

@Cubitect
Copy link
Owner Author

Cubitect commented Aug 7, 2022

Yes, and it doesn't support static builds: github.com/jurplel/install-qt-action/issues/53

@TomerGamerTV
Copy link

TomerGamerTV commented Sep 4, 2022

For anyone asking how to do it just install it as he said above, visit this link and scroll down it says how to do it

@Dax911
Copy link

Dax911 commented Oct 28, 2022

Idk if anyone needs to know this but for future reference, all versions from August 2022 to now have worked great on M2 apple silicon. Also, thanks for the updates love this tool. I want to complain that the default font is American Typewriter. Gross. Would love to see a tutorial somewhere.

Cubitect added a commit that referenced this issue Nov 13, 2022
* added UI event buffering to the anaylsis results, making it much more performant with many seeds (#122)
* added custom separator option for csv export (#122)
* added DejaVuSans monospace font for a more consistent look (#107)
* added filter for biome center locations with scale 1:256 for versions up to 1.17 (#63)
* changed biome statistics UI to display seeds as rows (#122)
* changed matching seed list and some anaylsis results to be tristate sortable
* changed zoom limits for the goto dialog, allowing a larger manual zoom range (#162)
* changed abandoned village and end ship modifiers to be a tristate with exclude option (#168)
* fixed incorrect progress display for anaylses (#165)
* fixed stronghold filter so it doesn't skip the last inner ring stronghold (#171)
* fixed slightly inaccurate biome check location for some villages and bastions (#168)
* + few more minor fixes and tweaks
@ltecheroffical
Copy link

That renders me running a pre-compiled program useless

@GrantedSuper
Copy link

I am looking to download and use cubiomes viewer for some seed-finding on M1 MacBook Air with no idea how. I am very unfamiliar with Github and am looking for where to download the application for Mac. @Dax911 said they are using it on M2. I would love to know how you did that. If someone could link me to instructions on how to use this for Mac that would be much appreciated.

@TomerGamerTV
Copy link

I am looking to download and use cubiomes viewer for some seed-finding on M1 MacBook Air with no idea how. I am very unfamiliar with Github and am looking for where to download the application for Mac. @Dax911 said they are using it on M2. I would love to know how you did that. If someone could link me to instructions on how to use this for Mac that would be much appreciated.

Do you know how to scroll up? Read my comment

@Dax911
Copy link

Dax911 commented Jan 9, 2023

I am looking to download and use cubiomes viewer for some seed-finding on M1 MacBook Air with no idea how. I am very unfamiliar with Github and am looking for where to download the application for Mac. @Dax911 said they are using it on M2. I would love to know how you did that. If someone could link me to instructions on how to use this for Mac that would be much appreciated.

I compiled it from source myself ish I will need to go thru the process again, but it is still working with the newer updates. I have appts today and a new sprint to setup for. But I will make this a priority this week. Sorry everyone.

@devjta
Copy link

devjta commented Feb 6, 2023

I am looking to download and use cubiomes viewer for some seed-finding on M1 MacBook Air with no idea how. I am very unfamiliar with Github and am looking for where to download the application for Mac. @Dax911 said they are using it on M2. I would love to know how you did that. If someone could link me to instructions on how to use this for Mac that would be much appreciated.

Get homebrew, install qt5, install xcode (like the guide tells for mac os) and you can build it without ANY OTHER change..

image

@mark-d-holmberg
Copy link

Can confirm. This worked for me.

@Dax911
Copy link

Dax911 commented Sep 18, 2023

Hey I am back and with this latest version I am getting a very interesting compile issue.

In file included from noise.c:2:
In file included from ./noise.h:4:
./rng.h:6:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
make[1]: *** [noise.o] Error 1
make: *** [cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer] Error 2

Fixed it on M2

Run

xcrun --show-sdk-path

to get the path and make sure ur sdk is up to date and everything for qt is in the correct path etc.

using the output i replaced ln 4 in the makefile as so

override CFLAGS += -Wall -Wextra -fwrapv -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

then cleared everything and started build from scratch.

@Dax911
Copy link

Dax911 commented Sep 18, 2023

If there is significant interest I will happily take over supplying compiled Mac binaries for the community.

@h4nkyn
Copy link

h4nkyn commented Oct 14, 2023

Well I'm interested!

@samon1210
Copy link

@Dax911 I would like to know more details from the makefile area.

@TomerGamerTV
Copy link

Hey I am back and with this latest version I am getting a very interesting compile issue.

In file included from noise.c:2:
In file included from ./noise.h:4:
./rng.h:6:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
make[1]: *** [noise.o] Error 1
make: *** [cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer] Error 2

Fixed it on M2

Run

xcrun --show-sdk-path

to get the path and make sure ur sdk is up to date and everything for qt is in the correct path etc.

using the output i replaced ln 4 in the makefile as so

override CFLAGS += -Wall -Wextra -fwrapv -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

then cleared everything and started build from scratch.

i tried that but it didn't work

./rng.h:6:10: fatal error: 'stdlib.h' file not found #include <stdlib.h> ^~~~~~~~~~ 1 error generated. make[1]: *** [noise.o] Error 1 make: *** [cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer] Error 2

@samon1210
Copy link

Hey I am back and with this latest version I am getting a very interesting compile issue.

In file included from noise.c:2:
In file included from ./noise.h:4:
./rng.h:6:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.
make[1]: *** [noise.o] Error 1
make: *** [cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer] Error 2

Fixed it on M2
Run

xcrun --show-sdk-path

to get the path and make sure ur sdk is up to date and everything for qt is in the correct path etc.
using the output i replaced ln 4 in the makefile as so

override CFLAGS += -Wall -Wextra -fwrapv -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

then cleared everything and started build from scratch.

i tried that but it didn't work

./rng.h:6:10: fatal error: 'stdlib.h' file not found #include <stdlib.h> ^~~~~~~~~~ 1 error generated. make[1]: *** [noise.o] Error 1 make: *** [cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer] Error 2

Yes, I got the same result as you.

@Dax911
Copy link

Dax911 commented Oct 30, 2023

Let me walk thru it again, sorry I really should increase the notifications for this thread.

@samon1210
Copy link

スクリーンショット 2023-11-06 17 53 24 Using wineskin was very easy!

@samon1210
Copy link

スクリーンショット 2023-11-06 17 53 24 Using wineskin was very easy!

But threads can't be more than 4

@TomerGamerTV
Copy link

スクリーンショット 2023-11-06 17 53 24 Using wineskin was very easy!

using emulators is not a good idea because it decreases performance drastically, it's possible to make it run natively on Mac I just can't figure out how to compile it.

@BestBoyBerlin
Copy link

I got the same errors but fixed them by running:
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
like described here: https://developer.apple.com/forums/thread/123997
It worked even without editing the Makefile.

@Dax911
Copy link

Dax911 commented Nov 7, 2023

I got the same errors but fixed them by running: export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include like described here: https://developer.apple.com/forums/thread/123997 It worked even without editing the Makefile.

This seems correct to me I encounter a new compile issue as well w the new version of mac os and this seems to have resolved it. Thank you.

@TomerGamerTV
Copy link

I got the same errors but fixed them by running: export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include like described here: https://developer.apple.com/forums/thread/123997 It worked even without editing the Makefile.

i tried that but after running make it just stops with this code: (this is what it spills at the end this is not the full output )

k IOKit -framework OpenGL -framework AGL
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[2](noise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[3](layers.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[4](biometree.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[5](biomenoise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[6](generator.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[7](finders.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[8](util.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[9](quadbase.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)

@BestBoyBerlin
Copy link

I got the same errors but fixed them by running: export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include like described here: https://developer.apple.com/forums/thread/123997 It worked even without editing the Makefile.

i tried that but after running make it just stops with this code: (this is what it spills at the end this is not the full output )

k IOKit -framework OpenGL -framework AGL
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[2](noise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[3](layers.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[4](biometree.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[5](biomenoise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[6](generator.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[7](finders.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[8](util.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[9](quadbase.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)

You're right, but these are just warnings, so it's fine. You should find a cubiomes-viewer.app file in your build folder after running make. Just double click on it and cubiomes-viewer should start.

@TomerGamerTV
Copy link

I got the same errors but fixed them by running: export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include like described here: https://developer.apple.com/forums/thread/123997 It worked even without editing the Makefile.

i tried that but after running make it just stops with this code: (this is what it spills at the end this is not the full output )

k IOKit -framework OpenGL -framework AGL
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[2](noise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[3](layers.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[4](biometree.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[5](biomenoise.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[6](generator.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[7](finders.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[8](util.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (/Users/tomer/Downloads/cubiomes-viewer/cubiomes/libcubiomes.a[9](quadbase.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)

You're right, but these are just warnings, so it's fine. You should find a cubiomes-viewer.app file in your build folder after running make. Just double click on it and cubiomes-viewer should start.

Problem is I can’t find it, it just doesn’t exist.

@Cubitect
Copy link
Owner Author

I've set up a github action to deploy a dmg for the newest release. I still don't have a way to check that it actually runs, though.
Does someone want to confirm if it works, or provide detail on potential errors?

@Dax911
Copy link

Dax911 commented Feb 10, 2024

Sure thing

@Dax911
Copy link

Dax911 commented Feb 10, 2024

Not working, something to do w Qt plugin

Last login: Sat Feb 10 00:00:24 on ttys001
You have new mail.
/Users/dax/.zshrc:source:113: no such file or directory: /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme
/Users/dax/.zshrc:source:114: no such file or directory: /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme
/Volumes/cubiomes-viewer/cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer ; exit;~ /Volumes/cubiomes-viewer/cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer ; exit;
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

[1]    4786 abort      /Volumes/cubiomes-viewer/cubiomes-viewer.app/Contents/MacOS/cubiomes-viewer

Saving session...completed.
Deleting expired sessions...       8 completed.

[Process completed]

@nealxm
Copy link

nealxm commented Feb 11, 2024

i have tried building cubiomes from source in the past so i have all the qt dependencies but i was never successful in building. i also did not have success running your posted dmg (both v4.0.0 and v4.0.1), here is the full crash log: https://pastebin.com/QviugsdA

EDIT:
since you've added some stuff for the macos build and i have not tried building from source in a while, i just tried to build again and everything worked! let me know if i can do anything to help with the official build

@devjta
Copy link

devjta commented Feb 12, 2024

I really dont know, what you are all doing..

image

Build on Apple M1 Max (MBP 14" 2021).

@MonotoneDevelopment
Copy link

I'm on an Intel and it doesn't work, the crash trace says the program called abort().

@MonotoneDevelopment
Copy link

MonotoneDevelopment commented Apr 4, 2024

スクリーンショット 2023-11-06 17 53 24 Using wineskin was very easy!

using emulators is not a good idea because it decreases performance drastically, it's possible to make it run natively on Mac I just can't figure out how to compile it.

As seen before, it runs on Wine. One thing to note, Wine is not an emulator (Which is what Wine stands for), and instead it runs it through a compatibility layer to effectively make it run with no overhead from an emulator, and instead run it as if it was a native app. That means it should be a viable solution/option.

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

No branches or pull requests