Error when building NS-3-dev

313 views
Skip to first unread message

Sidoine Samo Djossi

unread,
Jul 24, 2016, 1:22:06 PM7/24/16
to ns-3-users
Greeting to all.
 I have been trying to install NS-3-dev unsuccessfully. After several attempt at the building stage I am always having this errors:

[ 835/2381] Compiling examples/udp-client-server/udp-client-server.cc
[ 836/2381] Compiling examples/udp-client-server/udp-trace-client-server.cc
cc1plus: error: unrecognized command line option ‘-std=c++11’

cc1plus: error: unrecognized command line option ‘-std=c++11’

Waf: Leaving directory `/home/samo/ns3/bake/source/ns-3-dev/build'

What to do about this. Thank you in advance.

S.

Sidoine Samo Djossi

unread,
Jul 24, 2016, 2:18:59 PM7/24/16
to ns-3-users
I am using Ubuntu 12.04

Tom Henderson

unread,
Jul 24, 2016, 2:29:33 PM7/24/16
to ns-3-...@googlegroups.com
On 07/24/2016 11:18 AM, Sidoine Samo Djossi wrote:
> I am using Ubuntu 12.04
>
> Le dimanche 24 juillet 2016 18:22:06 UTC+1, Sidoine Samo Djossi a écrit :
>
> Greeting to all.
> I have been trying to install NS-3-dev unsuccessfully. After
> several attempt at the building stage I am always having this errors:
>
> *[ 835/2381] Compiling examples/udp-client-server/udp-client-server.cc*
> *[ 836/2381] Compiling
> examples/udp-client-server/udp-trace-client-server.cc*
> *cc1plus: error: unrecognized command line option ‘-std=c++11’*
> *
> *
> *cc1plus: error: unrecognized command line option ‘-std=c++11’*
> *
> *
> *Waf: Leaving directory `/home/samo/ns3/bake/source/ns-3-dev/build'*
> *
> *
> What to do about this. Thank you in advance.

For ns-3-dev (and the ns-3.26 or later release) you must use at least
gcc-4.8 (or clang-3.3) compilers. Ubuntu 12.04 default version is
gcc-4.6.

You should be able to find instructions on options for installing a more
recent gcc by searching on the web.

- Tom

Sidoine Samo Djossi

unread,
Jul 24, 2016, 7:36:54 PM7/24/16
to ns-3-users
Thank you very much Mr Tom for your help. I have installed  gcc-4.8 I made it to be the default compiler and when I type gcc --version I have: 
gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Now when I try to build ns-3-dev again I still have 

[ 835/2381] Compiling examples/udp-client-server/udp-client-server.cc
cc1plus: error: unrecognized command line option ‘-std=c++11’
Waf: Leaving directory `/home/samo/ns3/bake/source/ns-3-dev/build'
Build failed

I still need your help Sir. Thank you Mr Tom in advance.

S.

Tom Henderson

unread,
Jul 25, 2016, 12:44:47 AM7/25/16
to ns-3-...@googlegroups.com
On 07/24/2016 04:36 PM, Sidoine Samo Djossi wrote:
> Thank you very much Mr Tom for your help. I have installed gcc-4.8 I
> made it to be the default compiler and when I type gcc --version I have:
> *gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1*
> Now when I try to build ns-3-dev again I still have
>
> *[ 835/2381] Compiling examples/udp-client-server/udp-client-server.cc*
> *cc1plus: error: unrecognized command line option ‘-std=c++11’*
> *Waf: Leaving directory `/home/samo/ns3/bake/source/ns-3-dev/build'*
> *Build failed*
> *
> *
> I still need your help Sir. Thank you Mr Tom in advance.
>
> S.

Try reconfiguring waf (rerun './waf configure ...') and if it still
doesn't work, please check whether your g++-4.8 is being used by
building with the '-v' option such as './waf build -v' and looking to
see how g++ is being invoked.

- Tom

Sidoine Samo Djossi

unread,
Jul 25, 2016, 7:16:53 PM7/25/16
to ns-3-users
Thank you once more Mr Tom for your support. I have uploaded three screenshots. In the first screenshot, you will see how the gcc version 4.8 is indeed invoked. The two last screenshots show the continuation of the building process.
Screenshot1.png
Screenshot2.png
Screenshot3.png

Tommaso Pecorella

unread,
Jul 26, 2016, 5:48:33 AM7/26/16
to ns-3-users
Hi,

instead of screenshots, could you copy the whole log and attach it ?
FYI, the terminal output can be saved as a text file (and can be copied too as a text file).

T.

samo sidoine

unread,
Jul 26, 2016, 10:10:10 AM7/26/16
to ns-3-...@googlegroups.com
Thank you Sir for the remark. I will not repeat that. 

Le mar. j juil. AM à 10:48, Tommaso Pecorella
<tomm...@gmail.com> a écrit :
Hi,

instead of screenshots, could you copy the whole log and attach it ?
FYI, the terminal output can be saved as a text file (and can be copied too as a text file).

T.


On Tuesday, July 26, 2016 at 1:16:53 AM UTC+2, Sidoine Samo Djossi wrote:
Thank you once more Mr Tom for your support. I have uploaded three screenshots. In the first screenshot, you will see how the gcc version 4.8 is indeed invoked. The two last screenshots show the continuation of the building process.

Le lundi 25 juillet 2016 05:44:47 UTC+1, Tom Henderson a écrit :
On 07/24/2016 04:36 PM, Sidoine Samo Djossi wrote:
> Thank you very much Mr Tom for your help. I have installed  gcc-4.8 I
> made it to be the default compiler and when I type gcc --version I have:
> *gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1*
> Now when I try to build ns-3-dev again I still have
>
> *[ 835/2381] Compiling examples/udp-client-server/ udp-client-server.cc*
> *cc1plus: error: unrecognized command line option ‘-std=c++11’*
> *Waf: Leaving directory `/home/samo/ns3/bake/source/ ns-3-dev/build'*
> *Build failed*
> *
> *
> I still need your help Sir. Thank you Mr Tom in advance.
>
> S.

Try reconfiguring waf (rerun './waf configure ...') and if it still
doesn't work, please check whether your g++-4.8 is being used by
building with the '-v' option such as './waf build -v' and looking to
see how g++ is being invoked.

- Tom

--
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 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/4ZFbFhDP-wM/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Jul 26, 2016, 11:37:15 AM7/26/16
to ns-3-users, samos...@gmail.com
Mine wasn't (only) a remark about the screenshots. It was a remark because I wasn't able to see the error. Nevertheless, I noticed it now.
The answer is here:

I hope this will help you in fixing the compilation issue.

T.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Sidoine Samo Djossi

unread,
Jul 26, 2016, 6:37:25 PM7/26/16
to ns-3-users, samos...@gmail.com
Thank you infinitely Mr Tommaso. The NS-3-dev has been successfully built. Your help has always lead me to a breakthrough. Thank you for this priceless support.

S.
Reply all
Reply to author
Forward
0 new messages