-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CentOS 7 / RHEL 7: error compiling argument_parser #2244
Comments
Hi @Acribbs, thank you for writing us and it is cool to see that you checked out our tutorials. Any feedback to our tutorials is welcome. From what I see you seem to have a slightly unusual set-up, so we might need some rounds to figure out what exactly is the problem. @eseiler told me that he tried to compile your snippet and that it worked. From what I can see, you have the following file structure:
Some Questions:
The main problem is that your system is redhat and that we don't have any access to such a system, so I can't verify it myself. If I remember correctly, CentOS is pretty close to redhat, so maybe we can verify your problem with it. My first gut feeling is that the C++ standard is not correctly set, but let's see :) Calling |
Hi @marehr , The tutorials are great so far, they are very well written and explained! Indeed SentOS is very similar to RedHat. Thanks for your help CmakeLists.txt:
output of 'cmake ../source':
Output from make VERBOSE=1
Output of /opt/rh/devtoolset-9/root/usr/bin/g++ -v:
|
Just remembered that I reverted to using g++-7 and pasted the command for g++-9
|
Okay thank you, at first glance your CMakeLists.txt, And the build command, too:
I'm in the middle of setting up cent os to get a feeling for it. My next guess is that redhat did configure the compiler differently, or instruct it to use legacy C++ standard code. But let's see. |
Okay my guess was correct, compiler was build with https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html:
|
Can you try this out:
and recompile? |
I downloaded CentOS 8 and tried g++, and of course it wasn't build with |
Same error im afraid with
|
Can you post the output of |
|
Thank you!
So |
Hello, I tried to reproduce your problem. Click mecmake ../seqan3/test/snippet/ -DCMAKE_CXX_COMPILER=/dev/shm/seiler/issue_2244/gcc-9/bin/g++
...
make VERBOSE=1 issue_2244_snippet
...
[100%] Building CXX object CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o
/usr/bin/ccache /dev/shm/seiler/issue_2244/gcc-9/bin/g++ -DSEQAN3_HAS_BZIP2=1 -DSEQAN3_HAS_ZLIB=1 -I/dev/shm/seiler/issue_2244/issue_test/vendor/googletest/googletest/include -I/dev/shm/seiler/issue_2244/seqan3/test/include -I/dev/shm/seiler/issue_2244/seqan3/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/sdsl-lite/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/range-v3/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/cereal/include -Wno-unused -pedantic -Wall -Wextra -Werror -std=c++17 -fconcepts -pthread -o CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o -c /dev/shm/seiler/issue_2244/seqan3/test/snippet/argument_parser/issue_2244.cpp
In file included from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/io/detail/misc.hpp:19,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/argument_parser/validators.hpp:29,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/argument_parser/detail/format_base.hpp:23,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/argument_parser/detail/format_help.hpp:20,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/argument_parser/argument_parser.hpp:25,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/argument_parser/all.hpp:15,
from /dev/shm/seiler/issue_2244/seqan3/test/snippet/argument_parser/issue_2244.cpp:2:
/dev/shm/seiler/issue_2244/seqan3/include/seqan3/io/exception.hpp: In constructor ‘seqan3::io_error::io_error(const string&, const std::error_code&)’:
/dev/shm/seiler/issue_2244/seqan3/include/seqan3/io/exception.hpp:59:72: error: no matching function for call to ‘std::ios_base::failure::failure(<brace-enclosed initializer list>)’ 59 | std::error_code const & ec) : std::ios_base::failure{s, ec}
| ^
In file included from /dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/ios:42,
from /dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/ostream:38,
from /dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/iostream:39,
from /dev/shm/seiler/issue_2244/seqan3/include/seqan3/core/debug_stream.hpp:15,
from /dev/shm/seiler/issue_2244/seqan3/test/snippet/argument_parser/issue_2244.cpp:1:
/dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/bits/ios_base.h:282:7: note: candidate: ‘std::ios_base::failure::failure(const string&)’
282 | failure(const string& __str) throw();
| ^~~~~~~
/dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/bits/ios_base.h:282:7: note: candidate expects 1 argument, 2 provided
/dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/bits/ios_base.h:276:11: note: candidate: ‘std::ios_base::failure::failure(const std::ios_base::failure&)’
276 | class failure : public exception
| ^~~~~~~
/dev/shm/seiler/issue_2244/gcc-9/include/c++/9.3.1/bits/ios_base.h:276:11: note: candidate expects 1 argument, 2 provided
make[3]: *** [CMakeFiles/issue_2244_snippet.dir/build.make:63: CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o] Error 1
make[3]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test'
make[2]: *** [CMakeFiles/Makefile2:13051: CMakeFiles/issue_2244_snippet.dir/all] Error 2
make[2]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test'
make[1]: *** [CMakeFiles/Makefile2:13058: CMakeFiles/issue_2244_snippet.dir/rule] Error 2
make[1]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test'
make: *** [Makefile:5914: issue_2244_snippet] Error 2 However, using the Click mecmake ../seqan3/test/snippet/ -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" -DCMAKE_CXX_COMPILER=/dev/shm/seiler/issue_2244/gcc-9/bin/g++
...
make VERBOSE=1 issue_2244_snippet
...
Scanning dependencies of target issue_2244_snippet
make[3]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test2'
make -f CMakeFiles/issue_2244_snippet.dir/build.make CMakeFiles/issue_2244_snippet.dir/build
make[3]: Entering directory '/dev/shm/seiler/issue_2244/issue_test2'
[100%] Building CXX object CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o
/usr/bin/ccache /dev/shm/seiler/issue_2244/gcc-9/bin/g++ -DSEQAN3_HAS_BZIP2=1 -DSEQAN3_HAS_ZLIB=1 -I/dev/shm/seiler/issue_2244/issue_test2/vendor/googletest/googletest/include -I/dev/shm/seiler/issue_2244/seqan3/test/include -I/dev/shm/seiler/issue_2244/seqan3/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/sdsl-lite/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/range-v3/include -isystem /dev/shm/seiler/issue_2244/seqan3/submodules/cereal/include -D_GLIBCXX_USE_CXX11_ABI=1 -Wno-unused -pedantic -Wall -Wextra -Werror -std=c++17 -fconcepts -pthread -o CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o -c /dev/shm/seiler/issue_2244/seqan3/test/snippet/argument_parser/issue_2244.cpp
[100%] Linking CXX executable argument_parser/issue_2244_snippet
/usr/bin/cmake -E cmake_link_script CMakeFiles/issue_2244_snippet.dir/link.txt --verbose=1
/dev/shm/seiler/issue_2244/gcc-9/bin/g++ -D_GLIBCXX_USE_CXX11_ABI=1 CMakeFiles/issue_2244_snippet.dir/argument_parser/issue_2244.cpp.o -o argument_parser/issue_2244_snippet -pthread /usr/lib/powerpc64le-linux-gnu/libz.so /usr/lib/powerpc64le-linux-gnu/libbz2.so -lrt lib/libgtest_main.a lib/libgtest.a -lpthread make[3]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test2'
[100%] Built target issue_2244_snippet
make[2]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test2'
/usr/bin/cmake -E cmake_progress_start /dev/shm/seiler/issue_2244/issue_test2/CMakeFiles 0
make[1]: Leaving directory '/dev/shm/seiler/issue_2244/issue_test2' Your |
I did manage to set up centos 7 and I can verify that the standard compilers don't work out-of-the-box. Furthermore, I set |
@Acribbs From what I see, you would need to compile gcc yourself to use seqan3 completely on centos / rhel 7 right now. I'm really sorry for the inconvenience. I'll try to create a list of files / modules which are affected by centos 7 (i.e. -D_GLIBCXX_USE_CXX11_ABI=0). Maybe if that list is not too long, you can at least use parts of seqan3 for now. I put this ticket on the agenda of our next strategy meeting, to discuss whether we want to support |
@Acribbs I probably spent more time than I should have and made our unit tests compilable with For the team: I did this, because I noticed that we had the problem in the past with the gcc 7 from ppa:ubuntu-toolchain-r (see https://github.com/seqan/seqan3/pull/113/files) and I could apply the same patches from the past to make this work again. The question is still open if we actively want to support |
Many thanks for your help with this. Im going to look for another system to use in the meantime, which distro do you recommend? |
Distro choice is up to you, in general the most recent one should work. See https://docs.seqan.de/seqan/3.0.2/setup.html for a general setup guide. Actively tested OSes:
Uncommon distros that worked in the past:
|
Great thanks for this info, do you want to close this issue now or keep it open? If I have further problems I would likely make another issue. Thanks again for all the help in trying to resolve this issue. |
That's the spirit :) Contact us, we try to help you! You can also ask questions at https://gitter.im/seqan/Lobby.
Please leave it open, since there are some follow-up things to do. Depending on whether we want to support
|
Core meeting 2020-11-23:We voted for partial support. That means we do not guarantee that SeqAn works seamlessly on CentOS 7/RHEL 7. We integrate it into our nightlies. Before adding workarounds, the system administrator should try adding more recent compilers (which can usually also be installed in user space). If that is not possible, we welcome any contribution to make it more stable. |
[FIX] #2244: basic support for _GLIBCXX_USE_CXX11_ABI=0
Acceptance criteria
Tasks
|
I had the same issue sometime last year and reported it upstream, it's actually a bug in the patched standard library on Redhat systems. The issue has now been resolved upstream and devtoolset-10 (which contains GCC10 and will be available on RHEL7) should work with SeqAn3. Ticket trail: edit: The bug is that the API is broken when the flag is set. The flag is only supposed to affect ABI. We don't care about ABI, so we should never have been affected. |
* [DOC] add documentation for CentOS 7 / RHEL 7 Fixes seqan#2244 (comment) * [skip ci] * Apply suggestions from code review Co-authored-by: Enrico Seiler <[email protected]> Co-authored-by: Enrico Seiler <[email protected]>
* [TEST] move debug_stream_alignment_test.cpp * [TEST] move cigar_operation_test.cpp * [TEST] add alphabet/range/hash_test.cpp * [TEST] move buffer_queue_test.cpp * [TEST] move inherited_iterator_base_test.cpp * [TEST] move random_access_iterator_test.cpp * [TEST] move istreambuf_view_test.cpp * [TEST] add io/detail/magic_header_test.cpp * [TEST] add io/detail/take_exactly_view_test.cpp * [TEST] move char_operations_predicate_test.cpp * [TEST] move integer_traits_test.cpp * [TEST] move type_name_as_string_test.cpp * [TEST] move transformation_trait_or_test.cpp * [TEST] move convert_test.cpp * [TEST] move deep_test.cpp * [DOC] fix snippet * [INFRA] update platform.hpp * [FIX] remove unnecessary includes * [MISC] update ranges-library and remove workaround * [INFRA] add -DCMAKE_BUILD_TYPE=FEDORA to simulate fedora builds * [INFRA] automatically generate snippets from a scaffold * [DOC] generate all [rd]na(4|5|15)_implicit_conversion_from_[rd]na(4|5|15).cpp snippets * [DOC] re-generate all [rd]na(4|5|15)(_char|)_literal * [DOC] make sure implict conversion is as expected * [INFRA] Ignore apt failures * Check changelog links and add header changes. (#2641) * Check changelog links and add header changes. * reordering * Add missed headers. and remove detail headers. all.hpp's are not included. * Update CHANGELOG.md Co-authored-by: Lydia Buntrock <[email protected]> * Update CHANGELOG.md Co-authored-by: Lydia Buntrock <[email protected]> * Update CHANGELOG.md Co-authored-by: Lydia Buntrock <[email protected]> * Update CHANGELOG.md Co-authored-by: Lydia Buntrock <[email protected]> * Apply 2nd review. Co-authored-by: Lydia Buntrock <[email protected]> * [DOC] Move changelog entries to their correct place (from 3.0.2 to 3.0.3) * [DOC] add known good compilers to CHANGELOG.md * [DOC] fix links in CHANGELOG.md * [FIX] brew script * [DOC] add documentation for CentOS 7 / RHEL 7 (#2661) * [DOC] add documentation for CentOS 7 / RHEL 7 Fixes #2244 (comment) * [skip ci] * Apply suggestions from code review Co-authored-by: Enrico Seiler <[email protected]> Co-authored-by: Enrico Seiler <[email protected]> * remove ref_seq, evalue, bit_score from sam file output (#2658) * [MISC] deprecate seqan3::sam_file::output fields (seqan3::field::{ref_seq, evalue, bit_score}) sam_file_output does not need the fields ref_seq, evalue, bit_score. This commit remove those fields from the default-fields and ensures that custom fields don't contain those fields. This commit also splits ::push_back and ::emplace_back into four versions to deprecate the usage of the old default-fields case. * [MISC] deprecate seqan3::sam_file_output::{emplace, push}_back * [MISC] deprecate seqan3::sam_file::input fields (seqan3::field::{ref_seq, evalue, bit_score}) * [MISC] fix gcc-7 issues with SEQAN3_DEPRECATED_310 * [FIX] remove seqan3::field::ref_seq from benchmark * [DOC] add CHANGELOG * Apply suggestions from code review * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: Enrico Seiler <[email protected]> Co-authored-by: marehr <[email protected]> Co-authored-by: Marcel <[email protected]> Co-authored-by: simonsasse <[email protected]> Co-authored-by: Lydia Buntrock <[email protected]>
Platform
Description
Im relatively new to C++ so could entirely be my stupidity. When I try to compile my hello world I get the following error that seem to be related to the argument_parser because when I remove this header ref there are no errors.
How to repeat the problem
Code snippet:
commands in build dir:
Compile error:
The text was updated successfully, but these errors were encountered: