-
Notifications
You must be signed in to change notification settings - Fork 613
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
cannot import name frontend #249
Comments
hi, do you solve it ? I meet the same problem :( |
@TaoTaoFu not yet. |
thanks, I will try it. @huyn |
i also came up this problem, how do you slove it@TaoTaoFu |
We can manually compile the frontend.so file. The following is the command I used. g++ -I /usr/include/python2.7 -I /home/yfeng23/utils/fbthrift -std=c++14 -fpic -shared -o frontend.so compiler.cc -lboost_python -lpython2.7 -L/build/lib -lcompiler_base -lcompiler_ast -lboost_system -lboost_filesystem -lssl -lcrypto |
@fengyang0317 I compile frontend.so as your advise and get frontend.so in /fbthrift/thrift/compiler/py/frontend.so but i still get the error: when i copy frontend.so to python2.7/dist-packages I can import frontend in python but still get that error when run ./build.sh how do you slove it? |
i have faced same problem on ubuntu16.04, and i solve it from related information. frontend.so can copile by script "g++ -I /usr/include/python2.7 -I ./fbthrift -std=c++14 -fpic -shared -o frontend.so compiler.cc -lboost_python -lpython2.7 -L/build/lib -lcompiler_base -lcompiler_ast -lboost_system -lboost_filesystem -lssl -lcrypto" . then faced another problem "relocation R_X86_64_32 against", fix CMakefile.txt add "set(CMAKE_CXX_FLAGS "-fPIC") |
I just want to say FUCK! waste me lots of time |
as @siahewei method I solve this, remember to make install After reinstall. |
As I said in facebookarchive/thpp#51 (comment) , you should copy |
@siahewei This is what I'm doing:
-- I'm enabling libs_only flag with cmake-gui for fbthrift
in this path I remember that I've seen the "compile only" in another package, maybe thift itself, do you think I've to recompile it again even adding these flags? |
@raffra which CMakefile.txt did you edit? Make sure it's the Makefile in /fbthrift/thrift/compiler, because there are multiple CMakefiles and after placing the flags in that file it worked. |
i have run this command under /fbthrift/thrift/compiler/py and added at the beginning of CMakefile.txt
still the same error `
` |
@engahmed1190 , I solved your problem, here is my operation.
after this, you get your frontend.so successfully. |
thx @githubgs
|
what @siahewei wrote was very helpful! I also compiled the python files afterwards, so the whole thing is:
|
I cant figure out what am i doing wrong here .. Please help me someone . |
Python front end is no loner needed |
When I was compiling th++ after installing folly and fbthrift, I encountered an error
I checked
frontend.so
underfbthrift
, but I could find it.My question is How should I do to generate
frontend.so
?Many thanks in advance.
The text was updated successfully, but these errors were encountered: