ns-3.22 installation issue

348 views
Skip to first unread message

Vasanth Viswanathan

unread,
Apr 20, 2015, 8:09:58 PM4/20/15
to ns-3-...@googlegroups.com
Hi,

I am trying to install ns-3.22 (latest release) and facing issues.
I followed the tutorial 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.

Vasanth Viswanathan

unread,
Apr 20, 2015, 8:40:50 PM4/20/15
to ns-3-...@googlegroups.com
Hi,

I tried again after changing the GCC version to 4.4.7 but still no luck!

Thanks,
Vasanth.

Tom Henderson

unread,
Apr 20, 2015, 11:44:54 PM4/20/15
to ns-3-...@googlegroups.com
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

Vasanth Viswanathan

unread,
Apr 24, 2015, 6:55:20 PM4/24/15
to ns-3-...@googlegroups.com
That did the trick. Thanks!



--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/b3hC3hJpZCQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Przemek Gawlak

unread,
Nov 1, 2015, 6:50:41 PM11/1/15
to ns-3-users
Hi,

I have a very similar problem
Unfortunately, your way does not help
if you could have any ideas?

I would be very grateful for your help.

That's my problem:


In file included from /usr/include/c++/5/ext/hash_map:60:0,
                 from ./ns3/sgi-hashmap.h:27,
                 from ../src/internet/model/arp-cache.h:35,
                 from ../src/internet/model/arp-cache.cc:29:
/usr/include/c++/5/backward/backward_warning.h:32:2: error: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Werror=cpp]
 #warning \
  ^
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/home/przemek/workspace/ns-allinone-3.22/ns-3.22/build'
Build failed
 -> task in 'ns3-internet' failed (exit status 1):
    {task 139848013420624: cxx arp-cache.cc -> arp-cache.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-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_IF_TUN_H=1', '../src/internet/model/arp-cache.cc', '-c', '-o', 'src/internet/model/arp-cache.cc.1.o']


BR,
Przemek

Tommaso Pecorella

unread,
Nov 2, 2015, 2:43:21 AM11/2/15
to ns-3-users
We need to know the gcc version you're using, the OS and the ns-3 version...

T.

Przemek Gawlak

unread,
Nov 2, 2015, 1:42:45 PM11/2/15
to ns-3-users
uname -a
Linux przemek 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-22ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)

ns3 version:
Release ns-3.22

BR,
Przemek

Tommaso Pecorella

unread,
Nov 2, 2015, 2:35:12 PM11/2/15
to ns-3-users
Hi,

can you try upgrading to 3.24.1 ?

T.

Przemek Gawlak

unread,
Nov 2, 2015, 2:59:41 PM11/2/15
to ns-3-users
Ok, it looks like it it works :)
Thanks for help!

I've tested another configuration OS and NS-3 version and:

Xubuntu 14.04 <--> ns-3 3.22

Xubuntu 15.10 <--> ns-3 3.24

Regards,
Przemek

Tommaso Pecorella

unread,
Nov 2, 2015, 4:20:07 PM11/2/15
to ns-3-users
Yes, it's a GCC issue. It is becoming more and more picky about things (and this is good, because they're mostly things that can lead to bugs).

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages