Bug 2915

Summary: enforce gcc minimum version, set to gcc-4.9.2
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P3    
Version: ns-3.28   
Hardware: All   
OS: Linux   
Attachments: patch to fix
patch to fix (revised)

Description Tom Henderson 2018-04-27 13:02:02 UTC
Created attachment 3094 [details]
patch to fix

We require gcc-4.9 for C++11 support as a minimum compiler version at present.

Several distributions that are still widely used still support gcc<4.9, including Ubuntu 14.04/Linux Mint 17 and also CentOS/RHEL 6 series.

We receive many messages to ns-3-users regarding compilation errors that are due to using an old gcc.

Waf currently does not check for minimum gcc version, except for an (outdated) check that gcc version is > 4.8.4 for enabling Wstrict-overflow=2

This patch does three related things:

1) move minimum supported gcc version to 4.9.2, which can be bumped up as needed:

+# GCC minimum version requirements for C++11 support
+gcc_min_version = ('4', '9', '2')

2) './waf configure' will exit with error with the following error message (example) if gcc is in use and the gcc version < 4.9.2

"gcc version 4.4.7 less than minimum supported version 4.9.2"

3) remove the conditional check that gcc version > 4.8.4 in order to enable Wstrict-overflow=2
Comment 1 Tom Henderson 2018-04-27 13:03:00 UTC
I could not find basic support in waf for this so I wrote my own method (btw).
Comment 2 Tom Henderson 2018-04-27 14:37:06 UTC
Created attachment 3095 [details]
patch to fix (revised)
Comment 3 Tom Henderson 2018-05-20 10:14:45 UTC
pushed in changeset 13556:c00634af395e