This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Can't build with cmake and g++ 9.2.0 #16
Comments
Do you have this problem when building without cmake (manually calling GCC)? |
Nope, does not work: c++ sample.cpp -o ./build/sample
g++ sample.cpp -o ./build/sample
clang++ sample.cpp -o ./build/sample Same Error... Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
gcc version 9.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-o' './build/sample' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/cc1plus -quiet -v -D_GNU_SOURCE sample.cpp -quiet -dumpbase sample.cpp -mtune=generic -march=x86-64 -auxbase sample -version -o /tmp/ccukPxng.s
GNU C++14 (GCC) version 9.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/x86_64-pc-linux-gnu
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/backward
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include
/usr/local/include
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed
/usr/include
End of search list.
GNU C++14 (GCC) version 9.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e70628160ff7c7e477f7d9570e6637cb
In file included from /usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/include/c++/9.2.0/bits/allocator.h:46,
from /usr/include/c++/9.2.0/string:41,
from /usr/include/c++/9.2.0/bits/locale_classes.h:40,
from /usr/include/c++/9.2.0/bits/ios_base.h:41,
from /usr/include/c++/9.2.0/ios:42,
from /usr/include/c++/9.2.0/ostream:38,
from /usr/include/c++/9.2.0/iostream:39,
from sample.cpp:23:
/usr/include/c++/9.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = ECS::Entity; _Args = {ECS::World*, long unsigned int&}; _Tp = ECS::Entity]’:
/usr/include/c++/9.2.0/bits/alloc_traits.h:482:2: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = ECS::Entity; _Args = {ECS::World*, long unsigned int&}; _Tp = ECS::Entity; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<ECS::Entity>]’
ECS.h:454:87: required from here
/usr/include/c++/9.2.0/ext/new_allocator.h:145:20: error: invalid use of incomplete type ‘class ECS::Entity’
145 | noexcept(noexcept(::new((void *)__p)
| ^~~~~~~~~~~~~~~~~~
146 | _Up(std::forward<_Args>(__args)...)))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from sample.cpp:25:
ECS.h:131:8: note: forward declaration of ‘class ECS::Entity’
131 | class Entity;
| ^~~~~~ Edit: |
If that fixes it feel free to send a PR. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I try to build ECS with my other Project (didn't work), so I fork ESC and add my typical cmake-file and compiler-options (try out C++14 and C++17): https://github.com/abeimler/ECS
OS: Arch Linux x86_64 (4.16.81-1-MANJARO)
Compiler: c++ (GCC) 9.2.0
CMake: 3.15.5
Build:
Error:
The text was updated successfully, but these errors were encountered: