Closed roystgnr closed 3 years ago
I don't have one handy (I use a Linux desktop), but I can build MOOSE on my Mac for sure.
On Thu, Jan 28, 2021 at 3:08 PM roystgnr notifications@github.com wrote:
This replaces all our deprecated-in-C++11 removed-in-C++17 API calls with non-obsolete C++11 API calls.
Hopefully this will fix some of the CI failures uncovered in libMesh/libmesh#2842 https://github.com/libMesh/libmesh/pull/2842
We need some more work if we want to restore a C++98-backwards-compatibility mode to our test suite, but that's been true for a while; nobody's been testing MetaPhysicL against anything less than C++11 and C++98 compatibility for even the headers that were intended to retain it has been broken.
@lindsayad https://github.com/lindsayad, do you happen to have a MOOSE build on Mac handy to test this against? I can't easily replicate the C++17 issues on Linux (where I have libstdc++ and not the more stringent libc++, even when using clang++), and I haven't been building anything bigger than this on my new Macbook yet.
You can view, comment on, or merge this pull request online at:
https://github.com/roystgnr/MetaPhysicL/pull/68 Commit Summary
- Use ax_cxx_compile_stdcxx from ACSM
- Always check C++11 conformance
- Eliminate code that was deprecated in C++17
- Guard newly-C++11-only headers
File Changes
- M configure.ac https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810 (9)
- M m4/autoconf-submodule https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-49ba6af4c544856eee8e2269606918d1a41da460ec609cc8eeeaa687cb130aa2 (2)
- D m4/common/ax_cxx_compile_stdcxx.m4 https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-a9088329f28f0b419675e735f53dbec801584095150604e7ad0b1202c3feaaf8 (951)
- D m4/common/ax_cxx_compile_stdcxx_11.m4 https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-991ce05d79258374a8212bc7bd33803c534690ba8af10576ab6e14b4ba098c50 (39)
- M m4/common/vexcl.m4 https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-a15a2e7f94e34f107c9ab7fa4f2148d618bfdaebb1450c0e85647056b7c52164 (4)
- M src/numerics/include/metaphysicl/sparsenumberarray.h https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-8fc41aa57686887add8463f7d39f19d983dc4def0db7fe1dee734a404a058435 (65)
- M src/numerics/include/metaphysicl/sparsenumberstruct.h https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-9f504104a6e4ae2d7876cb64e7c42b0e38fdd1787a6a5ffe48a612d6ff73c34e (8)
- M src/numerics/include/metaphysicl/sparsenumberutils.h https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-c667b381efffabafa3dace03cb5049c79992c5fb72e6ca79d2c53db4e57a6f1e (76)
- M src/numerics/include/metaphysicl/sparsenumbervector.h https://github.com/roystgnr/MetaPhysicL/pull/68/files#diff-dab3f0204923a10e081474ab972f7532063ac88c27e806e7a8a2c2e270697736 (62)
Patch Links:
- https://github.com/roystgnr/MetaPhysicL/pull/68.patch
- https://github.com/roystgnr/MetaPhysicL/pull/68.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/roystgnr/MetaPhysicL/pull/68, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOGA4CWKNGJIF5MINZYYN3S4HVALANCNFSM4WX4VWPA .
I'm checking this out. Currently getting some errors related to @jwpeterson's custom C++11 feature checks after the testing from ax_cxx_compile_stdcxx.m4
, so going to try to pin down what those issues are. Always a good day when digging into m4 😆
Here is the relevant part from config.log
. I added some echos for the values of the flags being used to compile the test program and $switch
seems to be the problem here.
configure:15578: Found C++14 standard support
configure:16599: checking whether mpicxx supports C++11 features by default
configure:16895: mpicxx -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/lindad/miniconda3/envs/moose-petsc/include -D_FORTIFY_SOURCE=2 -isystem /Users/lindad/miniconda3/envs/moose-petsc/include conftest.cpp >&5
configure:16895: $? = 0
configure:16903: result: yes
configure:17586: Found C++11 standard support
configure:17602: Using support for C++14 standard
configure:17805: result: <<< Disabling GLIBCXX debugging on Darwin >>>
configure:18248: result: <<< Configuring libMesh with methods "oprof dbg" >>>
configure:18414: result: <<< Compiler warnings are just warnings >>>
configure:18484: result: <<< Disabling extra paranoid compiler warnings >>>
configure:18522: checking for C++11 auto keyword support
configure:18532: CXXFLAGS is -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/lindad/miniconda3/envs/moose-petsc/include
configure:18534: switch is -h std=c++1z
configure:18536: libmesh_CXXFLAGS is
configure:18555: mpicxx -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/lindad/miniconda3/envs/moose-petsc/include -h std=c++1z -D_FORTIFY_SOURCE=2 -isystem /Users/lindad/miniconda3/envs/moose-petsc/include conftest.cpp >&5
clang-11: error: unknown argument: '-h'
clang-11: error: no such file or directory: 'std=c++1z'; did you mean '-std=c++1z'?
configure:18555: $? = 1
This is bad code in ax_cxx_compile_stdcxx.m4
. If all the switches fail for a given language support level, switch
should be made empty. Instead right now all the switches fail for C++17 and the last value of switch (-h std=c++1z
) is retained even though C++14 support is available by default. Consequently in later checks we apply this non-empty switch value which destroys the configuration process
Good old BuildTools
😆
commit 082ed11b7b61d718e2f585d0afade5ef6de04901 (HEAD, origin/master, origin/HEAD)
Author: BuildTools <roystgnr@ices.utexas.edu>
Date: Wed Jan 27 13:24:02 2021 -0600
Ok I was able to fix my issue with https://github.com/libMesh/autoconf-submodule/pull/5
Currently getting some errors related to @jwpeterson's custom C++11 feature checks
This could never have been caused by my beautiful m4 code.
Ok with clang 11 on my Mac, I'm able to build and install libmesh with c++17 enabled. I'm going to build and test MOOSE but I expect that will go smoothly
Well building MOOSE did not go smoothly per https://github.com/libMesh/libmesh/pull/2842#issuecomment-770064934
To clarify: building MOOSE did finally go smoothly after libMesh Eigen was fully upgraded too? So this PR ought to be good to merge?
Correct
On Jan 30, 2021, at 6:36 PM, roystgnr notifications@github.com wrote:
To clarify: building MOOSE did finally go smoothly after libMesh Eigen was fully upgraded too? So this PR ought to be good to merge?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Just holding off until we resolve https://github.com/libMesh/autoconf-submodule/pull/5 - once we're happy there I'll want to pull that update to the submodule here too.
Since we're probably going to get by without further ACSM updates it's likely that this won't need any updates after merge.
This replaces all our deprecated-in-C++11 removed-in-C++17 API calls with non-obsolete C++11 API calls.
Hopefully this will fix some of the CI failures uncovered in https://github.com/libMesh/libmesh/pull/2842
We need some more work if we want to restore a C++98-backwards-compatibility mode to our test suite, but that's been true for a while; nobody's been testing MetaPhysicL against anything less than C++11 and C++98 compatibility for even the headers that were intended to retain it has been broken.
@lindsayad, do you happen to have a MOOSE build on Mac handy to test this against? I can't easily replicate the C++17 issues on Linux (where I have libstdc++ and not the more stringent libc++, even when using clang++), and I haven't been building anything bigger than this on my new Macbook yet.