Closed arves100 closed 3 years ago
I'm using gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
and I don't see this issue.
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
I'm using
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
and I don't see this issue.
I'm using your same gcc version under WSL and I got this error, perhaps is something wrong I did during bgfx generation? I runned genie --with-avx --gcc=linux-gcc --platform=x64 then runned make config=debug64
You don't need --platform=x64
.
I assume this issue might be something with WSL?
I assume this issue might be something with WSL?
I got this error as well with Debian 10 (gcc 8) running on a real machine
Hi, I'm terribly sorry to necroposting a June 2021 issue, but the issue is actually present, altrough my comment and name of the PR is 100% wrong. First of all, this issue is not raised up when using --platform=x64 or a normal 64-bit machine, as you pointed out that was why I was wrong when claiming it did, but this issue is actually raised up when compiling bgfx on a 32-bit platform (or using --platform=x32 on a 64-bit machine), not on old compiler or 64-bit platform as I originally said. I'm sorry again for giving a wrong information to this PR, feel free to let me know if it's actually some issue in my end.
The compilation was tested on a Debian 11 i686 machine with Gcc 10. My bgfx configuration command line: ../bx/tools/bin/linux/genie --with-tools --with-avx --gcc=linux-gcc gmake
Looks like I have same problem with building on arm32 Linux (Armbian/Ubuntu on rk3288). My build steps:
bgfx$ ../bx/tools/bin/linux/genie --with-tools --with-combined-examples --with-shared-lib --gcc=linux-arm-gcc gmake
bgfx$ make -j$(nproc) -C .build/projects/gmake-linux-arm-gcc config=release
and here is error:
==== Building bimg_encode (release) ====
astc_averages_and_directions.cpp
In file included from ../../../../bimg/3rdparty/astc/mathlib.h:20,
from ../../../../bimg/3rdparty/astc/astc_codec_internals.h:23,
from ../../../../bimg/3rdparty/astc/astc_averages_and_directions.cpp:17:
../../../../bimg/3rdparty/astc/vectypes.h:21:18: error: conflicting declaration ‘typedef uint64_t ulong’
21 | typedef uint64_t ulong;
| ^~~~~
In file included from /usr/include/stdlib.h:394,
from /usr/include/c++/9/cstdlib:75,
from /usr/include/c++/9/stdlib.h:36,
from ../../../../bimg/3rdparty/astc/astc_codec_internals.h:21,
from ../../../../bimg/3rdparty/astc/astc_averages_and_directions.cpp:17:
/usr/include/arm-linux-gnueabihf/sys/types.h:148:27: note: previous declaration as ‘typedef long unsigned int ulong’
148 | typedef unsigned long int ulong;
| ^~~~~
Try: config=release32
Try:
config=release32
It gives much more errors at start:
Looks like bug appear after this PR: https://github.com/bkaradzic/bimg/pull/54 If you want to fix bug + improve code - you can update from upstream. This file was deleted there: https://github.com/ARM-software/astc-encoder/commit/9629e405129931554e6e6e634b360ff9d07ac7a2
Under Gcc9 (Ubuntu 20 WSL) and Gcc8 (Debian 10), bimg will fail to compile due to sys/types.h already defining "uint", "ushort" and "ulong" types.
This commit skips the definition of this three types in vectypes.h if __USE_MISC is defined. (compatibility with old C names)