Skip to content
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

Closed
Acribbs opened this issue Nov 9, 2020 · 23 comments · Fixed by #2257
Closed

CentOS 7 / RHEL 7: error compiling argument_parser #2244

Acribbs opened this issue Nov 9, 2020 · 23 comments · Fixed by #2257
Labels
bug faulty or wrong behaviour of code external bug Bugs that need to fixed upstream by dependencies. ready to tackle Fully specified, discussed and understood. Can be tackled.

Comments

@Acribbs
Copy link

Acribbs commented Nov 9, 2020

Platform

  • SeqAn version: master branch (Also same error on 3.0.1)
  • Operating system: Linux cbrglogin2 3.10.0-1127.19.1.el7.x86_64 [INTERNAL] Renamed sequence file headers. #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler: /opt/rh/devtoolset-9/root/usr/bin/g++
  • Compiler version - g++ (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

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:

#include <seqan3/core/debug_stream.hpp>
#include <seqan3/argument_parser/all.hpp>

int main()
{
    seqan3::debug_stream << "Hello world\n";
    return 0;
}

commands in build dir:

cmake ../source
make

Compile error:

[ 50%] Building CXX object CMakeFiles/hello_world.dir/hello_world.cpp.o
In file included from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/detail/misc.hpp:19,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/validators.hpp:29,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_base.hpp:23,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_help.hpp:20,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:25,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:3:
/Filers/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp: In constructor ‘seqan3::io_error::io_error(const string&, const std::error_code&)’:
/Filers/home/cgat/acribbs/Documents/tutorial/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 /opt/rh/devtoolset-9/root/usr/include/c++/9/ios:42,
                 from /opt/rh/devtoolset-9/root/usr/include/c++/9/ostream:38,
                 from /opt/rh/devtoolset-9/root/usr/include/c++/9/iostream:39,
                 from /Filers/home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/ios_base.h:282:7: note: candidate: ‘std::ios_base::failure::failure(const string&)’
  282 |       failure(const string& __str) throw();
      |       ^~~~~~~
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/ios_base.h:282:7: note:   candidate expects 1 argument, 2 provided
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/ios_base.h:276:11: note: candidate: ‘std::ios_base::failure::failure(const std::ios_base::failure&)’
  276 |     class failure : public exception
      |           ^~~~~~~
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/ios_base.h:276:11: note:   candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/hello_world.dir/build.make:83: CMakeFiles/hello_world.dir/hello_world.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/hello_world.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

@Acribbs Acribbs added the bug faulty or wrong behaviour of code label Nov 9, 2020
@marehr
Copy link
Member

marehr commented Nov 9, 2020

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:

  • /Filers/home/cgat/acribbs/Documents/tutorial/
    • seqan3/ which seems to the git checkout
    • source/CMakeLists.txt
    • source/hello_world.cpp
    • build/ which was populated by cmake ../source

Some Questions:

  • Can you share your CMakeLists.txt?
  • Can you post the complete output of cmake ../source?
  • Can you run make VERBOSE=1 and share the output?
  • Can you give me the output of /opt/rh/devtoolset-9/root/usr/bin/g++ -v?

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 std::ios_base::failure{s, ec} where s is of type std::string and ec of type std::error_code should be allowed, see https://en.cppreference.com/w/cpp/io/ios_base/failure.

@Acribbs
Copy link
Author

Acribbs commented Nov 9, 2020

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:

cmake_minimum_required (VERSION 3.4)
project (seqan3_tutorial CXX)
 
find_package (SeqAn3 3.0.0 REQUIRED HINTS "${CMAKE_SOURCE_DIR}/../seqan3/build_system")
 
add_executable (hello_world hello_world.cpp)
 
target_link_libraries (hello_world seqan3::seqan3)

output of 'cmake ../source':

[acribbs@cbrglogin2 build]$ cmake ../source 
-- The CXX compiler identification is GNU 7.3.1
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Finding SeqAn3 and checking requirements:
--   SeqAn3 include dir found:   /home/cgat/acribbs/Documents/tutorial/seqan3/include
--   Detected as running from a repository checkout…
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include
--   C++ Standard-17 support:    via -std=c++17
--   C++ Concepts support:       via -fconcepts
--   C++ Filesystem header:      <experimental/filesystem>
--   C++ Filesystem library:     via -lstdc++fs
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
--   Thread support:             via -pthread
--   Required dependency:        Range-V3 found.
--   Required dependency:        SDSL found.
--   Optional dependency:        Cereal found.
--   Optional dependency:        Lemon not found.
--   Optional dependency:        ZLIB-1.2.7 found.
--   Optional dependency:        BZip2-1.0.6 found.
--   Optional dependency:        libexecinfo found.
--   SeqAn3 platform.hpp build:  passed.
-- Found SeqAn3: /home/cgat/acribbs/Documents/tutorial/seqan3/include (Required is at least version "3.0.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cgat/acribbs/Documents/tutorial/build

Output from make VERBOSE=1

[acribbs@cbrglogin2 build]$ make VERBOSE=1
/Filers/package/cmake/3.17.2/bin/cmake -S/home/cgat/acribbs/Documents/tutorial/source -B/home/cgat/acribbs/Documents/tutorial/build --check-build-system CMakeFiles/Makefile.cmake 0
/Filers/package/cmake/3.17.2/bin/cmake -E cmake_progress_start /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/depend
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
cd /home/cgat/acribbs/Documents/tutorial/build && /Filers/package/cmake/3.17.2/bin/cmake -E cmake_depends "Unix Makefiles" /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/DependInfo.cmake --color=
Dependee "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/DependInfo.cmake" is newer than depender "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/depend.internal".
Dependee "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/depend.internal".
Scanning dependencies of target hello_world
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/build
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
[ 50%] Building CXX object CMakeFiles/hello_world.dir/hello_world.cpp.o
/opt/rh/devtoolset-7/root/usr/bin/c++  -DSEQAN3_HAS_BZIP2=1 -DSEQAN3_HAS_ZLIB=1 -I/home/cgat/acribbs/Documents/tutorial/seqan3/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include  -std=c++17 -fconcepts -pthread -o CMakeFiles/hello_world.dir/hello_world.cpp.o -c /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp
/home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:3:10: fatal error: FQFeeder/src/FastxParser.hpp: No such file or directory
 #include <FQFeeder/src/FastxParser.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/hello_world.dir/build.make:83: CMakeFiles/hello_world.dir/hello_world.cpp.o] Error 1
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/hello_world.dir/all] Error 2
make[1]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make: *** [Makefile:104: all] Error 2
[acribbs@cbrglogin2 build]$ cd ../source/
[acribbs@cbrglogin2 source]$ ls
CMakeLists.txt  CMakeLists.txt~  #hello_world.cpp#  hello_world.cpp  hello_world.cpp~
[acribbs@cbrglogin2 source]$ rm -rf CMakeLists.txt
CMakeLists.txt   CMakeLists.txt~  
[acribbs@cbrglogin2 source]$ rm -rf CMakeLists.txt~
[acribbs@cbrglogin2 source]$ rm -rf \#hello_world.cpp# 
[acribbs@cbrglogin2 source]$ rm -rf hello_world.cpp~
[acribbs@cbrglogin2 source]$ emacs hello_world.cpp 
[acribbs@cbrglogin2 source]$ ls
CMakeLists.txt  hello_world.cpp  hello_world.cpp~
[acribbs@cbrglogin2 source]$ emacs CMakeLists.txt 
[acribbs@cbrglogin2 source]$ cd ../build/
[acribbs@cbrglogin2 build]$ cmake ../source/
-- Finding SeqAn3 and checking requirements:
--   SeqAn3 include dir found:   /home/cgat/acribbs/Documents/tutorial/seqan3/include
--   Detected as running from a repository checkout…
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include
--     …adding submodule include:  /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include
--   C++ Standard-17 support:    via -std=c++17
--   C++ Concepts support:       via -fconcepts
--   C++ Filesystem header:      <experimental/filesystem>
--   C++ Filesystem library:     via -lstdc++fs
--   Thread support:             via -pthread
--   Required dependency:        Range-V3 found.
--   Required dependency:        SDSL found.
--   Optional dependency:        Cereal found.
--   Optional dependency:        Lemon not found.
--   Optional dependency:        ZLIB-1.2.7 found.
--   Optional dependency:        BZip2-1.0.6 found.
--   Optional dependency:        libexecinfo found.
--   SeqAn3 platform.hpp build:  passed.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cgat/acribbs/Documents/tutorial/build
[acribbs@cbrglogin2 build]$ make VERBOSE=1
/Filers/package/cmake/3.17.2/bin/cmake -S/home/cgat/acribbs/Documents/tutorial/source -B/home/cgat/acribbs/Documents/tutorial/build --check-build-system CMakeFiles/Makefile.cmake 0
/Filers/package/cmake/3.17.2/bin/cmake -E cmake_progress_start /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/depend
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
cd /home/cgat/acribbs/Documents/tutorial/build && /Filers/package/cmake/3.17.2/bin/cmake -E cmake_depends "Unix Makefiles" /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/DependInfo.cmake --color=
Dependee "/home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp" is newer than depends file "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/depend.internal".
Clearing dependencies in "/home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/depend.make".
Scanning dependencies of target hello_world
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/build
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
[ 50%] Building CXX object CMakeFiles/hello_world.dir/hello_world.cpp.o
/opt/rh/devtoolset-7/root/usr/bin/c++  -DSEQAN3_HAS_BZIP2=1 -DSEQAN3_HAS_ZLIB=1 -I/home/cgat/acribbs/Documents/tutorial/seqan3/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include  -std=c++17 -fconcepts -pthread -o CMakeFiles/hello_world.dir/hello_world.cpp.o -c /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp
In file included from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/detail/misc.hpp:19:0,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/validators.hpp:29,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_base.hpp:23,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_help.hpp:20,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:25,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp: In constructor ‘seqan3::io_error::io_error(const string&, const std::error_code&)’:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp:59:67: error: no matching function for call to ‘std::ios_base::failure::failure(<brace-enclosed initializer list>)’
              std::error_code const & ec) : std::ios_base::failure{}
                                                                   ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:16,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note: candidate: std::ios_base::failure::failure(const string&)
       failure(const string& __str) throw();
       ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note:   candidate expects 1 argument, 0 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note: candidate: std::ios_base::failure::failure(const std::ios_base::failure&)
     class failure : public exception
           ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/hello_world.dir/build.make:83: CMakeFiles/hello_world.dir/hello_world.cpp.o] Error 1
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/hello_world.dir/all] Error 2
make[1]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make: *** [Makefile:104: all] Error 2

Output of /opt/rh/devtoolset-9/root/usr/bin/g++ -v:

[acribbs@cbrglogin2 build]$ /opt/rh/devtoolset-9/root/usr/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/opt/rh/devtoolset-9/root/usr/bin/g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure
  --enable-bootstrap
  --enable-languages=c,c++,fortran,lto
  --prefix=/opt/rh/devtoolset-9/root/usr
  --mandir=/opt/rh/devtoolset-9/root/usr/share/man
  --infodir=/opt/rh/devtoolset-9/root/usr/share/info
  --with-bugurl=http://bugzilla.redhat.com/bugzilla
  --enable-shared
  --enable-threads=posix
  --enable-checking=release
  --enable-multilib
  --with-system-zlib
  --enable-__cxa_atexit
  --disable-libunwind-exceptions
  --enable-gnu-unique-object
  --enable-linker-build-id
  --with-gcc-major-version-only
  --with-linker-hash-style=gnu
  --with-default-libstdcxx-abi=gcc4-compatible
  --enable-plugin
  --enable-initfini-array
  --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install
  --disable-libmpx
  --enable-gnu-indirect-function
  --with-tune=generic
  --with-arch_32=x86-64
  --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC) 

@Acribbs
Copy link
Author

Acribbs commented Nov 9, 2020

Just remembered that I reverted to using g++-7 and pasted the command for g++-9

[acribbs@cbrglogin2 source]$ /opt/rh/devtoolset-7/root/usr/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/opt/rh/devtoolset-7/root/usr/bin/g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure
 --enable-bootstrap
 --enable-languages=c,c++,fortran,lto
 --prefix=/opt/rh/devtoolset-7/root/usr
 --mandir=/opt/rh/devtoolset-7/root/usr/share/man
 --infodir=/opt/rh/devtoolset-7/root/usr/share/info
 --with-bugurl=http://bugzilla.redhat.com/bugzilla
 --enable-shared
 --enable-threads=posix
 --enable-checking=release
 --enable-multilib
 --with-system-zlib
 --enable-__cxa_atexit
 --disable-libunwind-exceptions
 --enable-gnu-unique-object
 --enable-linker-build-id
 --with-gcc-major-version-only
 --enable-plugin
 --with-linker-hash-style=gnu
 --enable-initfini-array
 --with-default-libstdcxx-abi=gcc4-compatible
 --with-isl=/builddir/build/BUILD/gcc-7.3.1-20180303/obj-x86_64-redhat-linux/isl-install
 --enable-libmpx
 --enable-gnu-indirect-function
 --with-tune=generic
 --with-arch_32=i686
 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC) 

@marehr
Copy link
Member

marehr commented Nov 9, 2020

Okay thank you, at first glance your CMakeLists.txt, cmake .. and compiler seems fine.

And the build command, too:

/opt/rh/devtoolset-7/root/usr/bin/c++
 -DSEQAN3_HAS_BZIP2=1
 -DSEQAN3_HAS_ZLIB=1
 -I/home/cgat/acribbs/Documents/tutorial/seqan3/include
 -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include
 -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include
 -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include 
 -std=c++17
 -fconcepts
 -pthread
 -o CMakeFiles/hello_world.dir/hello_world.cpp.o
 -c /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp

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.

@marehr
Copy link
Member

marehr commented Nov 9, 2020

Okay my guess was correct, compiler was build with --with-default-libstdcxx-abi=gcc4-compatible. Trying to figure out how to override this.

https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html:

--with-default-libstdcxx-abi=OPTION

Set the default value for the _GLIBCXX_USE_CXX11_ABI macro (see Macros). The default is OPTION=new which sets the macro to 1, use OPTION=gcc4-compatible to set it to 0. This option does not change the library ABI.

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html:

_GLIBCXX_USE_CXX11_ABI

Defined to the value 1 by default. Configurable via --disable-libstdcxx-dual-abi and/or --with-default-libstdcxx-abi. ABI-changing. When defined to a non-zero value the library headers will use the new C++11-conforming ABI introduced in GCC 5, rather than the older ABI introduced in GCC 3.4. This changes the definition of several class templates, including std:string, std::list and some locale facets. For more details see Dual ABI.

@marehr
Copy link
Member

marehr commented Nov 9, 2020

Can you try this out:

cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" ../source/

and recompile?

@marehr
Copy link
Member

marehr commented Nov 9, 2020

I downloaded CentOS 8 and tried g++, and of course it wasn't build with --with-default-libstdcxx-abi=gcc4-compatible. Trying out CentOS 7 next.

@marehr marehr changed the title Error compiling argument_parser redhat: error compiling argument_parser Nov 9, 2020
@Acribbs
Copy link
Author

Acribbs commented Nov 10, 2020

Same error im afraid with
cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" ../source/

[acribbs@cbrglogin2 source]$ make
Scanning dependencies of target hello_world
[ 50%] Building CXX object CMakeFiles/hello_world.dir/hello_world.cpp.o
In file included from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/detail/misc.hpp:19:0,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/validators.hpp:29,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_base.hpp:23,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_help.hpp:20,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:25,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp: In constructor ‘seqan3::io_error::io_error(const string&, const std::error_code&)’:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp:59:67: error: no matching function for call to ‘std::ios_base::failure::failure(<brace-enclosed initializer list>)’
              std::error_code const & ec) : std::ios_base::failure{}
                                                                   ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:16,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note: candidate: std::ios_base::failure::failure(const string&)
       failure(const string& __str) throw();
       ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note:   candidate expects 1 argument, 0 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note: candidate: std::ios_base::failure::failure(const std::ios_base::failure&)
     class failure : public exception
           ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/hello_world.dir/build.make:83: CMakeFiles/hello_world.dir/hello_world.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/hello_world.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

@marehr
Copy link
Member

marehr commented Nov 10, 2020

Can you post the output of make VERBOSE=1?

@Acribbs
Copy link
Author

Acribbs commented Nov 10, 2020

(base) [acribbs@cbrglogin2 build]$ make VERBOSE=1
/Filers/package/cmake/3.17.2/bin/cmake -S/home/cgat/acribbs/Documents/tutorial/source -B/home/cgat/acribbs/Documents/tutorial/build --check-build-system CMakeFiles/Makefile.cmake 0
/Filers/package/cmake/3.17.2/bin/cmake -E cmake_progress_start /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/depend
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
cd /home/cgat/acribbs/Documents/tutorial/build && /Filers/package/cmake/3.17.2/bin/cmake -E cmake_depends "Unix Makefiles" /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/source /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build /home/cgat/acribbs/Documents/tutorial/build/CMakeFiles/hello_world.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make  -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/build
make[2]: Entering directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
[ 50%] Building CXX object CMakeFiles/hello_world.dir/hello_world.cpp.o
/opt/rh/devtoolset-7/root/usr/bin/c++ 
  -DSEQAN3_HAS_BZIP2=1
  -DSEQAN3_HAS_ZLIB=1
  -I/home/cgat/acribbs/Documents/tutorial/seqan3/include
  -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include
  -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include
  -isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include 
  -std=c++17
  -fconcepts
  -pthread
  -o CMakeFiles/hello_world.dir/hello_world.cpp.o
  -c /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp
In file included from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/detail/misc.hpp:19:0,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/validators.hpp:29,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_base.hpp:23,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/detail/format_help.hpp:20,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:25,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp: In constructor ‘seqan3::io_error::io_error(const string&, const std::error_code&)’:
/home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/io/exception.hpp:59:67: error: no matching function for call to ‘std::ios_base::failure::failure(<brace-enclosed initializer list>)’
              std::error_code const & ec) : std::ios_base::failure{}
                                                                   ^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42:0,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/ostream:38,
                 from /opt/rh/devtoolset-7/root/usr/include/c++/7/iostream:39,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/argument_parser.hpp:16,
                 from /home/cgat/acribbs/Documents/tutorial/seqan3/include/seqan3/argument_parser/all.hpp:15,
                 from /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp:1:
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note: candidate: std::ios_base::failure::failure(const string&)
       failure(const string& __str) throw();
       ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:282:7: note:   candidate expects 1 argument, 0 provided
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note: candidate: std::ios_base::failure::failure(const std::ios_base::failure&)
     class failure : public exception
           ^~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:276:11: note:   candidate expects 1 argument, 0 provided
make[2]: *** [CMakeFiles/hello_world.dir/build.make:83: CMakeFiles/hello_world.dir/hello_world.cpp.o] Error 1
make[2]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/hello_world.dir/all] Error 2
make[1]: Leaving directory '/Filers/home/cgat/acribbs/Documents/tutorial/build'
make: *** [Makefile:104: all] Error 2

@marehr
Copy link
Member

marehr commented Nov 10, 2020

Thank you!

/opt/rh/devtoolset-7/root/usr/bin/c++
-DSEQAN3_HAS_BZIP2=1
-DSEQAN3_HAS_ZLIB=1
-I/home/cgat/acribbs/Documents/tutorial/seqan3/include
-isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/sdsl-lite/include
-isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/range-v3/include
-isystem /home/cgat/acribbs/Documents/tutorial/seqan3/submodules/cereal/include
-std=c++17
-fconcepts
-pthread
-o CMakeFiles/hello_world.dir/hello_world.cpp.o
-c /home/cgat/acribbs/Documents/tutorial/source/hello_world.cpp

So -D_GLIBCXX_USE_CXX11_ABI=1 wasn't passed through. Give me a moment to figure out how to pass macros :)

@eseiler
Copy link
Member

eseiler commented Nov 10, 2020

Hello,

I tried to reproduce your problem.
I compiled g++-9 with the --with-default-libstdcxx-abi=gcc4-compatible flag and get the same error as you.

Click me
cmake ../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 -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" solved the issue for me.

Click me
cmake ../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 make VERBOSE=1 output looks like the -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" wasn't incorporated.
Can you retry, or try to run cmake again in an empty folder?

@marehr
Copy link
Member

marehr commented Nov 10, 2020

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 -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" on a fresh cmake checkout and it did NOT work. This could mean that gcc ports are build without DUAL-ABI. This would be very bad!

@marehr
Copy link
Member

marehr commented Nov 11, 2020

@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 _GLIBCXX_USE_CXX11_ABI=0, because it is more or less deprecated since gcc 5. (Just a sidenote, even redhat maintainers that work on gcc wrote "I haven't checked a build with that option for ages, so I can easily believe I've broken it.")

@marehr
Copy link
Member

marehr commented Nov 11, 2020

@Acribbs I probably spent more time than I should have and made our unit tests compilable with _GLIBCXX_USE_CXX11_ABI=0.

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 _GLIBCXX_USE_CXX11_ABI=0 for RHEL 7, CentOS 7 (at least supported until 2024) and possible other corporate environments.

@Acribbs
Copy link
Author

Acribbs commented Nov 12, 2020

Many thanks for your help with this. Im going to look for another system to use in the meantime, which distro do you recommend?

@marehr
Copy link
Member

marehr commented Nov 12, 2020

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:

  • Debian >= 10 (buster)
  • Ubuntu >= 18.04 (bionic)
  • MacOS via brew

Uncommon distros that worked in the past:

  • ArchLinux
  • FreeBSD
  • CentOS >= 8

@Acribbs
Copy link
Author

Acribbs commented Nov 12, 2020

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.

@marehr
Copy link
Member

marehr commented Nov 12, 2020

If I have further problems I would likely make another issue.

That's the spirit :) Contact us, we try to help you! You can also ask questions at https://gitter.im/seqan/Lobby.

Great thanks for this info, do you want to close this issue now or keep it open?

Please leave it open, since there are some follow-up things to do.

Depending on whether we want to support _GLIBCXX_USE_CXX11_ABI=0

  • Yes fully
    • update documentation
      • to say that we actively support CentOS 7 / RHEL 7
      • mention that there might be problems with standard-conform C++ code on that platform
    • update our CI to build with _GLIBCXX_USE_CXX11_ABI=0 for the full test suite (nightlies)
    • update cmake and/or platform.hpp to warn that _GLIBCXX_USE_CXX11_ABI=0 is used and point to our documentation.
  • Yes partially
    • update documentation to say that there might be issues with CentOS 7 and that CentOS 7 is community driven and patches are welcome
    • update our CI to build with _GLIBCXX_USE_CXX11_ABI=0 for the unit tests (nightlies)
    • update cmake and/or platform.hpp to warn that _GLIBCXX_USE_CXX11_ABI=0 is used and point to our documentation.
  • No
    • update documentation to say that we don't support CentOS 7 and we will never support it, please upgrade to CentOS 8
    • update cmake and/or platform.hpp to error when _GLIBCXX_USE_CXX11_ABI=0 is used and point to our documentation.

@marehr marehr added the external bug Bugs that need to fixed upstream by dependencies. label Nov 12, 2020
@marehr marehr changed the title redhat: error compiling argument_parser CentOS 7 / RHEL 7: error compiling argument_parser Nov 12, 2020
marehr added a commit to marehr/seqan3 that referenced this issue Nov 18, 2020
@rrahn
Copy link
Contributor

rrahn commented Nov 23, 2020

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.

marehr added a commit that referenced this issue Dec 1, 2020
[FIX] #2244: basic support for _GLIBCXX_USE_CXX11_ABI=0
@marehr marehr reopened this Dec 1, 2020
@rrahn
Copy link
Contributor

rrahn commented Dec 7, 2020

Acceptance criteria

  • In the platform support section an information is added about the partial support for CentOS/RHEL 7 until it's end of life.
  • The reader should learn that we do not actively maintain this platform, but that it is possible to compile a more recent compiler in user space. Otherwise, we also welcome patches from the community.

Tasks

  • In core platform add a disable flag to check if _GLIBCXX_USE_CXX11_ABI is set. SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC, which disables the warnings raised if the previous macro is set to 0.
    #if defined(_GLIBCXX_USE_CXX11_ABI) &&  _GLIBCXX_USE_CXX11_ABI == 0
      #ifndef(SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC)
        #pragma warning "warning message pointing to documentation above."
      #endif // SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC
    #endif // _GLIBCXX_USE_CXX11_ABI == 0
    Put this after
    #ifndef SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI
    # if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
    # define SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI 1
    # else
    # define SEQAN3_WORKAROUND_GCC_NO_CXX11_ABI 0
    # endif
    #endif
  • Test locally (no unit test) that the warning is raised when the macro is set via -D_GLIBCXX_USE_CXX11_ABI=0
  • Test locally (no unit test) that the warning is not raised when the macro is set via -D_GLIBCXX_USE_CXX11_ABI=0 -DSEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC
  • Test locally (no unit test) that the warning is not raised when the macro is set via -D_GLIBCXX_USE_CXX11_ABI=1
  • Document in doxygen SEQAN3_DISABLE_LEGACY_STD_DIAGNOSTIC macro with the intended use.

@rrahn rrahn added the ready to tackle Fully specified, discussed and understood. Can be tackled. label Dec 7, 2020
@h-2
Copy link
Member

h-2 commented Jan 26, 2021

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.
It only affects version 7 of RHEL / CentOS. Later versions are unaffected.

The issue has now been resolved upstream and devtoolset-10 (which contains GCC10 and will be available on RHEL7) should work with SeqAn3.
I would suggest not including workarounds for this bug unless they are simple, but that's of course up to you!

Ticket trail:
https://bugzilla.redhat.com/show_bug.cgi?id=1546704
https://bugzilla.redhat.com/show_bug.cgi?id=1887195

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.

@marehr marehr added this to the 3.0.3 2nd Release Sprint milestone May 1, 2021
marehr added a commit to marehr/seqan3 that referenced this issue May 16, 2021
eseiler added a commit to eseiler/seqan3 that referenced this issue May 19, 2021
* [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]>
eseiler added a commit that referenced this issue May 19, 2021
* [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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug faulty or wrong behaviour of code external bug Bugs that need to fixed upstream by dependencies. ready to tackle Fully specified, discussed and understood. Can be tackled.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants