Open marxin opened 2 years ago
May I please ping this?
GCC 13 is now default in some distros
GCC 13 is now default in some distros
Just encountered this on my Arch Linux distribution myself, and they had switched a week ago. Until this issue gets resolved, the workaround is to install GCC 12 (might be labelled as the gcc-12
or gcc12
package depending on the distro) and override the default compiler with env CC=gcc-12 <MAKE COMMAND>
. With that, I was able to get fasttext Python package.
The change in the PR (#1340) supposed to fix this "bug" is not correct (anymore?) : while compiling src/args.cc
using make, I get: src/args.h:16:1: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
This is probably because args.h
is included before cstdint
.
Maybe better with the log of the commands used and their output, they are part of a Dockerfile build:
> [ftbuild 3/5] RUN git clone https://github.com/facebookresearch/fastText.git /tmp/fastText && rm -rf /tmp/fastText/.git* && mv /tmp/fastText/* / && cd / && make:
0.184 Cloning into '/tmp/fastText'...
1.368 c++ -pthread -std=c++17 -march=native -O3 -funroll-loops -DNDEBUG -c src/args.cc
1.608 In file included from src/args.cc:9:
1.608 src/args.h:92:3: error: 'int64_t' does not name a type
1.608 92 | int64_t getAutotuneModelSize() const;
1.608 | ^~~~~~~
1.608 src/args.h:16:1: note: 'int64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
1.608 15 | #include <vector>
1.608 +++ |+#include <cstdint>
1.608 16 |
1.642 src/args.cc:456:9: error: no declaration matches 'int64_t fasttext::Args::getAutotuneModelSize() const'
1.642 456 | int64_t Args::getAutotuneModelSize() const {
1.642 | ^~~~
1.642 src/args.cc:456:9: note: no functions named 'int64_t fasttext::Args::getAutotuneModelSize() const'
1.642 src/args.h:30:7: note: 'class fasttext::Args' defined here
1.642 30 | class Args {
1.642 | ^~~~
1.688 make: *** [Makefile:30: args.o] Error 1
Fails with:
due to: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes