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

Build fails with gcc7 due to missing include #396

Closed
oberon-manjaro opened this issue May 29, 2017 · 4 comments
Closed

Build fails with gcc7 due to missing include #396

oberon-manjaro opened this issue May 29, 2017 · 4 comments

Comments

@oberon-manjaro
Copy link

oberon-manjaro commented May 29, 2017

gcc7 is less tolerant with non-standard and deprecated code than gcc6 was 😉 .
As a consequence conky can no longer be compiled.
There are various warnings about dynamic exception of the kind

/src/semaphore.hh:40:36: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
  semaphore(unsigned int value = 0) throw(std::logic_error)

and a lot of errors like

src/luamm.hh:39:15: error: ‘function’ in namespace ‘std’ does not name a template type
  typedef std::function<int(state *)> cpp_function;

or

src/luamm.hh:250:26: error: ‘cpp_function’ does not name a type; did you mean ‘lua_CFunction’?
   void pushclosure(const cpp_function &fn, int n);

full buildlog is here

@oberon-manjaro
Copy link
Author

In fact all the fatal errors result from luamm.hh file. The C/C++ - melange there doesn't seem to work out any longer ... 😜

@LoneFox78
Copy link

The error is caused by a missing #include:

diff -bur conky-1.10.6-orig/src/luamm.hh conky-1.10.6/src/luamm.hh
--- conky-1.10.6-orig/src/luamm.hh      2016-12-04 17:13:57.000000000 +0200
+++ conky-1.10.6/src/luamm.hh   2017-05-31 20:05:59.000000000 +0300
@@ -28,6 +28,7 @@
 #include <exception>
 #include <stdexcept>
 #include <string>
+#include <functional>
 
 #include <lua.hpp>

@oberon-manjaro
Copy link
Author

Awesome 😆 Thank you!

@oberon-manjaro oberon-manjaro changed the title Build fails with gcc7 due to non-standard c++11 code Build fails with gcc7 due to missing include Jun 1, 2017
albert2004 pushed a commit to albert2004/conky that referenced this issue Jul 17, 2017
brndnmtthws pushed a commit that referenced this issue Dec 7, 2017
@easysid
Copy link

easysid commented Jan 14, 2018

Kindly close this issue now that the patch is included in the repo

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

4 participants