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

Fedora compilation failed. #422

Closed
PowerSnail opened this issue Oct 20, 2017 · 2 comments
Closed

Fedora compilation failed. #422

PowerSnail opened this issue Oct 20, 2017 · 2 comments

Comments

@PowerSnail
Copy link

I checked out v1.10.6, and tried to compile conky as suggested in the wiki. I did not change any configuration in ccmake ... Running make gave two errors:

  1. error: 'function' in namespace 'std' does not name a template type
  2. error: 'cpp_function' does not name a type; did you mena 'lua_KFunction'?

(full log at the end)

I tried the master branch as well, the same error was produced.

My OS: Fedora 26 64-bit

~ > cmake --version
cmake version 3.9.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

~ > make --version
GNU Make 4.2.1
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Output of make:

Scanning dependencies of target convertconf                                                                                                                                                                                                  
[  1%] Generating convertconf.h                                                                                                                                                                                                              
[  1%] Built target convertconf                                                                                                                                                                                                              
Scanning dependencies of target defconfig                                                                                                                                                                                                    
[  3%] Generating defconfig.h                                                                                                                                                                                                                
[  3%] Built target defconfig                                                                                                                                                                                                                
Scanning dependencies of target tcp-portmon                                                                                                                                                                                                  
[  5%] Building CXX object src/CMakeFiles/tcp-portmon.dir/libtcp-portmon.cc.o                                                                                                                                                                
[  7%] Linking CXX static library libtcp-portmon.a                                                                                                                                                                                           
[  7%] Built target tcp-portmon                            
Scanning dependencies of target conky                      
[  9%] Building CXX object src/CMakeFiles/conky.dir/c++wrap.cc.o                                                      
[ 11%] Building CXX object src/CMakeFiles/conky.dir/colours.cc.o     
In file included from /home/henry/software/conky/src/update-cb.hh:39:0,                                     
                 from /home/henry/software/conky/src/text_object.h:35,                                      
                 from /home/henry/software/conky/src/common.h:34,                                           
                 from /home/henry/software/conky/src/conky.h:37,                                            
                 from /home/henry/software/conky/src/colours.cc:30:                                         
/home/henry/software/conky/src/semaphore.hh:40:36: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
  semaphore(unsigned int value = 0) throw(std::logic_error)                                                 
                                    ^~~~~             
/home/henry/software/conky/src/semaphore.hh:49:14: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
  void post() throw(std::overflow_error)              
              ^~~~~        
In file included from /home/henry/software/conky/src/setting.hh:32:0,                                       
                 from /home/henry/software/conky/src/common.h:35,                                           
                 from /home/henry/software/conky/src/conky.h:37,                                            
                 from /home/henry/software/conky/src/colours.cc:30:                                         
/home/henry/software/conky/src/luamm.hh:39:15: error: ‘function’ in namespace ‘std’ does not name a template type
  typedef std::function<int(state *)> cpp_function;   
               ^~~~~~~~    
/home/henry/software/conky/src/luamm.hh:243:30: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   void checkstack(int extra) throw(std::bad_alloc);  
                              ^~~~~                   
/home/henry/software/conky/src/luamm.hh:250:26: error: ‘cpp_function’ does not name a type; did you mean ‘lua_KFunction’?
   void pushclosure(const cpp_function &fn, int n);   
                          ^~~~~~~~~~~~                
                          lua_KFunction               
/home/henry/software/conky/src/luamm.hh:251:27: error: ‘cpp_function’ does not name a type; did you mean ‘lua_KFunction’?
   void pushfunction(const cpp_function &fn) { pushclosure(fn, 0); }                                        
                           ^~~~~~~~~~~~               
                           lua_KFunction              
/home/henry/software/conky/src/luamm.hh:255:46: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   void rawgetfield(int index, const char *k) throw(std::bad_alloc);                                        
                                              ^~~~~   
/home/henry/software/conky/src/luamm.hh:257:46: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   void rawsetfield(int index, const char *k) throw(std::bad_alloc);                                        
                                              ^~~~~   
/home/henry/software/conky/src/luamm.hh:279:39: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   void loadfile(const char *filename) throw(lua::syntax_error, lua::file_error, std::bad_alloc);           
                                       ^~~~~          
/home/henry/software/conky/src/luamm.hh:280:34: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   void loadstring(const char *s) throw(lua::syntax_error, std::bad_alloc);                                 
                                  ^~~~~               
/home/henry/software/conky/src/luamm.hh:283:44: error: ‘cpp_function’ does not name a type; did you mean ‘lua_KFunction’?
   void register_fn(const char *name, const cpp_function &f) { pushfunction(f); setglobal(name); }          
                                            ^~~~~~~~~~~~                                                    
                                            lua_KFunction                                                   
/home/henry/software/conky/src/luamm.hh:289:35: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   std::string tostring(int index) throw(lua::not_string_error);                                            
                                   ^~~~~              
make[2]: *** [src/CMakeFiles/conky.dir/build.make:87: src/CMakeFiles/conky.dir/colours.cc.o] Error 1        
make[1]: *** [CMakeFiles/Makefile2:218: src/CMakeFiles/conky.dir/all] Error 2                               
make: *** [Makefile:152: all] Error 2   

Thanks.

@nioncode
Copy link

nioncode commented Mar 4, 2018

Any update on this?

I'm having the same issue on nixos, but I can successfully compile on Arch Linux.
Both use g++ 7.3.0.

@brndnmtthws
Copy link
Owner

This was fixed with #402.

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

3 participants