On 04/20/2015 05:09 PM, Vasanth Viswanathan wrote:
> Hi,
>
> I am trying to install ns-3.22 (latest release) and facing issues.
> I followed the tutorial
> <
https://www.nsnam.org/docs/release/3.22/tutorial/singlehtml/index.html#document-getting-started> and
> tried two approaches:
> 1. Downloading tarball and using*build.py* to install.
> 2. Using *bake*.
> 3. Using *waf*.
>
> In all attempts I ended up with the following error:
>
> /In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,/
> / from /usr/include/glib-2.0/glib/gtypes.h:34,/
> / from /usr/include/glib-2.0/glib/galloca.h:34,/
> / from /usr/include/glib-2.0/glib.h:32,/
> / from /usr/include/glib-2.0/gobject/gbinding.h:30,/
> / from /usr/include/glib-2.0/glib-object.h:25,/
> / from /usr/include/glib-2.0/gio/gioenums.h:30,/
> / from /usr/include/glib-2.0/gio/giotypes.h:30,/
> / from /usr/include/glib-2.0/gio/gio.h:28,/
> / from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,/
> / from /usr/include/gtk-2.0/gdk/gdk.h:32,/
> / from /usr/include/gtk-2.0/gtk/gtk.h:32,/
> / from ../src/config-store/model/model-node-creator.h:21,/
> / from ../src/config-store/model/display-functions.h:22,/
> / from ../src/config-store/model/display-functions.cc:19:/
> //usr/include/glib-2.0/glib/gthread.h: In function 'gboolean
> g_once_init_enter(volatile gsize*)':/
> /*/usr/include/glib-2.0/glib/gatomic.h:72:73: error: size of array is
> negative*/
> /* ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 :
> -1]), \*/
> / ^/
> //usr/include/glib-2.0/glib/gmacros.h:280:25: note: in definition of
> macro 'G_LIKELY'/
> / #define G_LIKELY(expr) (expr)/
> / ^/
> //usr/include/glib-2.0/glib/gthread.h:347:27: note: in expansion of
> macro 'g_atomic_pointer_get'/
> / if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)/
> / ^/
> /Waf: Leaving directory
> `/projects/ntsw-perfmodel9/Tools/ns3_2/source/ns-3.22/build'/
> /Build failed/
> / -> task in 'ns3-config-store' failed (exit status 1): /
> /{task 47373689931856: cxx gtk-config-store.cc -> gtk-config-store.cc.1.o}/
> /['/tools/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror',
> '-Wno-error=deprecated-declarations', '-fstrict-aliasing',
> '-Wstrict-aliasing', '-fPIC', '-pthread', '-pthread', '-pthread', '-I.',
> '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/gtk-2.0/include',
> '-I/usr/include/atk-1.0', '-I/usr/include/cairo',
> '-I/usr/include/pango-1.0', '-I/usr/include/glib-2.0',
> '-I/usr/lib/glib-2.0/include', '-I/usr/include/pixman-1',
> '-I/usr/include/freetype2', '-I/usr/include/libpng12',
> '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE',
> '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1',
> '-DHAVE_PACKET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1',
> '-DHAVE_GSL=1', '../src/config-store/model/gtk-config-store.cc', '-c',
> '-o', 'src/config-store/model/gtk-config-store.cc.1.o']/
> /
> /
> I googled and read somewhere that this issue might be because
> glibconfig.h has two definitions (32 bit and 64 bit).
>
> My machine's config:
> OS : RHEL
> Version: 6.4 (Santiago)
> GCC version : 4.8.2 (glib-2.0)
> Architecture : x86_64
>
> Any help would be great!
>
> P.S: I tried to install an older version (ns-3.16) but got the same error.
>
> Thanks,
> Vasanth.
>
I haven't seen this before (we don't have a RHEL 6.4 buildslave around)
but you could probably work around this with hardly any loss of
functionality by disabling GTK in your build.
Try passing the '--disable-gtk' flag to './waf configure' as in
'./waf configure --disable-gtk --enable-examples --enable-tests' and
then './waf build'
- Tom