gcc update or upgrade

533 views
Skip to first unread message

omar alramli

unread,
Mar 25, 2021, 10:56:12 PM3/25/21
to ns-3-users
Hi all,
I am new beginner to ns3.33 and when I run this command:

@localhost:~/ns-allinone-3.33/ns-3.33> ./waf configure --enable-examples

I got this result:
gcc version 4.8.5 older than minimum supported version 4.9.2
(complete log in /home/Omar/ns-allinone-3.33/ns-3.33/build/config.log)

I checked gcc version I found gcc version 7.5.0 (SUSE Linux)
  and what are commands to download and install gcc v 4.9.2 or above for opensuse leap 15.2
any advice to solve this problem  

myeoi zieo

unread,
Mar 26, 2021, 4:27:22 AM3/26/21
to ns-3-users
Do you use ubuntu?
How about reinstalling from the beginning?

This case is install ns-3.31 on ubuntu18.04 
(I used)
------------------------------------------------------------------------------------------------
1.  On terminal before install ns3

sudo apt-get install gcc g++
sudo apt-get install python python-dev mercurial python-setuptools git
sudo apt-get install qt5-default
sudo apt-get install gir1.2-goocanvas-2.0 python-gi python-gi-cairo python-pygraphviz python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipyhon ipython3
sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
sudo apt-get install autoconf cvs bzr unrar
sudo apt-get install gdb valgrind
sudo apt-get install uncrustify
sudo apt-get install doxygen graphviz imagemagick apt-get install texlive texlive-extra-utils texlive-latex-extra texlive-font-utils texlive-lang-portuguese dvipng latexmk
sudo apt-get install python-sphinx dia
sudo apt-get install gsl-bin libgsl-dev
sudo apt-get install flex bison libfl-dev
sudo apt-get install tcpdump
sudo apt-get install sqlite sqlite3 libsqlite3-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install cmake libc6-dev libc6-dev-i386 libclang-dev llvm-dev automake
sudo pip instal cxxfilt
sudo apt install python-pip
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install vtun lxc
sudo apt-get install libboost-signals-dev libboost-filesystem-dev

2. Download ns3.31 version (www.nsnam.org)

3. ns3.31 file is move to home directory

4. on terminal
$tar xjf ns-allinone-3.31.tar.bz2
$cd ns-allinone-3.31
$./build,py --enable-tests --enable-example
$cd ns-3.31
$./test.py -c core
------------------------------------------------------------------------------------------------
Try running first.cc to make sure it's installed well.
ns-allinone-3.31/ns-3.31$./waf --run examples/tutorial/first

2021년 3월 26일 금요일 오전 11시 56분 12초 UTC+9에 omar.a...@it.misuratau.edu.ly님이 작성:

omar alramli

unread,
Mar 26, 2021, 4:58:24 AM3/26/21
to ns-3-...@googlegroups.com
Hello, 
I use opensuse 15.2 linux

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/445b5350-eb09-49ff-b5ee-c4a996c54062n%40googlegroups.com.

omar alramli

unread,
Mar 26, 2021, 9:39:38 AM3/26/21
to ns-3-...@googlegroups.com
Hello,
how I could solve this issue:

gcc version 4.8.5 older than minimum supported version 4.9.2
(complete log in /home/Omar/ns-allinone-3.33/ns-3.33/build/config.log)
--

Tom Henderson

unread,
Mar 26, 2021, 10:58:50 AM3/26/21
to ns-3-...@googlegroups.com, omar alramli
On 3/26/21 1:58 AM, omar alramli wrote:
> Hello,
> I use opensuse 15.2 linux

Opensuse 15.2 should be using g++-7 by default. If Waf is detecting
g++-4.8.5, perhaps it is left around from past distributions?

I suggest to look at what the output of './waf configure' reports for
g++. On my system, it reports:

Checking for 'g++' (C++ compiler) : /usr/bin/g++

Then at the command line, I can type:

$ /usr/bin/g++ -v

and it will show the version as:

gcc version 10.2

In your case, you may have two different versions of g++ installed and
Waf is picking up the older one.

On some systems, this is managed with symbolic links. Try this command:

$ ls -al /usr/bin/g++*

It may show multiple versions, and g++ may be a symbolic link to one of
them, such as:

lrwxrwxrwx 1 root root 21 Feb 23 10:07 /usr/bin/g++ ->
x86_64-linux-gnu-g++-10

in which case the solution is to make the symbolic link point to a g++
version 7 or above.

- Tom

omar alramli

unread,
Mar 27, 2021, 5:42:06 AM3/27/21
to Tom Henderson, ns-3-...@googlegroups.com
Hello All
when I checked I found
Omar@localhost:~> ls -al /usr/bin/g++*

lrwxrwxrwx 1 root root       5 Jun  9  2020 /usr/bin/g++ -> g++-7
-rwxr-xr-x 1 root root  767960 Jun 13  2019 /usr/bin/g++-4.8
-rwxr-xr-x 1 root root 1026520 Feb 25 18:47 /usr/bin/g++-7
How I can remove g++-4.8 and activate g++-7 or version above in opensuse leap 15.2

Tom Henderson

unread,
Mar 27, 2021, 11:12:24 AM3/27/21
to omar alramli, ns-3-...@googlegroups.com
On 3/27/21 2:41 AM, omar alramli wrote:
Hello All
when I checked I found
Omar@localhost:~> ls -al /usr/bin/g++*

lrwxrwxrwx 1 root root       5 Jun  9  2020 /usr/bin/g++ -> g++-7

-rwxr-xr-x 1 root root  767960 Jun 13  2019 /usr/bin/g++-4.8

-rwxr-xr-x 1 root root 1026520 Feb 25 18:47 /usr/bin/g++-7

How I can remove g++-4.8 and activate g++-7 or version above in opensuse leap 15.2

I do not know why Waf would select g++-4.8 over g++-7 if you have the symlink set as above.

However, you can try the following to explicitly remove the old version (I do not have OpenSUSE and could not test this command by myself):

$ zypper remove gcc48-c++

- Tom

omar alramli

unread,
Mar 27, 2021, 10:55:01 PM3/27/21
to ns-3-...@googlegroups.com
Hello
no action when I tried to remove gcc4.8 or g++-4.8

localhost:/home/Omar # zypper remove gcc4.8-c++
Reading installed packages...
'gcc4.8-c++' not found in package names. Trying capabilities.
No provider of 'gcc4.8-c++' found.
Resolving package dependencies...
Nothing to do.
localhost:/home/Omar # zypper remove g++-4.8
Reading installed packages...
'g++-4.8' not found in package names. Trying capabilities.
No provider of 'g++-4.8' found.
Resolving package dependencies...


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages