Skip to content

cmake: fix some various minor issues#6902

Merged
nilason merged 1 commit intoOSGeo:mainfrom
nilason:cmake_minor_fixes
Jan 16, 2026
Merged

cmake: fix some various minor issues#6902
nilason merged 1 commit intoOSGeo:mainfrom
nilason:cmake_minor_fixes

Conversation

@nilason
Copy link
Contributor

@nilason nilason commented Jan 15, 2026

Fix some various minor CMake issues:

  • install icon files with correct file extension (png)
  • install grass.appdata.xml with correct name
  • do not install the "parson.h" file
  • fix installation of desc.table parms.table units.table
  • generate and install translation_status.json
  • do not install mkrest.py

- install icon files with correct file extension (png)
- install grass.appdata.xml with correct name
- do not install the "parson.h" file
- fix installation of desc.table parms.table units.table
- generate and install translation_status.json
- do not install mkrest.py
@nilason nilason added this to the 8.5.0 milestone Jan 15, 2026
@github-actions github-actions bot added GUI wxGUI related translation Message translation related libraries CMake labels Jan 15, 2026
@nilason
Copy link
Contributor Author

nilason commented Jan 16, 2026

@echoix please take look at this.

Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does mkrest do normally, and what doesn't work here that merits trimming it out?

@nilason
Copy link
Contributor Author

nilason commented Jan 16, 2026

What does mkrest do normally, and what doesn't work here that merits trimming it out?

I compared to what is installed with current auto tools build. That one is not installed. (Maybe it is used for the building process only)

@nilason
Copy link
Contributor Author

nilason commented Jan 16, 2026

All changes here are the result of diff between autotools install and cmake install dir.

@nilason nilason merged commit 2b35807 into OSGeo:main Jan 16, 2026
32 of 52 checks passed
@echoix
Copy link
Member

echoix commented Jan 16, 2026

All changes here are the result of diff between autotools install and cmake install dir.

Nice work then!

@nilason nilason deleted the cmake_minor_fixes branch January 16, 2026 16:46
@m-kuhn
Copy link
Contributor

m-kuhn commented Jan 21, 2026

@nilason I get this now

CMake Error at locale/cmake_install.cmake:45 (file):
  file INSTALL cannot find
  "output/share/grass/translation_status.json":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:140 (include)

FTR:

find . -name translation_status.json
./output/libexec/grass/translation_status.json

@nilason
Copy link
Contributor Author

nilason commented Jan 21, 2026

@nilason I get this now

CMake Error at locale/cmake_install.cmake:45 (file):
  file INSTALL cannot find
  "output/share/grass/translation_status.json":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:140 (include)

FTR:

find . -name translation_status.json
./output/libexec/grass/translation_status.json

That looks like you compiled with -DWITH_FHS=ON, could that be the case?

@m-kuhn
Copy link
Contributor

m-kuhn commented Jan 21, 2026

Yes, it is @nilason

@nilason
Copy link
Contributor Author

nilason commented Jan 21, 2026

Yes, it is @nilason

I see, FHS support is on hold for now, will be added only after 8.5 branch and release. The reason is that extensive code changes are required for that to work, which are too risky (see #5630 for ongoing work).

@m-kuhn
Copy link
Contributor

m-kuhn commented Jan 21, 2026

I see, thanks for the pointer!
Before this PR it was building and installing with FHS, it would be nice if we could keep that level of support for 8.5 even if it's not perfect.

@nilason
Copy link
Contributor Author

nilason commented Jan 21, 2026

I see, thanks for the pointer! Before this PR it was building and installing with FHS, it would be nice if we could keep that level of support for 8.5 even if it's not perfect.

It built and installed just fine, but didn't work without hacks:

grass/CMakeLists.txt

Lines 185 to 201 in 91dc83c

# TODO: a proper fix to this workaround
if(WITH_FHS)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_DEMODIR}
${RUNTIME_GISBASE}/demolocation SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_FONTSDIR} ${RUNTIME_GISBASE}/fonts
SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/colors
${RUNTIME_GISBASE}/etc/colors SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/colors.desc
${RUNTIME_GISBASE}/etc/colors.desc SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/element_list
${RUNTIME_GISBASE}/etc/element_list SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/renamed_options
${RUNTIME_GISBASE}/etc/renamed_options SYMBOLIC)
file(CREATE_LINK ${OUTDIR}/${GRASS_INSTALL_ETCDIR}/VERSIONNUMBER
${RUNTIME_GISBASE}/etc/VERSIONNUMBER SYMBOLIC)
endif()

Let me see if that particular issue can be addressed for now.

@m-kuhn
Copy link
Contributor

m-kuhn commented Jan 22, 2026

Thanks; for the record, I am condisering to ship this with the macos package of QGIS and assume that for a processing integration most resources will not be required.

@nilason
Copy link
Contributor Author

nilason commented Jan 26, 2026

Thanks; for the record, I am condisering to ship this with the macos package of QGIS and assume that for a processing integration most resources will not be required.

@m-kuhn
I suspected that was the immediate goal. Great news! Are you planning to make it (GRASS) a public package, or "only" internal (for the QGIS build)?

I put up a PR #6972, which skips the parts failing with FHS build. CMake build with legacy installation structure should be regarded as experimental, the build with FHS compliance is experimental^2. If possible I'd use the legacy for now.

@m-kuhn
Copy link
Contributor

m-kuhn commented Jan 26, 2026

@nilason the goal is to ship it as part of QGIS (this was discussed here qgis/QGIS#62521 , happy to get more feedback there if someone else has inputs).
It's built using vcpkg, I'd like to upstream that to the main vcpkg repository whenever a release is out that builds with cmake/FHS. This won't be easily usable as standalone macos distributable, but if there's interest to build future grass packages using a similar approach as QGIS, I'm happy to discuss and support.

@nilason
Copy link
Contributor Author

nilason commented Jan 26, 2026

@nilason the goal is to ship it as part of QGIS (this was discussed here qgis/QGIS#62521 , happy to get more feedback there if someone else has inputs).
It's built using vcpkg, I'd like to upstream that to the main vcpkg repository whenever a release is out that builds with cmake/FHS.

I have zero experience of vcpkg and quite limited knowledge of QGIS code base. Full support of FHS will only be with next release (8.6). That being said, with #6972 it will build again with FHS although with missing documentation index and GUI menus. That should however not be an issue for using GRASS processing tools in QGIS, so, please give it a try: libraries and modules should work. Do not hesitate to ask for assistance if you have any GRASS specific questions/issues (per e-mail too, if that would be more convenient).

This won't be easily usable as standalone macos distributable, but if there's interest to build future grass packages using a similar approach as QGIS, I'm happy to discuss and support.

Thanks! As you may know, we have a conda based solution, which is quite stable and is built+notarized on GH once a week. (Currently, we have issues with Intel Macs, but that's another topic).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake GUI wxGUI related libraries translation Message translation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants