-
Notifications
You must be signed in to change notification settings - Fork 806
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
Fix macOS Builds (and/or Build Instructions) #4374
Conversation
Signed-off-by: Elsie Hupp <github@elsiehupp.com>
Hi @claucambra—can you take a look at this and maybe edit it so that it reflects the process necessary for build Nextcloud for Mac? FWIW the existing instructions are almost 100% command-line-based, and if you're using the Qt Creator GUI, it may be obfuscating issues that would otherwise exist in the CMake scripts. Ideally the build process should work with both the command line and the GUI, rather than requiring one or the other. |
doc/building.rst
Outdated
that depend on it. An update fixing the build process so that it will | ||
work with both packages installed is forthcoming. | ||
|
||
1. Certain Homebrew packages are not automatically linked in places where | ||
the build scripts can find them, so you can create a shell-profile script | ||
that will find and load them dynamically when you run a build: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add QtKeychain to the commands below:
echo 'export Qt5Keychain_DIR=$(brew --prefix qtkeychain)/lib/cmake/' >> ~/.nextcloud_build_variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, why don't we just provide a CMake command here? Seems like it would be a lot easier to just say "go run this in the build folder":
cmake .. -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5/ -DQt5Keychain_DIR=$(brew --prefix qtkeychain)/lib/cmake/ -DQt5LinguistTools_DIR=$(brew --prefix qt5)/lib/cmake/Qt5LinguistTools/
Oh, and we will need to add instructions for build for Apple Silicon At the moment I believe this involves building Qt5 and the other dependencies on an M1 equipped machine |
I don't remember all of the reasons why the build instructions are the way they are, but the main thing is that the build command you end up using every time you run a build has to be simple enough to remember off the top of your head. You can read through the gazillion comments here as well as the reasons why this isn't handled via CMake here and here. I really don't feel like revisiting either of those debates, but you can dive in if you feel so inclined. My goal in this particular pull request is just to get macOS developer builds and the macOS build instructions actually working again. Like, the particulars aside, a good baseline should be the documentation not being broken, lol. |
I wasn't around back then to know about this debate but if things are the way they are then there must be a good reason for it 🙂 AFAICT these instructions should work, at least on Intel Macs. Things get a little hairier on Apple Silicon Macs due to the architectures of the dependencies, primarily Qt5 |
Signed-off-by: Elsie Hupp <github@elsiehupp.com>
Replacing the following: % echo 'export QT_PATH=$(brew --prefix qt5)/bin' >> ~/.nextcloud_build_variables with the following: % echo 'export Qt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5/' >> ~/.nextcloud_build_variables Actually breaks the instructions:
Could you specify exactly what environmental variables need to be used here in order to avoid the conflict with Qt 6? We also still need to correct the installation script at the end so that CMake spits out an application package rather than installing the build spread across the Linux-standard directories. |
Signed-off-by: Elsie Hupp <github@elsiehupp.com>
Could you try and run the instructions from the top and see if they work for you? I'm still running into problems. Like uninstall all the dependencies (except maybe Xcode), wipe the environmental variables, and set them up again from scratch? Yes, this is tedious, but it's what I had to do last year to make sure the instructions worked back then. FWIW with the changed Qt environmental variable I'm getting this error instead:
Also I'm getting this warning, which may have something to do with upgrading to 12.3:
|
AppImage file: Nextcloud-PR-4374-a1c78728bce9a6d36fba55835c7104ace0d38c14-x86_64.AppImage |
Kudos, SonarCloud Quality Gate passed! |
@elsiehupp thanks for your contribution |
Hi @elsiehupp sorry for the lack of communication over the past 2 years (!!!), that's our bad Today our build instructions and procedures have changed a lot on the macOS side of things, we have the mac-crafter helper that automates most things away. We have also moved to Qt 6 so a lot of things have changed Thanks for all of your contributions, they are really appreciated (even if we take very long to review them properly) |
This is a draft pull request to fix #4365 and #4366.