Bug 284996 - graphics/qgis: fix build with portmaster if ccache is installed
Summary: graphics/qgis: fix build with portmaster if ccache is installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-23 18:24 UTC by Martin Birgmeier
Modified: 2025-02-23 22:54 UTC (History)
2 users (show)

See Also:
rhurlin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2025-02-23 18:24:18 UTC
Scenario:
- FreeBSD stable/14 as of ca. Feb. 1
- ports latest
- using portmaster to update ports
- qgis being updated to 3.42.0

Result:
- The build fails at the beginning with the following:

-- ccache found
ccache: error: unknown configuration option "compiler_type"
CMake Error at CMakeLists.txt:159 (message):
  The use of precompiled headers only works if the ccache 'sloppiness'
  settings contains 'pch_defines' and 'time_macros'.  Consider running
  'ccache --set-config sloppiness=pch_defines,time_macros' to define them


-- Configuring incomplete, errors occurred!

Expected result:
- As with earlier versions of qgis, the build should succeed.

Fix:
- Add "USE_CCACHE" to CMAKE_OFF

-- Martin
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2025-02-23 19:31:33 UTC
(In reply to Martin Birgmeier from comment #0)

Hi Martin,
Thank you for pointing this out. I wasn't aware of the problem because I don't use CCACHE.

Surely this error should also occur with graphics/qgis-ltr?

I suspect that it is due to USES=compiler:features, which I use in both ports. I will test if this is still needed or can be replaced by something like compiler:c++11-lib ...

I will prepare patches for both ports. Many thanks again!
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-02-23 19:46:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dbfdce7f483b50aa47c98ea759158ed98d3829e8

commit dbfdce7f483b50aa47c98ea759158ed98d3829e8
Author:     Rainer Hurling <rhurlin@FreeBSD.org>
AuthorDate: 2025-02-23 19:34:37 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2025-02-23 19:45:26 +0000

    graphics/qgis: Disable usage of ccache

    If ccache is used, the build breaks with
    ccache: error: unknown configuration option "compiler_type"

    PR:             284996
    Reported by:    Martin Birgmeier <d8zNeCFG@aon.at>

 graphics/qgis/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-02-23 19:46:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5dedae8ffbfe2193d56eeafd37622c055f27f6ea

commit 5dedae8ffbfe2193d56eeafd37622c055f27f6ea
Author:     Rainer Hurling <rhurlin@FreeBSD.org>
AuthorDate: 2025-02-23 19:41:21 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2025-02-23 19:45:26 +0000

    graphics/qgis-ltr: Disable usage of ccache

    If ccache is used, the build breaks with
    ccache: error: unknown configuration option "compiler_type"

    PR:             284996
    Reported by:    Martin Birgmeier <d8zNeCFG@aon.at>

 graphics/qgis-ltr/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 Martin Birgmeier 2025-02-23 19:54:28 UTC
Hi Rainer,

Thank you for the quick fix.

I don't use -ltr, so I can't say. Since it started with 3.42.0, I thought that it was caused by an upstream change.

And thanks for fixing a bug which does not occur in poudriere (where ccache would not be installed) so that I can still use portmaster - some maintainers refuse to do this.

-- Martin
Comment 5 Rainer Hurling freebsd_committer freebsd_triage 2025-02-23 20:07:03 UTC
(In reply to Martin Birgmeier from comment #4)

I am also a heavy user of portmaster and always try to see if my changes work in Poudriere on the one hand and outside in unclean environments via portmaster on the other :)

I'm closing this PR now as it seems to be fixed. Thanks again and have fun with FreeBSD's QGIS!
Comment 6 Martin Birgmeier 2025-02-23 20:12:54 UTC
Hi Rainer,

Yes, QGIS on FreeBSD rocks!

Maybe you are also a heavy user of PostGIS, which together with QGIS is just awesome. And then you should try ogr_fdw, which is simply amazing. I made a fix to that port yesterday, you may want to look at bug 282948.

Best regards,

Martin
Comment 7 Rainer Hurling freebsd_committer freebsd_triage 2025-02-23 20:23:45 UTC
(In reply to Martin Birgmeier from comment #6)

> Maybe you are also a heavy user of PostGIS, which together
> with QGIS is just awesome. And then you should try ogr_fdw,
> which is simply amazing. I made a fix to that port yesterday,
> you may want to look at bug 282948.
Yes, I use PostGIS partly via PostgreSQL directly, but much more often via QGIS, SAGA GIS (math/saga) and R.

I didn't know databases/postgresql-ogr_fdw before, but will try it out in the near future. The port itself is in very good hands with Loïc Bartoletti. He will take care of the submitted PR :D
Comment 8 Anton Saietskii 2025-02-23 22:54:48 UTC
Instead of disabling ccache, perhaps it's better to fix its usage?