public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross Compile Gcc 10.2.0
@ 2020-08-14 21:21 Casey St.Fleur
  2020-08-15 17:00 ` Christer Solskogen
  2020-08-18  9:54 ` Jonathan Wakely
  0 siblings, 2 replies; 3+ messages in thread
From: Casey St.Fleur @ 2020-08-14 21:21 UTC (permalink / raw)
  To: gcc-help

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: ‘__constinit’ does not name a type
   92 |     __constinit constant_init<newdel_res_t> newdel_res{};
      |     ^~~~~~~~~~~
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:93:5: error: ‘__constinit’ does not name a type
   93 |     __constinit constant_init<null_res_t> null_res{};
      |     ^~~~~~~~~~~
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:146:5: error: ‘__constinit’ does not name a type
  146 |     __constinit constant_init<atomic_mem_res> default_res{&newdel_res.obj};
      |     ^~~~~~~~~~~
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::new_delete_resource()’:
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:154:13: error: ‘newdel_res’ was not declared in this scope
  154 |   { return &newdel_res.obj; }
      |             ^~~~~~~~~~
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::null_memory_resource()’:
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:158:13: error: ‘null_res’ was not declared in this scope
  158 |   { return &null_res.obj; }
      |             ^~~~~~~~
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::set_default_resource(std::pmr::memory_resource*)’:
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:165:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
  165 |     return default_res.obj.exchange(r);
      |            ^~~~~~~~~~~
      |            default_delete
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::get_default_resource()’:
../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:170:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
  170 |   { return default_res.obj.load(); }
      |            ^~~~~~~~~~~
      |            default_delete

It looks like build is failing because it is trying to build a C++ 17 feature using a C++ 20 keyword. I am not sure what to do from here, any help is greatly appreciated .

Here are the configure parameters I used to set up the build:

../gcc-10.2.0/configure  --prefix=/opt/gcc-10.2.0 --build=$MACHTYPE --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --with-gcc-major-version-only --program-suffix=-10.2 --program-prefix=arm-linux-gnueabihf- --enable-shared  --without-included-gettext --enable-threads=posix --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release

Additional Information:

I am running Ubuntu 20.04.1 LTS (Linux ubuntu Server 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ).

arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --without-target-system-zlib --enable-libpth-m2 --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu1)


Have a great day,

Casey S.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cross Compile Gcc 10.2.0
  2020-08-14 21:21 Cross Compile Gcc 10.2.0 Casey St.Fleur
@ 2020-08-15 17:00 ` Christer Solskogen
  2020-08-18  9:54 ` Jonathan Wakely
  1 sibling, 0 replies; 3+ messages in thread
From: Christer Solskogen @ 2020-08-15 17:00 UTC (permalink / raw)
  To: gcc-help

On 14.08.2020 23:21, 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: ‘__constinit’ does not name a type
>     92 |     __constinit constant_init<newdel_res_t> newdel_res{};
>        |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:93:5: error: ‘__constinit’ does not name a type
>     93 |     __constinit constant_init<null_res_t> null_res{};
>        |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:146:5: error: ‘__constinit’ does not name a type
>    146 |     __constinit constant_init<atomic_mem_res> default_res{&newdel_res.obj};
>        |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::new_delete_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:154:13: error: ‘newdel_res’ was not declared in this scope
>    154 |   { return &newdel_res.obj; }
>        |             ^~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::null_memory_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:158:13: error: ‘null_res’ was not declared in this scope
>    158 |   { return &null_res.obj; }
>        |             ^~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::set_default_resource(std::pmr::memory_resource*)’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:165:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
>    165 |     return default_res.obj.exchange(r);
>        |            ^~~~~~~~~~~
>        |            default_delete
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::get_default_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:170:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
>    170 |   { return default_res.obj.load(); }
>        |            ^~~~~~~~~~~
>        |            default_delete
> 
> It looks like build is failing because it is trying to build a C++ 17 feature using a C++ 20 keyword. I am not sure what to do from here, any help is greatly appreciated .
> 
> Here are the configure parameters I used to set up the build:
> 
> ../gcc-10.2.0/configure  --prefix=/opt/gcc-10.2.0 --build=$MACHTYPE --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --with-gcc-major-version-only --program-suffix=-10.2 --program-prefix=arm-linux-gnueabihf- --enable-shared  --without-included-gettext --enable-threads=posix --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release
> 

Try with fewer options. For example --enable-bootstrap won't and can't 
work with this setup.

-- 
chs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cross Compile Gcc 10.2.0
  2020-08-14 21:21 Cross Compile Gcc 10.2.0 Casey St.Fleur
  2020-08-15 17:00 ` Christer Solskogen
@ 2020-08-18  9:54 ` Jonathan Wakely
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2020-08-18  9:54 UTC (permalink / raw)
  To: Casey St.Fleur; +Cc: gcc-help

On Fri, 14 Aug 2020 at 22:23, Casey St.Fleur via Gcc-help
<gcc-help@gcc.gnu.org> 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: ‘__constinit’ does not name a type
>    92 |     __constinit constant_init<newdel_res_t> newdel_res{};
>       |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:93:5: error: ‘__constinit’ does not name a type
>    93 |     __constinit constant_init<null_res_t> null_res{};
>       |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:146:5: error: ‘__constinit’ does not name a type
>   146 |     __constinit constant_init<atomic_mem_res> default_res{&newdel_res.obj};
>       |     ^~~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::new_delete_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:154:13: error: ‘newdel_res’ was not declared in this scope
>   154 |   { return &newdel_res.obj; }
>       |             ^~~~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::null_memory_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:158:13: error: ‘null_res’ was not declared in this scope
>   158 |   { return &null_res.obj; }
>       |             ^~~~~~~~
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::set_default_resource(std::pmr::memory_resource*)’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:165:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
>   165 |     return default_res.obj.exchange(r);
>       |            ^~~~~~~~~~~
>       |            default_delete
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function ‘std::pmr::memory_resource* std::pmr::get_default_resource()’:
> ../../../../../gcc-10.2.0/libstdc++-v3/src/c++17/memory_resource.cc:170:12: error: ‘default_res’ was not declared in this scope; did you mean ‘default_delete’?
>   170 |   { return default_res.obj.load(); }
>       |            ^~~~~~~~~~~
>       |            default_delete
>
> It looks like build is failing because it is trying to build a C++ 17 feature using a C++ 20 keyword. I am not sure what to do from here, any help is 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-18  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 21:21 Cross Compile Gcc 10.2.0 Casey St.Fleur
2020-08-15 17:00 ` Christer Solskogen
2020-08-18  9:54 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).