Skip to content
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

installation failure on Mac OS with gcc 8.2: fatal error: 'random' file not found #44

Closed
chengwq613 opened this issue Aug 13, 2018 · 7 comments

Comments

@chengwq613
Copy link

ERROR MESSAGES:
src/pyfasttext.cpp:648:10: fatal error: 'random' file not found
#include . ^~~~~~~~ . 1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1

Have installed gcc and LLVM...
UK-xxxx:vercheng$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.40.1)
Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

tried this: #24
didn't help
wondering if it's due to gcc latest version 8.2
Thanks

@mrdbourke
Copy link

I'm having this issue too. Did you manage to fix it?

@chengwq613
Copy link
Author

no haven't I'm awaiting solutions from here...

@petrLorenc
Copy link

try
CXX=/usr/local/bin/g++-8 CC=/usr/local/bin/g++-8 pip3 install --no-cache pyfasttext

@chengwq613
Copy link
Author

Thanks and it works!!

@anujgupta82
Copy link

anujgupta82 commented Mar 12, 2019

Didnt work for me

gcc --version gives
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

It fails with lot of errors. Last few lines being:
error: 'struct cysigs_t' has no member named 'sig_on_count'
if (unlikely(cysigs.sig_on_count <= 0))
^~~~~~~~~~~~
src/pyfasttext.cpp:841:43: note: in definition of macro 'unlikely'
#define unlikely(x) __builtin_expect(!!(x), 0)
^
error: command '/usr/local/bin/g++-8' failed with exit status 1

any suggestions?

@argideritzalpea
Copy link

@anujgupta82 Hey - did you ever figure this out? I have the same error and the above solutions didn't work for me.

@jaklan
Copy link

jaklan commented Apr 16, 2019

@anujgupta82 @argideritzalpea I have the same problem - have you found any solution? I tried all methods mentioned in pyfasttext issues and some custom tricks e.g. with CXXFLAGS and still no luck...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants