Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2022 21:34:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 262768] databases/postgis31 does not work on i386: Undefined symbol "_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj"
Message-ID:  <bug-262768-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262768

            Bug ID: 262768
           Summary: databases/postgis31 does not work on i386: Undefined
                    symbol
                    "_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj"
           Product: Ports & Packages
           Version: Latest
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: lbartoletti@FreeBSD.org
          Reporter: mark@kane.mn
             Flags: maintainer-feedback?(lbartoletti@FreeBSD.org)
          Assignee: lbartoletti@FreeBSD.org

databases/postgis31 works perfectly on amd64, however on many i386 machines
with either postgresql13-server or postgresql12-server it fails with "Undef=
ined
symbol" errors.

postgis31-3.1.5 from official "latest" package repo on a fresh FreeBSD
13.0-RELEASE-p8 i386 install:

----------
postgres=3D# CREATE DATABASE postgistest;
CREATE DATABASE
postgres=3D# \c postgistest
You are now connected to database "postgistest" as user "postgres".
postgistest=3D# CREATE EXTENSION postgis;
ERROR:  could not load library "/usr/local/lib/postgresql/postgis-3.so":
/usr/local/lib/postgresql/postgis-3.so: Undefined symbol
"_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj"
postgistest=3D#=20
----------

Some searching suggests this might be related to a library mismatch between
base and ports. I notice the i386 library that does not work is linking to
libgcc_s.so.1 from the gcc10 port:

i386# ldd /usr/local/lib/postgresql/postgis-3.so | grep libgcc
        libgcc_s.so.1 =3D> /usr/local/lib/gcc10/libgcc_s.so.1 (0x207a4000)
i386#=20

while the working amd64 machine is linking to base libgcc_s.so.1:

amd64# ldd /usr/local/lib/postgresql/postgis-3.so | grep gcc
        libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x80169b000)
amd64#

I have tried playing around with LD_LIBRARY_PATH/LD_PRELOAD but have not fo=
und
a working combination as postgresql-server itself appears to need the ports
gcc10 libgcc_s.so.1.

FYI this also affects databases/postgis32 on i386, although the undefined
symbol is different with 3.2:

postgistest=3D# CREATE EXTENSION postgis;
ERROR:  could not load library "/usr/local/lib/postgresql/postgis-3.so":
/usr/local/lib/postgresql/postgis-3.so: Undefined symbol
"_ZNSt8ios_base4InitD1Ev"
postgistest=3D#

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262768-7788>