You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing conan-io/conan-center-index#25955 which adds the latest version to Conan Center Index, we found that we were unable to compile this for apple-clang < 14, seemingly due to a missing vector include in percent.hpp (Logs here if needed)
In fact, if I apply this patch
diff --git a/include/mailio/percent.hpp b/include/mailio/percent.hpp
index 166ee3b..4bf0d46 100644
--- a/include/mailio/percent.hpp+++ b/include/mailio/percent.hpp@@ -14,6 +14,7 @@ copy at http://www.freebsd.org/copyright/freebsd-license.html.
#pragma once
#include <string>
+#include <vector>
#include "codec.hpp"
#include "export.hpp"
and try to compile locally, now the compilation is succesful (Some Conan logs are interwined, but the CMake results are the same if calling cmake directly)
mailio/0.24.0: Calling build()
mailio/0.24.0: Running CMake.configure()
mailio/0.24.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/abril/.conan2/p/b/maili79ef1286181f4/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src"
-- Using Conan toolchain: /Users/abril/.conan2/p/b/maili79ef1286181f4/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Defining libcxx as C++ flags: -stdlib=libc++
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/abril/Downloads/Xcode_13.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/abril/Downloads/Xcode_13.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Component target declared 'Boost::diagnostic_definitions'
-- Conan: Component target declared 'Boost::disable_autolinking'
-- Conan: Component target declared 'Boost::dynamic_linking'
-- Conan: Component target declared 'Boost::headers'
-- Conan: Component target declared 'Boost::boost'
-- Conan: Component target declared 'boost::_libboost'
-- Conan: Component target declared 'Boost::atomic'
-- Conan: Component target declared 'Boost::charconv'
-- Conan: Component target declared 'Boost::container'
-- Conan: Component target declared 'Boost::context'
-- Conan: Component target declared 'Boost::date_time'
-- Conan: Component target declared 'Boost::exception'
-- Conan: Component target declared 'Boost::math'
-- Conan: Component target declared 'Boost::program_options'
-- Conan: Component target declared 'Boost::regex'
-- Conan: Component target declared 'Boost::serialization'
-- Conan: Component target declared 'Boost::stacktrace'
-- Conan: Component target declared 'Boost::system'
-- Conan: Component target declared 'Boost::timer'
-- Conan: Component target declared 'Boost::chrono'
-- Conan: Component target declared 'Boost::coroutine'
-- Conan: Component target declared 'Boost::filesystem'
-- Conan: Component target declared 'Boost::json'
-- Conan: Component target declared 'Boost::math_c99'
-- Conan: Component target declared 'Boost::math_c99f'
-- Conan: Component target declared 'Boost::math_c99l'
-- Conan: Component target declared 'Boost::math_tr1'
-- Conan: Component target declared 'Boost::math_tr1f'
-- Conan: Component target declared 'Boost::math_tr1l'
-- Conan: Component target declared 'Boost::random'
-- Conan: Component target declared 'Boost::stacktrace_addr2line'
-- Conan: Component target declared 'Boost::stacktrace_backtrace'
-- Conan: Component target declared 'Boost::stacktrace_basic'
-- Conan: Component target declared 'Boost::stacktrace_noop'
-- Conan: Component target declared 'Boost::test'
-- Conan: Component target declared 'Boost::url'
-- Conan: Component target declared 'Boost::wserialization'
-- Conan: Component target declared 'Boost::fiber'
-- Conan: Component target declared 'Boost::graph'
-- Conan: Component target declared 'Boost::iostreams'
-- Conan: Component target declared 'Boost::nowide'
-- Conan: Component target declared 'Boost::prg_exec_monitor'
-- Conan: Component target declared 'Boost::process'
-- Conan: Component target declared 'Boost::test_exec_monitor'
-- Conan: Component target declared 'Boost::thread'
-- Conan: Component target declared 'Boost::wave'
-- Conan: Component target declared 'Boost::contract'
-- Conan: Component target declared 'Boost::fiber_numa'
-- Conan: Component target declared 'Boost::locale'
-- Conan: Component target declared 'Boost::log'
-- Conan: Component target declared 'Boost::type_erasure'
-- Conan: Component target declared 'Boost::unit_test_framework'
-- Conan: Component target declared 'Boost::log_setup'
-- Conan: Target declared 'boost::boost'
-- Conan: Target declared 'BZip2::BZip2'
-- Conan: Including build module from '/Users/abril/.conan2/p/bzip25a1056f9801d9/p/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Target declared 'libbacktrace::libbacktrace'
-- Conan: Target declared 'Iconv::Iconv'
-- Conan: Target declared 'ZLIB::ZLIB'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from '/Users/abril/.conan2/p/opens664a6f67afd5f/p/lib/cmake/conan-official-openssl-variables.cmake'
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done (1.9s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/abril/.conan2/p/b/maili79ef1286181f4/b/build/Release
mailio/0.24.0: Running CMake.build()
mailio/0.24.0: RUN: cmake --build "/Users/abril/.conan2/p/b/maili79ef1286181f4/b/build/Release" -- -j12
[ 6%] Building CXX object CMakeFiles/mailio.dir/src/base64.cpp.o
[ 12%] Building CXX object CMakeFiles/mailio.dir/src/bit7.cpp.o
[ 18%] Building CXX object CMakeFiles/mailio.dir/src/bit8.cpp.o
[ 25%] Building CXX object CMakeFiles/mailio.dir/src/binary.cpp.o
[ 31%] Building CXX object CMakeFiles/mailio.dir/src/dialog.cpp.o
[ 37%] Building CXX object CMakeFiles/mailio.dir/src/mailboxes.cpp.o
[ 50%] Building CXX object CMakeFiles/mailio.dir/src/message.cpp.o
[ 50%] Building CXX object CMakeFiles/mailio.dir/src/percent.cpp.o
[ 56%] Building CXX object CMakeFiles/mailio.dir/src/mime.cpp.o
[ 62%] Building CXX object CMakeFiles/mailio.dir/src/imap.cpp.o
[ 68%] Building CXX object CMakeFiles/mailio.dir/src/pop3.cpp.o
[ 75%] Building CXX object CMakeFiles/mailio.dir/src/codec.cpp.o
[ 81%] Building CXX object CMakeFiles/mailio.dir/src/quoted_printable.cpp.o
[ 93%] Building CXX object CMakeFiles/mailio.dir/src/q_codec.cpp.o
[ 93%] Building CXX object CMakeFiles/mailio.dir/src/smtp.cpp.o
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/mime.cpp:30:
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:176:5: warning: 'header_codec_' is deprecated [-Wdeprecated-declarations]
mime(const mime&) = default;
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator.h:154:28: note: in defaulted copy constructor for 'mailio::mime' first required here
::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:290:13: note: in instantiation of function template specialization 'std::allocator<mailio::mime>::construct<mailio::mime, const mailio::mime &>' requested here
__a.construct(__p, _VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<mailio::mime>>::construct<mailio::mime, const mailio::mime &, void>' requested here
__alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1660:9: note: in instantiation of function template specialization 'std::vector<mailio::mime>::__construct_one_at_end<const mailio::mime &>' requested here
__construct_one_at_end(__x);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/mime.cpp:236:28: note: in instantiation of member function 'std::vector<mailio::mime>::push_back' requested here
parts_.push_back(m);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:872:7: note: 'header_codec_' has been explicitly marked deprecated here
[[deprecated]]
^
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/message.cpp:37:
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:604:25: warning: 'mailio::message::format_header' hides overloaded virtual function [-Woverloaded-virtual]
virtual std::string format_header(bool add_bcc_header) const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:653:25: note: hidden overloaded virtual function 'mailio::mime::format_header' declared here: different number of parameters (0 vs 1)
virtual std::string format_header() const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:176:5: warning: 'header_codec_' is deprecated [-Wdeprecated-declarations]
mime(const mime&) = default;
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator.h:154:28: note: in defaulted copy constructor for 'mailio::mime' first required here
::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:290:13: note: in instantiation of function template specialization 'std::allocator<mailio::mime>::construct<mailio::mime, const mailio::mime &>' requested here
__a.construct(__p, _VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:948:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<mailio::mime>>::construct<mailio::mime, const mailio::mime &, void>' requested here
__alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/vector:1660:9: note: in instantiation of function template specialization 'std::vector<mailio::mime>::__construct_one_at_end<const mailio::mime &>' requested here
__construct_one_at_end(__x);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/message.cpp:451:12: note: in instantiation of member function 'std::vector<mailio::mime>::push_back' requested here
parts_.push_back(m);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:872:7: note: 'header_codec_' has been explicitly marked deprecated here
[[deprecated]]
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/dialog.cpp:138:31: warning: unused variable 'ignored_ec' [-Wunused-variable]
boost::system::error_code ignored_ec;
^
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/imap.cpp:27:
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/imap.hpp:35:
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:604:25: warning: 'mailio::message::format_header' hides overloaded virtual function [-Woverloaded-virtual]
virtual std::string format_header(bool add_bcc_header) const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:653:25: note: hidden overloaded virtual function 'mailio::mime::format_header' declared here: different number of parameters (0 vs 1)
virtual std::string format_header() const;
^
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/pop3.cpp:22:
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/pop3.hpp:31:
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:604:25: warning: 'mailio::message::format_header' hides overloaded virtual function [-Woverloaded-virtual]
virtual std::string format_header(bool add_bcc_header) const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:653:25: note: hidden overloaded virtual function 'mailio::mime::format_header' declared here: different number of parameters (0 vs 1)
virtual std::string format_header() const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:196:37: warning: 'header_codec_' is deprecated [-Wdeprecated-declarations]
mime& operator=(mime&&) = default;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:110:43: note: in defaulted move assignment operator for 'mailio::mime' first required here
message& operator=(message&&) = default;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/imap.cpp:353:9: note: in defaulted move assignment operator for 'mailio::message' first required here
msg = std::move(found_messages.begin()->second);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:872:7: note: 'header_codec_' has been explicitly marked deprecated here
[[deprecated]]
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:196:37: warning: 'header_codec_' is deprecated [-Wdeprecated-declarations]
mime& operator=(mime&&) = default;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:872:7: note: 'header_codec_' has been explicitly marked deprecated here
[[deprecated]]
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:181:5: warning: 'header_codec_' is deprecated [-Wdeprecated-declarations]
mime(mime&&) = default;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:93:5: note: in defaulted move constructor for 'mailio::mime' first required here
message(message&&) = default;
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__utility/pair.h:192:45: note: in defaulted move constructor for 'mailio::message' first required here
: first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator.h:154:28: note: in instantiation of function template specialization 'std::pair<const unsigned long, mailio::message>::pair<const unsigned long &, mailio::message, false>' requested here
::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/allocator_traits.h:290:13: note: in instantiation of function template specialization 'std::allocator<std::__tree_node<std::__value_type<unsigned long, mailio::message>, void *>>::construct<std::pair<const unsigned long, mailio::message>, const unsigned long &, mailio::message>' requested here
__a.construct(__p, _VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__tree:2136:20: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<std::__tree_node<std::__value_type<unsigned long, mailio::message>, void *>>>::construct<std::pair<const unsigned long, mailio::message>, const unsigned long &, mailio::message, void>' requested here
__node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__tree:2098:29: note: in instantiation of function template specialization 'std::__tree<std::__value_type<unsigned long, mailio::message>, std::__map_value_compare<unsigned long, std::__value_type<unsigned long, mailio::message>, std::less<unsigned long>, true>, std::allocator<std::__value_type<unsigned long, mailio::message>>>::__construct_node<const unsigned long &, mailio::message>' requested here
__node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__tree:1174:16: note: in instantiation of function template specialization 'std::__tree<std::__value_type<unsigned long, mailio::message>, std::__map_value_compare<unsigned long, std::__value_type<unsigned long, mailio::message>, std::less<unsigned long>, true>, std::allocator<std::__value_type<unsigned long, mailio::message>>>::__emplace_unique_key_args<unsigned long, const unsigned long &, mailio::message>' requested here
return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
^
/Users/abril/Downloads/Xcode_13.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/map:1175:24: note: in instantiation of function template specialization 'std::__tree<std::__value_type<unsigned long, mailio::message>, std::__map_value_compare<unsigned long, std::__value_type<unsigned long, mailio::message>, std::less<unsigned long>, true>, std::allocator<std::__value_type<unsigned long, mailio::message>>>::__emplace_unique<const unsigned long &, mailio::message>' requested here
return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/imap.cpp:460:40: note: in instantiation of function template specialization 'std::map<unsigned long, mailio::message>::emplace<const unsigned long &, mailio::message>' requested here
found_messages.emplace(ms.first, move(msg));
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:872:7: note: 'header_codec_' has been explicitly marked deprecated here
[[deprecated]]
^
1 warning generated.
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/src/smtp.cpp:21:
In file included from /Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/smtp.hpp:29:
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/message.hpp:604:25: warning: 'mailio::message::format_header' hides overloaded virtual function [-Woverloaded-virtual]
virtual std::string format_header(bool add_bcc_header) const;
^
/Users/abril/.conan2/p/b/maili79ef1286181f4/b/src/include/mailio/mime.hpp:653:25: note: hidden overloaded virtual function 'mailio::mime::format_header' declared here: different number of parameters (0 vs 1)
virtual std::string format_header() const;
^
1 warning generated.
1 warning generated.
4 warnings generated.
1 warning generated.
2 warnings generated.
[100%] Linking CXX static library libmailio.a
[100%] Built target mailio
mailio/0.24.0: Package 'c40cb075df06ce0314b27ccbb1d7b18950ef51f9' built
mailio/0.24.0: Build folder /Users/abril/.conan2/p/b/maili79ef1286181f4/b/build/Release
mailio/0.24.0: Generating the package
mailio/0.24.0: Packaging in folder /Users/abril/.conan2/p/b/maili79ef1286181f4/p
mailio/0.24.0: Calling package()
mailio/0.24.0: Running CMake.install()
mailio/0.24.0: RUN: cmake --install "/Users/abril/.conan2/p/b/maili79ef1286181f4/b/build/Release" --prefix "/Users/abril/.conan2/p/b/maili79ef1286181f4/p"
... successful installation ...
Note that this also works with and without the patch for newer versions of apple-clang (As well as any other compiler we compile for in Conan Center) - the include in those compilers is transitive from other std headers
I'll be happy to open a PR if the proposed diff looks good to you, thanks!
The text was updated successfully, but these errors were encountered:
Hi!
While reviewing conan-io/conan-center-index#25955 which adds the latest version to Conan Center Index, we found that we were unable to compile this for
apple-clang < 14
, seemingly due to a missing vector include inpercent.hpp
(Logs here if needed)In fact, if I apply this patch
and try to compile locally, now the compilation is succesful (Some Conan logs are interwined, but the CMake results are the same if calling
cmake
directly)Note that this also works with and without the patch for newer versions of
apple-clang
(As well as any other compiler we compile for in Conan Center) - the include in those compilers is transitive from other std headersI'll be happy to open a PR if the proposed diff looks good to you, thanks!
The text was updated successfully, but these errors were encountered: