-
Notifications
You must be signed in to change notification settings - Fork 65
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
[QMS-571] MacOS build scripts and CMakeLists.txt changed #572
Conversation
Thank you very much for all this work. I don't own a mac and I can't test it, but I have taken a look at the scripts and the gdal compile step has caught my attention. For self-compiled gdal: In the
Without that support qmapshack also works, but its usability decreases. For gdal brought by homebrew: Maybe it already comes with sqlite and curl support and nothing else is needed. I think it's worth to test if the final bundle is able to open this kind of files, but I don't have a mac to do it myself. At least to make it easier I have prepared some ready to use files, if anyone wants to do a test: download 1.2 Mb Excuse me if this is already solved and this comment is just noise. For reference MBTILES: https://gdal.org/drivers/raster/mbtiles.html
WCS: https://gdal.org/drivers/raster/wcs.html WMTS: https://gdal.org/drivers/raster/wcs.html
Compile gdal from source with curl and sqlite: https://gdal.org/development/building_from_source.html#sqlite3 |
It is always good to get a feedback. And I am not sure how QMapShack and QMapTool are using GDAL. If you are interested I uploaded the log of the GDAL build. |
All tools should be provided (afaik that is already the case). The rest are plugins. If libraries are found the modules are compiled. Usually the more of the optional requirements are present the better as more file formats can be used by QMapShack. This is true for all raster map formats. QMS/QMT do not make use of GDAL's vector map support. (https://gdal.org/drivers/vector/index.html). So no need to spend time on these. |
Thank you for the comment. Anyway, this is more academic. Building GDAL from source is only a fallback solution. And only interesting, if I want
But up to now, I am relying on the GDAL package from homebrew. |
GDAL_USE_EXTERNAL_LIBS is more about using internal code vs external libs, e.g. libgeotif vs internal implementation. I would leave it as the default says. |
@d029940 On your log.txt all seems to be OK for curl and sqlite support. Apologies if this was just noise. Since gdal 3.5 and with cmake the way of passing options when compiling gdal has changed. In the old way the |
@mitxel-m: (Slightly off-topic): I compiled QMS on Windows10 with GDAL 3.6.1 using the new |
If I build QMS myself on the Mac, I do a |
@wthaem some hints (one of them also related to MacOs ):
We have seen this problem on a friend's mac, with MacOs Monterey and running QMS installable version 1.15.2. By chance I was able to meet my friend this past week and we managed to try launching QMS in a terminal, to get the error message. Although the mac application bundle already contained the curl libraries and executable, it was asking for a Once we created the folder and put the We got the .crt file from curl website: https://curl.se/docs/caextract.html by downloading Remark the notes about the file name at curl website:
With this in mind when I have seen @wthaem question I have inspected a laptop with win10 and QMS 1.16.1. on which wcs works fine. @wthaem Maybe you can try that. Alternatively you can also try using a a GDAL configuration variable that tells the curl library to skip SSL verification.
@d029940 (sorry if all this is a bit off-topic) For the purpose of this PR, I suppose it is not necessary to provide this .crt file, probably gdal and curl provided by brew will use certificates that are already in the system, but I am not sure. A simple test would be to try the online DEM provided by QMS: `World Online SRTM900'. |
@mitxel-m: Thanks for the hints!
It was a certificate problem! I copied the missing |
I found this https://blog.bytesguy.com/resolving-lets-encrypt-issues-with-curl-on-macos If you already have brew installed, then installing curl and libcurl will solve the problem, given that the "brew" curl is found in the path before the "MacOS" curl. Do you have a test case, so that I can check it myself? |
Sure
If you are not used to online DEMS: remember to activate the DEM online only when you are already in a close zoom level. It is also highly recommended to limit its range of use with the slider (similar to maps). By doing so, you avoid to request millions of points from the server at outer zoom levels, and QMS will work smoothly. Once you have limited the range of use for DEM, doing zoom out of that range the DEM remains in a kind of silent or background mode. This is, the DEM data will not be displayed on screen, but data will be applied when you draw a track. |
Thank you for the test cases. I took both and I did not have any problems activating the wcs files. DEM data are shown. Am I on the wrong track? |
My knowledge about curl is very basic, but I think you have taken the right track. That way it will be more difficult to have a certificate problem, assuming that the system will take care to update them periodically. Otherwise, a certificate file included in an installation bundle may become obsolete when some certificates expire. You will probably be able to replace it manually, but a regular user could not be aware of that. _ Not a big problem assuming a regular user will read the wiki to find how to fix it..._ :-) @wthaem thanks for updating the wiki so fast with instructions on how to solve this ! |
Just a question to kiozen: I am not sure, If I need to release this PR explicitly? |
What do you mean by "release"? If you want to have it merged to dev simply give me a ping that all concerns are settled and there will be no other change. Then I will do a few smoke tests and if nothing pops up I merge it. |
The branch can be merged. After pushing some cosmetic changed to my repo, I did a last successful build and test (as far as I am using QMS). I also added some information to https://github.com/Maproom/qmapshack/wiki/TroubleShooting, but I do not know how to update the TOC. And how to deal with the binaries on https://github.com/d029940/qmapshack/releases/tag/QMapShack-Mac? |
MacOSX/README.md
Outdated
|
||
|
||
To run the complete build process: | ||
1. Create a dir cd into this directory. This dir will be referenced as $QMSDEVDIR | ||
2. Download https://github.com/d029940/qmapshack/blob/dev/MacOSX/QMS_build_files/1st_QMS_start.sh and put it into this dir | ||
4. run "sh 1st_QMS_start.sh | tee log.txt" | ||
2. clone git repo https://github.com/d029940/qmapshack.git |
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.
For testing it is Ok pointing to the fork,
Once merged to dev, should it point to the main repo or keep pointing to the fork ?
clone git repo https://github.com/d029940/qmapshack.git
or
clone git repo https://github.com/Maproom/qmapshack.git
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.
Good point. Just updated it.
Don't worry! I'll update the TOC for you soon! - Done! |
What is the linked issue for this pull request:
QMS-#571
What you have done:
Changed build files und MacOSX dir in order to
Steps to perform a simple smoke test:
Does the code comply to the coding rules and naming conventions Coding Guidelines:
Is every user facing string in a tr() macro?
Did you add the ticket number and title into the changelog? Keep the numeric order in each release block.