From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by sourceware.org (Postfix) with ESMTPS id 5AB563858D38 for ; Tue, 18 Aug 2020 09:54:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5AB563858D38 Received: by mail-io1-xd35.google.com with SMTP id g13so6281898ioo.9 for ; Tue, 18 Aug 2020 02:54:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wT1JZu4QrpgitHQxeiArJNhE8VN2VnPXO+lftXNzgkE=; b=guPUO5+TWcwXkiTgKZX85brsOmo61+OUgNgSUEq6HPKIa1nG0trEPHfZ78hwVons2k GaPYDx9wcif33HIHrrpUPgbVd9nckcuh1j0PmBWUoumYdsemg0EBed6kmpXpjGPa7GHV fmWjH16OlXu8EgAg3MxiS1PidkB5i+zB/VlFlMJkScVo1TS8h8tkWfCNXmp2Ap50CbXz eRqoQJYMDF7bk8bacN3thg/E/W8ziSfb23k27lT1jfDZzfGBz7N7iTMh7LBf1ipvrG4h QzQcj26pGYy2m/b3wv6xIX0dFajuHmV68aVsF1LFrV0Oyjhflkg4EXsQXyQoxPBIdIpa aRXg== X-Gm-Message-State: AOAM5325rnJlzrHeWMtdpB2CAIktGyrFgfWOLX88DufvNDS2P7x/4o20 0aEc57HV+/q+wcB4B4goOpO1hmkHq/CYW9KmqhA= X-Google-Smtp-Source: ABdhPJxt7rZtvVMN+7H0KdTRg/ByRbfhXdHBuvLfrKpJ3fvogSGeeS19NZFR6quRYgEcC7bZl+cD2J4L9shlU+q1Asc= X-Received: by 2002:a6b:7e41:: with SMTP id k1mr15708214ioq.130.1597744493723; Tue, 18 Aug 2020 02:54:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 18 Aug 2020 10:54:42 +0100 Message-ID: Subject: Re: Cross Compile Gcc 10.2.0 To: "Casey St.Fleur" Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 09:54:55 -0000 On Fri, 14 Aug 2020 at 22:23, Casey St.Fleur via Gcc-help wrote: > > Hi all, > > I am trying to build GCC 10.2 using Ubuntu's Arm cross compiler. > > But I am getting the following error, > > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:92:5:= error: =E2=80=98__constinit=E2=80=99 does not name a type > 92 | __constinit constant_init newdel_res{}; > | ^~~~~~~~~~~ > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:93:5:= error: =E2=80=98__constinit=E2=80=99 does not name a type > 93 | __constinit constant_init null_res{}; > | ^~~~~~~~~~~ > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:146:5= : error: =E2=80=98__constinit=E2=80=99 does not name a type > 146 | __constinit constant_init default_res{&newdel= _res.obj}; > | ^~~~~~~~~~~ > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In f= unction =E2=80=98std::pmr::memory_resource* std::pmr::new_delete_resource()= =E2=80=99: > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:154:1= 3: error: =E2=80=98newdel_res=E2=80=99 was not declared in this scope > 154 | { return &newdel_res.obj; } > | ^~~~~~~~~~ > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In f= unction =E2=80=98std::pmr::memory_resource* std::pmr::null_memory_resource(= )=E2=80=99: > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:158:1= 3: error: =E2=80=98null_res=E2=80=99 was not declared in this scope > 158 | { return &null_res.obj; } > | ^~~~~~~~ > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In f= unction =E2=80=98std::pmr::memory_resource* std::pmr::set_default_resource(= std::pmr::memory_resource*)=E2=80=99: > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:165:1= 2: error: =E2=80=98default_res=E2=80=99 was not declared in this scope; did= you mean =E2=80=98default_delete=E2=80=99? > 165 | return default_res.obj.exchange(r); > | ^~~~~~~~~~~ > | default_delete > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In f= unction =E2=80=98std::pmr::memory_resource* std::pmr::get_default_resource(= )=E2=80=99: > ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:170:1= 2: error: =E2=80=98default_res=E2=80=99 was not declared in this scope; did= you mean =E2=80=98default_delete=E2=80=99? > 170 | { return default_res.obj.load(); } > | ^~~~~~~~~~~ > | default_delete > > It looks like build is failing because it is trying to build a C++ 17 fea= ture using a C++ 20 keyword. I am not sure what to do from here, any help i= s greatly appreciated . __constinit is not a C++20 keyword, it's a GCC extension. The C++20 keyword is 'constinit'. The GCC extension is supported since GCC 10.1, so the errors you are getting mean that libstdc++ is not being built by the right compiler.