Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 747544 - dev-db/postgis: Automagic sys-libs/libcxx dependency
Summary: dev-db/postgis: Automagic sys-libs/libcxx dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on: 770094
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2020-10-10 11:14 UTC by Mart Raudsepp
Modified: 2022-03-26 20:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2020-10-10 11:14:28 UTC
If sys-libs/libcxx is present during postgis configure phase, it'll use it instead of libstdc++ as an automagic dependency that isn't expressed in RDEPEND.

Comes from configure.ac wagyu step:

            dnl ============================================================
            dnl Check if we can declare the c++ stdlib
            dnl ============================================================
            CC="$WAGYU_CXX"

            AC_CHECK_LIB(c++, main, [HAVE_CPP=yes], [HAVE_CPP=no])
            AC_CHECK_LIB(stdc++, main, [HAVE_STDCPP=yes], [HAVE_STDCPP=no])

            if test "x$HAVE_CPP" = "xyes"; then
                WAGYU_LDFLAGS="-lc++"
            elif test "x$HAVE_STDCPP" = "xyes"; then
                WAGYU_LDFLAGS="-lstdc++"
            else
                AC_MSG_WARN("Could not find a C++ standard library")
                WAGYU_LDFLAGS=""
            fi


This automagic needs to be fixed, or an explicit libcxx dep added.

!!! existing preserved libs:
>>> package: sys-libs/libcxx-10.0.1
 *  - /usr/lib64/libc++.so.1
 *  - /usr/lib64/libc++.so.1.0
 *      used by /usr/lib64/postgresql-11/lib64/postgis-3.so (dev-db/postgis-3.0.0-r1)
Comment 1 Aaron W. Swenson gentoo-dev 2020-12-19 12:25:20 UTC
(In reply to Mart Raudsepp from comment #0)
> If sys-libs/libcxx is present during postgis configure phase, it'll use it
> instead of libstdc++ as an automagic dependency that isn't expressed in
> RDEPEND.
> 
> Comes from configure.ac wagyu step:
> 
>             dnl ============================================================
>             dnl Check if we can declare the c++ stdlib
>             dnl ============================================================
>             CC="$WAGYU_CXX"
> 
>             AC_CHECK_LIB(c++, main, [HAVE_CPP=yes], [HAVE_CPP=no])
>             AC_CHECK_LIB(stdc++, main, [HAVE_STDCPP=yes], [HAVE_STDCPP=no])
> 
>             if test "x$HAVE_CPP" = "xyes"; then
>                 WAGYU_LDFLAGS="-lc++"
>             elif test "x$HAVE_STDCPP" = "xyes"; then
>                 WAGYU_LDFLAGS="-lstdc++"
>             else
>                 AC_MSG_WARN("Could not find a C++ standard library")
>                 WAGYU_LDFLAGS=""
>             fi
> 
> 
> This automagic needs to be fixed, or an explicit libcxx dep added.
> 
> !!! existing preserved libs:
> >>> package: sys-libs/libcxx-10.0.1
>  *  - /usr/lib64/libc++.so.1
>  *  - /usr/lib64/libc++.so.1.0
>  *      used by /usr/lib64/postgresql-11/lib64/postgis-3.so
> (dev-db/postgis-3.0.0-r1)


If I'm reading the history correctly, this was introduced with 3.0. We just need a c++11 compiler to get the Wagyu benefits. So, any currently supported GCC is sufficient.

The best fix here is to strip out the stdc++ portions, and leave the c++ portions intact.
Comment 2 Aaron W. Swenson gentoo-dev 2020-12-19 12:40:09 UTC
(In reply to Aaron W. Swenson from comment #1)
> The best fix here is to strip out the stdc++ portions, and leave the c++
> portions intact.

I meant that the other way around. Strip the c++ portions and leave the stdc++ bits.
Comment 3 Larry the Git Cow gentoo-dev 2020-12-24 03:46:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fa80295af29bf426677f4f7fbdb7dc1f0fc1f4e

commit 0fa80295af29bf426677f4f7fbdb7dc1f0fc1f4e
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2020-12-24 03:42:36 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2020-12-24 03:42:36 +0000

    dev-db/postgis: Version Bump and Fix
    
    Bump to 3.1.0.
    
    No longer auto-magically depend on libcxx, and tries more names for a compatible
    CPP interface.
    
    Bug: https://bugs.gentoo.org/731104
    Bug: https://bugs.gentoo.org/747544
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-db/postgis/Manifest                            |   1 +
 .../files/postgis-3.0.3-detect-only-stdc.patch     |  17 +++
 .../files/postgis-3.0.3-try-other-cpp-names.patch  |  12 ++
 dev-db/postgis/postgis-3.0.3-r2.ebuild             | 139 ++++++++++++++++++++
 dev-db/postgis/postgis-3.1.0.ebuild                | 140 +++++++++++++++++++++
 5 files changed, 309 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2021-02-23 15:29:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1114c7e9c6911a99f1b99c48699e53f465ac15c

commit b1114c7e9c6911a99f1b99c48699e53f465ac15c
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2021-02-23 15:28:24 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2021-02-23 15:28:24 +0000

    dev-db/postgis: Cleanup
    
    Closes: https://bugs.gentoo.org/731104
    Closes: https://bugs.gentoo.org/747544
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-db/postgis/Manifest                       |   7 --
 dev-db/postgis/metadata.xml                   |   3 -
 dev-db/postgis/postgis-2.5.3-r1.ebuild        | 135 -------------------------
 dev-db/postgis/postgis-2.5.4.ebuild           | 137 -------------------------
 dev-db/postgis/postgis-2.5.5.ebuild           | 137 -------------------------
 dev-db/postgis/postgis-3.0.0-r1.ebuild        | 135 -------------------------
 dev-db/postgis/postgis-3.0.1.ebuild           | 135 -------------------------
 dev-db/postgis/postgis-3.0.2.ebuild           | 135 -------------------------
 dev-db/postgis/postgis-3.0.3-r1.ebuild        | 138 --------------------------
 dev-db/postgis/postgis-3.1.0_alpha3-r1.ebuild | 138 --------------------------
 10 files changed, 1100 deletions(-)