[postgis-tickets] [PostGIS] #5121: winnie is broken with this strange error lto1.exe: internal compiler error: in gen_subprogram_die, at dwarf2out.c:22668

PostGIS trac at osgeo.org
Thu Mar 31 03:50:29 PDT 2022


#5121: winnie is broken with this strange error lto1.exe: internal compiler error:
in gen_subprogram_die, at dwarf2out.c:22668
------------------------+---------------------------
  Reporter:  robe       |      Owner:  robe
      Type:  defect     |     Status:  new
  Priority:  blocker    |  Milestone:  PostGIS 3.3.0
 Component:  buildbots  |    Version:  master
Resolution:             |   Keywords:
------------------------+---------------------------

Comment (by sergeish):

 Hi,

 I made that breaking commit, link to Github PR:
 https://github.com/postgis/postgis/pull/678

 I managed to replicate the issue on x86 FreeBSD 12 by installing gcc8 and
 gcc10, postgresql13-client (and required libraries), configuring with

 `../configure CC=gcc8 CXX=g++8 AR=gcc-ar8 RANLIB=gcc-ranlib8 CXXFLAGS='-O2
 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc8
 -nostdinc++ -isystem /usr/include/c++/v1 -Wl,-rpath=/usr/local/lib/gcc8'
 CFLAGS='-Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels
 -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv
 -fexcess-precision=standard -Wno-format-trunc' '--with-
 libiconv=/usr/local' --without-interrupt-tests`

 (FreeBSD test explicitly sets CC and CXX, but `configure` fails to select
 correct ar/ranlib, since they are not called gcc-ar/gcc-ranlib but gcc-ar8
 /gcc-ranlig8 (please see attached log), so I set them explicitly.)

 The problem is a compiler version (LTO version) mismatch between selected
 gcc8 and gcc10 in PGXS `Makefile.global`
 (`/usr/local/lib/postgresql/pgxs/src/Makefile.global`).
 I tried to fix this by setting `CUSTOM_CC` before including pgxs.mk
 (/usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk) and that allowed to
 build the extensions. PR draft:
 https://github.com/postgis/postgis/pull/679

 This is not quite a solution since CFLAGS in `Makefile.global` in this
 case still contains `-Wl,-rpath=/usr/local/lib/gcc10` and cannot be
 overwritten (but flags can be appended by setting CUSTOM_COPTS or
 PG_CFLAGS) and `postgis-3.so` has incorrect `/usr/local/lib/gcc10`
 runpath.

 I haven't tried building with MinGW yet.

 That's as far as I could get for now, will appreciate any help.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5121#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list