You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/05/12 21:46:46 UTC

[GitHub] [trafficserver] bryancall opened a new issue, #8848: Fedora 36 build issue with catch.hpp

bryancall opened a new issue, #8848:
URL: https://github.com/apache/trafficserver/issues/8848

   I get this error with gcc 12.1.1 on Fedora 36.  I am able to get around this issue if I make this modification to catch.hpp:
   
   Patch:
   ```
   +#pragma GCC diagnostic error "-Wmaybe-uninitialized"
   +#pragma GCC diagnostic push
   +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
    #include <functional>
   +#pragma GCC diagnostic pop
   +#pragma GCC diagnostic pop
   ```
   
   Compiler error:
   ```
     CXX      unit_tests/freelist_benchmark-freelist_benchmark.o
   In file included from /usr/include/c++/12/functional:59,
                    from /home/bcall/dev/apache/trafficserver/build-Linux_gcc/../tests/include/catch.hpp:3483,
                    from ../../../src/tscore/unit_tests/freelist_benchmark.cc:25:
   In constructor ‘std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool; _ArgTypes = {char}]’,
       inlined from ‘std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]’ at /usr/include/c++/12/bits/regex_automaton.h:149:4,
       inlined from ‘std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]’ at /usr/include/c++/12/bits/regex_automaton.h:146:7,
       inlined from ‘std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT = std::__cxx11::regex_traits<char>]’ at /usr/include/c++/12/bits/regex_automaton.h:290:24:
   /usr/include/c++/12/bits/std_function.h:405:42: error: ‘*(std::function<bool(char)>*)((char*)&__tmp + offsetof(std::__detail::_StateT, std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker’ may be used uninitialized [-Werror=maybe-uninitialized]
     405 |       : _Function_base(), _M_invoker(__x._M_invoker)
         |                                      ~~~~^~~~~~~~~~
   In file included from /usr/include/c++/12/regex:63,
                    from /home/bcall/dev/apache/trafficserver/build-Linux_gcc/../tests/include/catch.hpp:11706:
   /usr/include/c++/12/bits/regex_automaton.h: In member function ‘std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT = std::__cxx11::regex_traits<char>]’:
   /usr/include/c++/12/bits/regex_automaton.h:287:17: note: ‘__tmp’ declared here
     287 |         _StateT __tmp(_S_opcode_subexpr_end);
         |                 ^~~~~
   In member function ‘bool std::_Function_base::_M_empty() const’,
       inlined from ‘std::function<_Res(_ArgTypes ...)>::operator bool() const [with _Res = bool; _ArgTypes = {char}]’ at /usr/include/c++/12/bits/std_function.h:574:25,
       inlined from ‘std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool; _ArgTypes = {char}]’ at /usr/include/c++/12/bits/std_function.h:407:6,
       inlined from ‘std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]’ at /usr/include/c++/12/bits/regex_automaton.h:149:4,
       inlined from ‘std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]’ at /usr/include/c++/12/bits/regex_automaton.h:146:7,
       inlined from ‘std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT = std::__cxx11::regex_traits<char>]’ at /usr/include/c++/12/bits/regex_automaton.h:290:24:
   /usr/include/c++/12/bits/std_function.h:247:37: error: ‘*(const std::_Function_base*)((char*)&__tmp + offsetof(std::__detail::_StateT, std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::_Function_base::_M_manager’ may be used uninitialized [-Werror=maybe-uninitialized]
     247 |     bool _M_empty() const { return !_M_manager; }
         |                                     ^~~~~~~~~~
   /usr/include/c++/12/bits/regex_automaton.h: In member function ‘std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT = std::__cxx11::regex_traits<char>]’:
   /usr/include/c++/12/bits/regex_automaton.h:287:17: note: ‘__tmp’ declared here
     287 |         _StateT __tmp(_S_opcode_subexpr_end);
         |                 ^~~~~
   cc1plus: all warnings being treated as errors
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall commented on issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
bryancall commented on issue #8848:
URL: https://github.com/apache/trafficserver/issues/8848#issuecomment-1126370819

   Doing a simple catch test works:
   ```
   12:07:38 zeus:(master)~/files/src/c/test_code$ cat catch.cc
   #define CATCH_CONFIG_MAIN
   #include "catch.hpp"
   #include <fmt/core.h>
   
   TEST_CASE("test", "test")
   {
     REQUIRE(1 == 1);
     fmt::print("hello world\n");
   }
   12:07:47 zeus:(master)~/files/src/c/test_code$ g++ -O3 -lfmt catch.cc && ./a.out
   hello world
   ===============================================================================
   All tests passed (1 assertion in 1 test case)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] maskit commented on issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
maskit commented on issue #8848:
URL: https://github.com/apache/trafficserver/issues/8848#issuecomment-1229833911

   I confirmed the issue is resolved. I followed the steps above (non-debug build with the docker image) to reproduce the error, and the error disappeared after I ran `dnf update gcc`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall closed issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
bryancall closed issue #8848: Fedora 36 build issue with catch.hpp
URL: https://github.com/apache/trafficserver/issues/8848


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bneradt commented on issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
bneradt commented on issue #8848:
URL: https://github.com/apache/trafficserver/issues/8848#issuecomment-1126254134

   In case this is helpful, building with the ATS CI's fedora:36 image completes successfully. To reproduce this locally:
   
   ```
   docker pull ci.trafficserver.apache.org/ats/fedora:36
   docker run --name build_fedora_36 -it ci.trafficserver.apache.org/ats/fedora:36 /bin/bash
   
   # Now, from within the container:
   
   cd /var/tmp
   git clone https://github.com/apache/trafficserver.git
   cd trafficserver/
   
   autoreconf -fiv
   ./configure --with-openssl=/opt/openssl-quic --enable-experimental-plugins --enable-example-plugins --prefix=/tmp/ats/ --enable-werror --enable-debug --enable-wccp --enable-luajit --enable-ccache
   make -j4 V=1 Q=
   make -j 2 check VERBOSE=Y V=1
   make install
   /tmp/ats/bin/traffic_server -K -k -R 1
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] maskit commented on issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
maskit commented on issue #8848:
URL: https://github.com/apache/trafficserver/issues/8848#issuecomment-1229697927

   gcc 12.2.1 got available on fedora36, and I don't see the error with it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall commented on issue #8848: Fedora 36 build issue with catch.hpp

Posted by GitBox <gi...@apache.org>.
bryancall commented on issue #8848:
URL: https://github.com/apache/trafficserver/issues/8848#issuecomment-1126329602

   @bneradt debug builds and using /opt/openssl work for me too.  I get error with test_tscore failing if I use openssl3 (the system's openssl lib).  Also, I get build failures doing the non-debug build with the docker container.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org