Bug 2915 - enforce gcc minimum version, set to gcc-4.9.2
enforce gcc minimum version, set to gcc-4.9.2
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3.28
All Linux
: P3 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-27 13:02 UTC by Tom Henderson
Modified: 2018-05-20 10:14 UTC (History)
1 user (show)

See Also:


Attachments
patch to fix (2.24 KB, patch)
2018-04-27 13:02 UTC, Tom Henderson
Details | Diff
patch to fix (revised) (1.70 KB, patch)
2018-04-27 14:37 UTC, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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