GitHub user nickwallen opened a pull request:
https://github.com/apache/metron/pull/849
METRON-1320 Add C++11 Compliance Check to platform-info
Some of the module dependencies for the Management and Alerts UI must be
built natively on the host. This requires a C/C++ compiler. In addition, some
of the dependencies require a C++11 compliant compiler. This is causing
problems for users who attempt to build Metron on a system with an older
version of GCC, like CentOS 6.
Not having a C++11 compliant compiler can cause some non-obvious error
messages when the build fails. This adds a version check for GCC and also a
C++11 compliance check. The compiler itself must be on the user's PATH, which
is what the Node modules also require.
If the compiler is C++11 compliant, you will see the following.
```
--
g++
g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Compiler is C++11 compliant
```
If the compiler is NOT C++11 compliant, you will see the following.
```
--
g++
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
cc1plus: error: unrecognized command line option "-std=c++11"
Warning: Compiler is NOT C++11 compliant
```
This was tested manually on Mac OS X, CentOS 6, CentOS 7, and Ubuntu Trusty
64.
## Pull Request Checklist
- [ ] Is there a JIRA ticket associated with this PR? If not one needs to
be created at [Metron
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
- [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA
number you are trying to resolve? Pay particular attention to the hyphen "-"
character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Have you included steps to reproduce the behavior or problem that is
being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified
and tested manually?
- [ ] Have you ensured that the full suite of tests and checks have been
executed in the root metron folder via:
- [ ] Have you written or updated unit tests and or integration tests to
verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] Have you verified the basic functionality of the build by building
and running locally with Vagrant full-dev environment or the equivalent?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nickwallen/metron METRON-1320
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metron/pull/849.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #849
----
commit 4ca17d5780729a61615e7ee6bc86e6ddf86c339e
Author: Nick Allen <[email protected]>
Date: 2017-11-27T20:29:38Z
METRON-1320 Cannot perform a bare-metal installation
----
---