fairseq: error: command 'gcc' failed with exit status 1 - fairseq/clib/libbleu/libbleu.cpp:9:10: fatal error: 'map' file not found
ython setup.py build develop running build running build_py running build_ext building ‘fairseq.libbleu’ extension gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jpope/miniconda3/envs/tf/include -arch x86_64 -I/Users/jpope/miniconda3/envs/tf/include -arch x86_64 -I/Users/jpope/miniconda3/envs/tf/include/python3.7m -c fairseq/clib/libbleu/libbleu.cpp -o build/temp.macosx-10.7-x86_64-3.7/fairseq/clib/libbleu/libbleu.o -std=c++11 fairseq/clib/libbleu/libbleu.cpp:9:10: fatal error: ‘map’ file not found #include <map> ^~~~~ 1 error generated. error: command ‘gcc’ failed with exit status 1
I’m on majove / 10.14 I have xcode 10.1 beta installed with command line tools.
xcodebuild -version && xcrun --find clang
--version
Xcode 9.4.1
Build version 9F2000
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Add specific compile flags for macOS (#862) Summary: Fairseq wouldn't install on macOS. A workaround was found here: https://github.com/pytorch/fairseq/issues/289 This is now automatic in setup.py, m... — committed to facebookresearch/fairseq by louismartin 5 years ago
- Support specifying iteration number of checkpoints for decoding. (#289) — committed to yfyeung/fairseq by csukuangfj 2 years ago
- Support specifying iteration number of checkpoints for decoding. (#336) See also #289 — committed to yfyeung/fairseq by csukuangfj 2 years ago
For mac os Mojave for me was using export CFLAGS=‘-stdlib=libc++’ before calling python setup.py install
For Linux system solution for me was using
export CFLAGS='-std=c++11'
before callingpython setup.py build develop
.THX a lot,you really help me ,it cost me a lot lot lot lot time to solve.feeling my brain is been eating by Zombi