From feiyunw at yahoo.com Sat May 19 05:58:57 2018 From: feiyunw at yahoo.com (Feiyun Wang) Date: Sat May 19 10:15:07 2018 Subject: [libcutl-users] Cygwin64 cutl/details/boost/regex [-Wnarrowing] problem References: <486079410.3005552.1526723937722.ref@mail.yahoo.com> Message-ID: <486079410.3005552.1526723937722@mail.yahoo.com> Hi, I was building libcutl (git SHA-1: bfe21ef, 2018/5/4) with the latest Cygwin64. Execute "make" command and answering ENTER to all questions, it yields: ```` c++ /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/src/instances.cxx In file included from /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/regex_traits.hpp:39:0, ???????????????? from /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/regex_traits.hpp:27, ???????????????? from /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/regex.hpp:39, ???????????????? from /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex.hpp:31, ???????????????? from /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/src/instances.cxx:30: /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/cpp_regex_traits.hpp: In instantiation of 'void cutl_details_boost::re_detail::cpp_regex_traits_implementation::init() [with charT = char]': /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/instances.hpp:149:64:?? required from here /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/cpp_regex_traits.hpp:730:7: error: narrowing conversion of '-105' from 'std::ctype_base::mask {aka char}' to 'cutl_details_boost::re_detail::cpp_regex_traits_implementation::char_class_type {aka unsigned int}' inside { } [-Wnarrowing] ?????? }; ?????? ^ /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/cpp_regex_traits.hpp: In instantiation of 'cutl_details_boost::re_detail::cpp_regex_traits_implementation::char_class_type cutl_details_boost::re_detail::cpp_regex_traits_implementation::lookup_classname_imp(const charT*, const charT*) const [with charT = char; cutl_details_boost::re_detail::cpp_regex_traits_implementation::char_class_type = unsigned int]': /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/instances.hpp:152:138:?? required from here /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/v4/cpp_regex_traits.hpp:796:4: error: narrowing conversion of '-105' from 'std::ctype_base::mask {aka char}' to 'cutl_details_boost::re_detail::cpp_regex_traits_implementation::char_class_type {aka unsigned int}' inside { } [-Wnarrowing] ??? }; ??? ^ make: *** [/usr/local/include/build-0.3/cxx/gnu/cxx-o.make:24: /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/src/instances.o] Error 1 ```` To fix this, I should set g++ compiler option -Wno-narrowing for the original "make" like: ```` Please enter any extra C++ compiler options. []: -Wno-narrowing ```` I have no knowledge about libcutl internals, so I suggest you to fix the source, or add a default C++ compiler option "-Wno-narrowing" as a temporary workaround. BTW, my toolset versions: ```` $ gcc --version gcc (GCC) 6.4.0 Copyright (C) 2017 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. $ g++ --version g++ (GCC) 6.4.0 Copyright (C) 2017 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. $ make --version GNU Make 4.2.1 Built for x86_64-unknown-cygwin Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ```` Sincerely, Feiyun Wang From boris at codesynthesis.com Mon May 21 06:45:01 2018 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon May 21 06:45:52 2018 Subject: [libcutl-users] Re: Cygwin64 cutl/details/boost/regex [-Wnarrowing] problem In-Reply-To: <486079410.3005552.1526723937722@mail.yahoo.com> References: <486079410.3005552.1526723937722.ref@mail.yahoo.com> <486079410.3005552.1526723937722@mail.yahoo.com> Message-ID: Feiyun Wang writes: > I was building libcutl (git SHA-1: bfe21ef, 2018/5/4) with the latest Cygwin64. > Execute "make" command and answering ENTER to all questions, it yields: > > c++ /cygdrive/d/prj/odb/libcutl/cutl/details/boost/regex/src/instances.cxx Yes, the use of embedded Boost regex is now deprecated. You compiler already includes perfectly functional regex implementation. If you build libcutl with build2, it will exclude embedded Boost. Boris