Build failure for PGI with -std=c++17 and libstdc++ from GCC 9.2

Issue #290 invalid
Paul Hargrove created an issue

I have installs of PGI 19.10 (the latest) on ppc64el and x86_64 systems.
Both are backed by libstdc++ from GCC 9.2 (also the latest).

On either system, the following is sufficient to reproduce my problem.
This specific transcript is from Dirac.

$ module load pgi
$ rm -rf .nobs
$ CXX='pgc++ -std=c++17' CC=pgcc ./run-tests
UPCXX revision: upcxx-2019.9.1-84-g4719dd4
System: Linux pcp-d-6 3.10.0-693.1.1.el7.x86_64 #1 SMP Tue Aug 15 08:36:44 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 7.4 (Nitrogen)
Release:        7.4
Codename:       Nitrogen

Date: Wed Dec 11 15:16:33 PST 2019
Current directory: /home/pcp1/phargrov/upcxx
Install directory:
Settings: CC='pgcc' CXX='pgc++ -std=c++17'

/usr/bin/python2.7:  Python 2.7.5

Checking platform...
/usr/local/pkg/pgi/linux86-64/19.10/bin/pgc++ -std=c++17

pgc++ 19.10-0 LLVM 64-bit target on x86-64 Linux -tp nehalem
PGI Compilers and Tools
Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.
/usr/local/pkg/pgi/linux86-64/19.10/bin/pgcc

pgcc 19.10-0 LLVM 64-bit target on x86-64 Linux -tp nehalem
PGI Compilers and Tools
Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.

Using udp conduit (set environment variable CONDUIT=<udp|smp|ibv|aries> to change)
Detected 16 hardware threads, running with RANKS=8 (set environment variable RANKS=<ranks> to change)
Running tests on 8 ranks
Setting up upcxx... (this may take a while)
Setup failed, the trace can be found in test/run-tests.err
{phargrov@pcp-d-6 upcxx}$ tail -25 test/run-tests.err
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pkg/pgi/linux86-64/19.10/bin/pgc++ -std=c++17 -D_GNU_SOURCE=1 -I/home/pcp1/phargrov/upcxx/.nobs/art/efa879469707e554d39693a1de3b01df8db1a9b5 -DUPCXX_ASSERT_ENABLED=1 -DUPCXX_BACKEND=1 -DUPCXX_BACKEND_GASNET_SEQ=1 -DUPCXX_MPSC_QUEUE_ATOMIC=1 -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/udp-conduit -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/other -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/other/amudp -I/home/pcp1/phargrov/upcxx/.nobs/art/de335e56f8262cd449795b2146ca5efe4b04a5dd/other/amudp -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/extended-ref/vis -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/extended-ref/coll -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/extended-ref/ratomic -I/home/pcp1/phargrov/upcxx/.nobs/art/fddafa49160441d7b448c86badf8259bd838e189/GASNet-stable/extended-ref -I/home/pcp1/phargrov/upcxx/.nobs/art/de335e56f8262cd449795b2146ca5efe4b04a5dd -O0 -g -g -w -Masmkeyword -Msignextend -c /home/pcp1/phargrov/upcxx/test/hello_upcxx.cpp -o /home/pcp1/phargrov/upcxx/.nobs/art/584161e48cc21c6303a4720ee573144fdc4aa8f1.hello_upcxx.cpp.o

"/usr/local/pkg/gcc/9.2.0/include/c++/9.2.0/tuple", line 553: error: pack
          "_UElements" does not have the same number of elements as "_Elements"
            __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value;
                                                     ^
          detected during:
            instantiation of "bool
                      std::tuple<_Elements...>::__nothrow_assignable<_UElements
                      ...>() [with _Elements=<upcxx::team &>, _UElements=<>]"
                      at line 49 of
                      "/home/pcp1/phargrov/upcxx/.nobs/art/efa879469707e554d396
                      93a1de3b01df8db1a9b5/upcxx/future/impl_result.hpp"
            instantiation of class "upcxx::detail::future_impl_result<T...>
                      [with T=<upcxx::team &>]" at line 80 of
                      "/home/pcp1/phargrov/upcxx/.nobs/art/efa879469707e554d396
                      93a1de3b01df8db1a9b5/upcxx/future/future1.hpp"
            instantiation of class "upcxx::future1<Kind, T...> [with
                      Kind=upcxx::detail::future_kind_result, T=<upcxx::team
                      &>]" at line 46 of
                      "/home/pcp1/phargrov/upcxx/.nobs/art/efa879469707e554d396
                      93a1de3b01df8db1a9b5/upcxx/team_fwd.hpp"

1 error detected in the compilation of "/home/pcp1/phargrov/upcxx/test/hello_upcxx.cpp".

Comments (11)

  1. Paul Hargrove reporter

    For the record, this is NOT simply bad libstdc++, since the following uses the same headers/libs and works fine:

    $ CXX='g++ -std=c++17' CC=gcc ./run-tests
    

    I am going to see about collecting some additional info, including answers to at least the following:

    • ✅ Does 2019.9.0 have this issue?
    • ✅ Does the current develop (results above are from PR#134 branch)?
    • ❎Does an older libstdc++ (e.g. from GCC-8.x) have this problem?

    UPDATE: adding checkmarks as I address the items above

  2. Paul Hargrove reporter

    I've confirmed the same failure in current develop and in the 2019.9.0 release.
    The issue description has been updated with a transcript of the failure on develop.

  3. Paul Hargrove reporter

    An install of PGI-19.17 backed by GCC-8.3 fails in an entirely different manner: with numerous instances of /usr/include/c++/8/new:197: undefined reference to '__builtin_launder'. This is the same error reported in issue #289 when only the tests (not libupcxx) was built with -std=cxx17.

    As far as I can tell, that issue is probably a matter of GCC-8 being too old for PGI-19.10.

    Meanwhile, the failure reported in this issue appears to at least potentially be an actual error in our code. So, @john bachan , I am turning this over to you now.

  4. Paul Hargrove reporter
    • changed component to External
    • removed responsible
    • marked as minor

    With issue #289 ('__builtin_launder' link failure) resolve, I am revisiting this issue using with libstdc++ from GCC-8.3. Doing so, I find (as with issue #302 I created for the analogous error seen with Intel compilers), that the problem does appear to be specific to the use of GCC-9.2 headers.

    I have reconfigured the PGI installs on Dirac to use GCC-8.3.0, rather than 9.2.0.
    I am also updating the metadata to reflect that this is an "external" problem.
    Specifically, it was probably erroneous for me to install the PGI compilers against GCC-9.2.

  5. Paul Hargrove reporter

    There were two issues underlying the original report.
    One was resolved as issue 289.
    The remaining problems were the result of an invalid pairing (by the sysadmin == me) of a PGI compiler with a "too new" libstdc++.

  6. Log in to comment