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

Compilation error for buffetfsm "forward declaration of 'sigaltstack'" #6

Open
r-marques opened this issue Nov 30, 2017 · 4 comments · May be fixed by #9
Open

Compilation error for buffetfsm "forward declaration of 'sigaltstack'" #6

r-marques opened this issue Nov 30, 2017 · 4 comments · May be fixed by #9

Comments

@r-marques
Copy link
Contributor

When running ./install_buffet.sh in an up to date Fedora 27 with gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) I get this error:

home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:239:22: error: variable has incomplete type
  COMPILE:   clang_linux/san-x86_64/x86_64: /home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc                
      'struct sigaltstack'                                                                                                                                                          
  struct sigaltstack handler_stack;                                                                                                                                                 
                     ^                                                                                                                                                              
/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.h:23:8: note: forward declaration of 'sigaltstack'                 
struct sigaltstack;                                                                                                                                                                 
       ^                                                                                                                                                                            
1 error generated.                                                                                                                                                                  
make[5]: *** [Makefile:268: /home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/tools/clang/runtime/compiler-rt/clang_linux/san-x86_64/x86_64/SubDir.lib__sanitizer_common/
sanitizer_stoptheworld_linux_libcdep.o] Error 1                                                                                                                                     
make[5]: *** Waiting for unfinished jobs....                                                                                                                                        
make[5]: Leaving directory '/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/projects/compiler-rt'                                                                            
make[4]: *** [Makefile:168: BuildRuntimeLibraries] Error 2                                                                                                                          
rm /home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/Release+Asserts/lib/clang/3.5.0/lib/linux/.dir                                                                      
make[4]: Leaving directory '/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/tools/clang/runtime/compiler-rt'                                                           
make[3]: *** [/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/Makefile.rules:936: compiler-rt/.makeall] Error 2                                                              
make[3]: Leaving directory '/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/tools/clang/runtime'                                                                       
make[2]: *** [/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/Makefile.rules:877: all] Error 1                                                                               
make[2]: Leaving directory '/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/tools/clang'                                                                               
make[1]: *** [/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/Makefile.rules:936: clang/.makeall] Error 2                                                                    
make[1]: Leaving directory '/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm-build/tools'                                                                                     
make: *** [/home/rodmar/code/repos/pequin/compiler/buffetfsm/llvm/Makefile.rules:877: all] Error 1 
@maxhowald
Copy link
Contributor

Thanks for reporting this!

Buffet is implemented as a set of patches against a version of clang that is now quite out of date, so it's not surprising that new compilers might fail to compile it.

We're working on a fix (either patching the old version of clang we use or making our patches work against a newer version), but in the meantime the best workaround I can offer is to use an older version of gcc (<= 6).

FYI, I was able to reproduce the build error you got using the exact OS and gcc version you mentioned, but not on Debian unstable with gcc 7.2.0.

@r-marques r-marques linked a pull request Dec 5, 2017 that will close this issue
@r-marques
Copy link
Contributor Author

r-marques commented Dec 5, 2017

I tried to compile against the latest version of llvm patched and the entire build process is working.
I created pr #9 if you want to take a look.

@r-marques
Copy link
Contributor Author

I also had a problem with the build process when compiling libsnark. My issue was the same as scipr-lab/libsnark#82 and scipr-lab/libsnark#86 (comment)

I also updated the installation scripts to use the latest version of libsnark and created a pr #10

With these two changes the entire build process works. My only problem now is when trying to run the examples it cannot find the libsnark headers. I see that they are installed under $DEPS_DIR.

@amirm20
Copy link

amirm20 commented Jun 7, 2018

I also when running ./install_buffet.sh in Ubuntu 17.10 I get this error:
screenshot from 2018-06-08 19-03-59

Please answer me as soon as possible.thank you

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

Successfully merging a pull request may close this issue.

3 participants