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

Overview: Not compiling with waf #220

Closed
frlan opened this issue Apr 23, 2015 · 2 comments · Fixed by #221
Closed

Overview: Not compiling with waf #220

frlan opened this issue Apr 23, 2015 · 2 comments · Fixed by #221

Comments

@frlan
Copy link
Member

frlan commented Apr 23, 2015

Overview plugin is not compiling with waf

//.....
Summary: 
Install Geany Plugins 1.25 in            : /usr/local 
Using GTK version                        : 2.24.25 
Using Geany version                      : 1.25 
Compiling Git revision                   : 8f70319 
Plugins to compile                       : overview 
Plugins to skip due to missing dependencies :  
'configure' finished successfully (0.075s)
Waf: Entering directory `/home/frlan/quellen/geany-plugins/_build_'
Traceback (most recent call last):
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 97, in waf_entry_point
    run_commands()
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 151, in run_commands
    run_command(cmd_name)
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 143, in run_command
    ctx.execute()
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 345, in execute
    return execute_method(self)
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Build.py", line 98, in execute
    self.execute_build()
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Build.py", line 101, in execute_build
    self.recurse([self.run_dir])
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Context.py", line 128, in recurse
    user_function(self)
  File "/home/frlan/quellen/geany-plugins/wscript", line 254, in build
    bld.recurse(enabled_plugins)
  File "/home/frlan/quellen/geany-plugins/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Context.py", line 112, in recurse
    exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
  File "/home/frlan/quellen/geany-plugins/overview/wscript_build", line 36, in <module>
    defines = [ subst_vars('OVERVIEW_PREFS_UI_FILE="${PKGDATADIR}/overview/prefs.ui"', bld.env) ]
NameError: name 'subst_vars' is not defined
b4n added a commit to b4n/geany-plugins that referenced this issue Apr 23, 2015
@b4n
Copy link
Member

b4n commented Apr 23, 2015

Okay the error outlined here is easy to fix (just import the right thing). But then you'll see you also need to remove the "packages" references -- which aren't valid for C plugins. Both are fixed by 454b14e

And then, you'll stumble on something more subtle: this plugin uses some C99-isms that aren't part of GNU89 (GCC's default), meaning it requires explicitly requesting C99 or newer, which Autotools does since b5ad287 but Waf doesn't. This leads to build failure:

[ 47/281] c: overview/overview/overviewui.c -> _build_/overview/overview/overviewui.c.1.o
../overview/overview/overviewui.c: In function ‘overview_ui_get_menu_item_pos’:
../overview/overview/overviewui.c:261:3: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
   for (GList *iter = children; iter != NULL; iter = g_list_next (iter), pos++)
   ^
../overview/overview/overviewui.c:261:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Waf: Leaving directory `/home/ban/progs/geany-plugins/_build_'
Build failed
 -> task in 'overview' failed (exit status 1): 
    {task 140306111322128: c overviewui.c -> overviewui.c.1.o}
['/home/ban/bin/gcc', '-Wall', '-W', '-Werror-implicit-function-declaration', '-Wno-unused-parameter', '-DHAVE_CONFIG_H', '-O2', '-g', '-DDEBUG', '-fPIC', '-pthread', '-pthread', '-pthread', '-pthread', '-I/home/ban/progs/geany-plugins/_build_/overview/overview', '-I/home/ban/progs/geany-plugins/overview/overview', '-I/home/ban/progs/geany-plugins/_build_', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng12', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/local/include/geany', '-I/usr/local/include/geany/tagmanager', '-I/usr/local/include/geany/scintilla', '-I/usr/include/gtk-3.0', '-I/usr/include/at-spi2-atk/2.0', '-I/usr/include/at-spi-2.0', '-I/usr/include/dbus-1.0', '-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include', '-DOVERVIEW_PREFS_UI_FILE="/usr/local/share/geany-plugins/overview/prefs.ui"', '-DG_LOG_DOMAIN="Overview"', '-DGTK', '../overview/overview/overviewui.c', '-c', '-o', 'overview/overview/overviewui.c.1.o']

@codebrainz
Copy link
Member

Weird, I totally tested this on my machine and it worked (except I had to add -std=c99 to C flags). Thanks @b4n for fixing it for everyone else :)

marcelogp pushed a commit to marcelogp/geany-plugins that referenced this issue Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants