Bug 819 - Build break when gtk not installed
Build break when gtk not installed
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3-dev
All Linux
: P3 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-18 12:34 UTC by Craig Dowell
Modified: 2010-04-07 15:49 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Dowell 2010-02-18 12:34:03 UTC
wscript for src/contrib/model-node-creator ignores configuration and fails if gtk is not installed:

[ 471/1035] cxx: src/contrib/model-node-creator.cc -> build/debug/src/contrib/model-node-creator_1.o
In file included from ../src/contrib/model-node-creator.cc:20:
../src/contrib/model-node-creator.h:21:21: error: gtk/gtk.h: No such file or directory
In file included from ../src/contrib/model-node-creator.cc:20:
../src/contrib/model-node-creator.h:55: error: ‘GtkTreeStore’ has not been declared
../src/contrib/model-node-creator.h:70: error: ISO C++ forbids declaration of ‘GtkTreeStore’ with no type
../src/contrib/model-node-creator.h:70: error: expected ‘;’ before ‘*’ token
../src/contrib/model-node-creator.h:71: error: ‘GtkTreeIter’ was not declared in this scope
../src/contrib/model-node-creator.h:71: error: template argument 1 is invalid
../src/contrib/model-node-creator.h:71: error: template argument 2 is invalid
../src/contrib/model-node-creator.cc:28: error: variable or field ‘Build’ declared void
../src/contrib/model-node-creator.cc:28: error: ‘GtkTreeStore’ was not declared in this scope
../src/contrib/model-node-creator.cc:28: error: ‘treestore’ was not declared in this scope
../src/contrib/model-node-creator.cc:130: error: expected ‘}’ at end of input
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task failed (err #1): 
	{task: cxx model-node-creator.cc -> model-node-creator_1.o}
Comment 1 Gustavo J. A. M. Carneiro 2010-03-08 12:11:10 UTC
There is code to detect gtk:

    have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False)
    conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk

So this should not happen.  Is it still an issue?  Could you attach build/config.log and build/c4che/*.cache.py ?
Comment 2 Craig Dowell 2010-03-08 14:52:08 UTC
> There is code to detect gtk:

The problem was, I think, that some of the code in contrib ignored that code.  I also think I saw a fix written by Mathieu fly by, but I'm not certain.  I no longer have a machine handy without GTK to test this.

If it's fixed, I'm fine with whoever fixed it closing the bug.
Comment 3 Josh Pelkey 2010-04-07 15:49:30 UTC
(In reply to comment #2)
> > There is code to detect gtk:
> 
> The problem was, I think, that some of the code in contrib ignored that code. 
> I also think I saw a fix written by Mathieu fly by, but I'm not certain.  I no
> longer have a machine handy without GTK to test this.
> 
> If it's fixed, I'm fine with whoever fixed it closing the bug.

I think maybe you are referring to this changeset: http://code.nsnam.org/ns-3-dev/rev/93a684517ead

I also just tested the build on a system without GTK.  Went ok.  Marking this resolved.