Here is what I did to produce the error:
{{{
python manage.py shell
>>>from django.contrib.gis.geos import MultiPolygon
>>>MultiPolygon()
[1] 34350 segmentation fault python manage.py shell
}}}
I have these relevant settings in my settings.py:
{{{
GDAL_LIBRARY_PATH = os.getenv("GDAL_LIBRARY_PATH")
GEOS_LIBRARY_PATH = os.getenv("GEOS_LIBRARY_PATH")
}}}
.env
{{{
export GDAL_LIBRARY_PATH=/opt/homebrew/lib/libgdal.dylib
export GEOS_LIBRARY_PATH=/opt/homebrew/lib/libgeos_c.dylib
}}}
uname -a:
{{{
Darwin Sebastians-MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0:
Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101
arm64
}}}
geos-config --version `3.9.1`
gdalinfo --version `GDAL 3.2.1, released 2020/12/29`
--
Ticket URL: <https://code.djangoproject.com/ticket/32544>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Claude Paroz (added)
* type: Bug => New feature
* version: 3.1 => 4.0
* stage: Unreviewed => Accepted
Comment:
GDAL 3.2 and GEOS 3.9 are not supported by Django, see
[https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/geolibs/
docs]. I've change this ticket to a new feature.
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:1>
Comment (by Aapo Rista):
I guess this is not related to GEOS or GDAL versions, but M1 CPU
architecture and the bug is in GEOS. See #32600.
I've in this Macbook Pro (13-inch, 2017, Intel Core i5) software listed
below and I've no problems with multi geometries.
{{{
$ python manage.py shell
Python 3.9.2 (default, Feb 24 2021, 13:26:09)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.contrib.gis.geos import MultiPolygon
>>> MultiPolygon()
<MultiPolygon object at 0x1057ab490>
}}}
My new Macbook Air (M1, 2020) throws Segmentation fault 11 (as seen in
#32600).
$ geos-config --version
3.9.1
$ gdalinfo --version
GDAL 3.2.2, released 2021/03/05
$ python -V
Python 3.9.2
$ uname -a
Darwin mymac.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21
00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:2>
Comment (by Mariusz Felisiak):
Aapo, thanks for details. Even if the crash is not related to GEOS or GDAL
versions, this ticket is still valid as we have some tests failures with
these versions.
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:3>
* owner: nobody => Claude Paroz
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:4>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/14212 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:5>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:6>
* needs_better_patch: 1 => 0
* type: New feature => Cleanup/optimization
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e3cfba0029516aafe40f963378e234df2c0d33bb" e3cfba00]:
{{{
#!CommitTicketReference repository=""
revision="e3cfba0029516aafe40f963378e234df2c0d33bb"
Fixed #32544 -- Confirmed support for GDAL 3.2 and GEOS 3.9.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:8>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"5eb17d31c365a58e77d32eea19b83ee5bae52f0c" 5eb17d31]:
{{{
#!CommitTicketReference repository=""
revision="5eb17d31c365a58e77d32eea19b83ee5bae52f0c"
[3.2.x] Fixed #32544 -- Confirmed support for GDAL 3.2 and GEOS 3.9.
Backport of e3cfba0029516aafe40f963378e234df2c0d33bb from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32544#comment:9>