Bug 241096 - graphics/qgis: Fix build on i386
Summary: graphics/qgis: Fix build on i386
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-06 11:18 UTC by Rainer Hurling
Modified: 2019-11-04 16:30 UTC (History)
4 users (show)

See Also:


Attachments
Patch to fix build on i386 and some minor improvements (1.61 KB, patch)
2019-10-06 11:18 UTC, Rainer Hurling
rhurlin: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling 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 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 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 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 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 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 ?