-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: command 'gcc' failed with exit status 1 - fairseq/clib/libbleu/libbleu.cpp:9:10: fatal error: 'map' file not found #289
Comments
related - facebook/infer#37 |
actually - above error was on 9.4.1 I tried switching to 10.1 and same error. xcodebuild -version && |
setup.py bleu = Extension(
'fairseq.libbleu',
sources=[
'fairseq/clib/libbleu/libbleu.cpp',
'fairseq/clib/libbleu/module.cpp',
],
extra_compile_args=['-std=libc++'],
) this didn't work. Xcode 10 beta 4 - stdlibc++ headers not found; |
(tf) ➜ fairseq git:(master) ✗ gcc --version |
c++ --version
c++ (GCC) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE |
fixed it using DGTEST_USE_OWN_TR1_TUPLE=1 |
For Linux system solution for me was using |
For mac os Mojave for me was using export CFLAGS='-stdlib=libc++' before calling python setup.py install |
thanks a lot. It works for me. |
@tlikhomanenko I'm using Ubuntu but I'm still getting the same error even after exporting CFLAGS... any suggestion? This is the error I get:
|
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 |
Summary: Fairseq wouldn't install on macOS. A workaround was found here: #289 This is now automatic in setup.py, maybe be there's a cleaner way to do it. I checked that it compiles fine on Linux and macOS. Pull Request resolved: #862 Differential Revision: D16142105 Pulled By: myleott fbshipit-source-id: 998ac7781d7a1ac047f4f9239c1fe16eab4be0dd
Thank you @likeucode , it works also for me |
Also worked for me! Thank you ! |
Same problem. Any update? |
apt install python3-dev |
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
^~~~~
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
--versionXcode 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
The text was updated successfully, but these errors were encountered: