Bug 241096

Summary: graphics/qgis: Fix build on i386
Product: Ports & Packages Reporter: Rainer Hurling <rhurlin>
Component: Individual Port(s)Assignee: Raphael Kubo da Costa <rakuco>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: linimon, rakuco, rhurlin, tcberner
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to fix build on i386 and some minor improvements rhurlin: maintainer-approval+

Description Rainer Hurling freebsd_committer freebsd_triage 2019-10-06 11:18:04 UTC
Created attachment 208134 [details]
Patch to fix build on i386 and some minor improvements

For some time now, the Poudriere package builder complains about graphics/qgis on i386 (all FreeBSD versions) not able to build. 

This happens with all clang versions but 6.x, because newer clang versions (especially 9.x) do have problems with QT5 QMap and the long list in src/core/qgscoordinatereferencesystem_legacy.h.

To circumstance this, the patch introduces a test for ARCH=i386 and then using clang60 instead of clang90.


While here, the patch also removes the shebang for python scripts and the knob for GRASS_FORCE_MAKE_JOBS=no. Both are not necessary any more since the change from python2 to python3 and some improvements in databases/grass7. Many thanks to Loïc Bartoletti for the hints!


The patch is tested on Poudriere (11.3i/a, 12.0i/a, and HEADi/a),
'portlint -AC' seems happy.
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2019-11-02 19:04:55 UTC
Moin moin

I'm not sure whether introducing a dependency on an ancient llvm is a great solution (who knows how long that port will exist for).


mfg Tobias
Comment 2 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-11-03 11:34:12 UTC
I've filed bug 241687 to track why clang is crashing when building this port.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2019-11-03 22:03:10 UTC
(In reply to Tobias C. Berner from comment #1)

We are now down to 11 ports dependent on llvm60 and it has taken some work to get down that far.  I would really hope we can keep getting closer to zero so that we can drop llvm60.  The amount of time needed to compile all the required compilers for the whole tree on !amd64 is painful.

For more on this effort, please see:

https://wiki.freebsd.org/HardcodedLLVMVersions
Comment 4 Rainer Hurling freebsd_committer freebsd_triage 2019-11-04 06:06:08 UTC
(In reply to Mark Linimon from comment #3)

I am absolutely with you. The usage of llvm60 for QGIS on i386 is only a workaround, until we (or llvm or qgis community) found a solution for the big waste of memory, when using QT5 QMap with clang.
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-11-04 09:11:19 UTC
I wonder if the workaround described in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241687#c5 would be enough for getting the port to build with devel/llvm90 for now.
Comment 6 Rainer Hurling freebsd_committer freebsd_triage 2019-11-04 16:30:06 UTC
(In reply to Raphael Kubo da Costa from comment #5)

I just tried with CFLAGS+=-O1 and CXXFLAGS+=O1 in the ports Makefile. It works with clang9 on i386, but build time is about six times longer now than with -O2 (clang9 on the same box, but amd64).

Is there any possibility to limit -O1 to only src/core/qgscoordinatereferencesystem_legacy.* and to build everything else with -O2 ?
Comment 7 Rainer Hurling freebsd_committer freebsd_triage 2019-12-10 21:04:47 UTC
I just filed a patch to update graphics/qgis from 3.8.2 to 3.10.1 [1]. After that patch is committed, this bug #241096 should be obsolet.


[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242557
Comment 8 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-12-20 16:47:34 UTC
Closing, this got fixed in bug 242557.