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

Build error on MacOS 12.2 and Clang 13.1 #361

Open
2 of 8 tasks
denniskb opened this issue Jul 5, 2023 · 2 comments
Open
2 of 8 tasks

Build error on MacOS 12.2 and Clang 13.1 #361

denniskb opened this issue Jul 5, 2023 · 2 comments

Comments

@denniskb
Copy link

denniskb commented Jul 5, 2023

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

matplot++ v1.2.0 fails to build out of the box on MacOS 12.2.1 / Clang 13.1.6.

Steps to Reproduce

git clone ...
cd marplotplusplus
git checkout v1.2.0
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Output

...
[ 23%] Built target nodesoup
[ 25%] Building CXX object 3rdparty/matplot/source/matplot/CMakeFiles/matplot.dir/core/line_spec.cpp.o
/Users/dbautembach/kraken/3rdparty/matplot/source/matplot/core/line_spec.cpp:76:32: error: no viable overloaded '='
                custom_marker_ = u8"▶";
                ~~~~~~~~~~~~~~ ^ ~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:905:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::string' for 1st argument
    basic_string& operator=(const basic_string& __str);
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:908:19: note: candidate template ignored: substitution failure [with _Tp = char8_t [4]]: no member named '_EnableIfImpl' in 'std::_MetaBase<false>'
    basic_string& operator=(const _Tp& __t)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:913:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::string' for 1st argument
    basic_string& operator=(basic_string&& __str)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:916:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'initializer_list<std::basic_string<char>::value_type>' (aka 'initializer_list<char>') for 1st argument
    basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:918:45: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::basic_string<char>::value_type *' (aka 'const char *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const value_type* __s) {return assign(__s);}
                                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:922:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::basic_string<char>::value_type' (aka 'char') for 1st argument
    basic_string& operator=(value_type __c);
                  ^
/Users/dbautembach/kraken/3rdparty/matplot/source/matplot/core/line_spec.cpp:80:32: error: no viable overloaded '='
                custom_marker_ = u8"◀";
                ~~~~~~~~~~~~~~ ^ ~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:905:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::string' for 1st argument
    basic_string& operator=(const basic_string& __str);
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:908:19: note: candidate template ignored: substitution failure [with _Tp = char8_t [4]]: no member named '_EnableIfImpl' in 'std::_MetaBase<false>'
    basic_string& operator=(const _Tp& __t)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:913:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::string' for 1st argument
    basic_string& operator=(basic_string&& __str)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:916:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'initializer_list<std::basic_string<char>::value_type>' (aka 'initializer_list<char>') for 1st argument
    basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:918:45: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::basic_string<char>::value_type *' (aka 'const char *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const value_type* __s) {return assign(__s);}
                                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:922:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::basic_string<char>::value_type' (aka 'char') for 1st argument
    basic_string& operator=(value_type __c);
                  ^
/Users/dbautembach/kraken/3rdparty/matplot/source/matplot/core/line_spec.cpp:392:28: error: no viable overloaded '='
            custom_marker_ = u8"▶";
            ~~~~~~~~~~~~~~ ^ ~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:905:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::string' for 1st argument
    basic_string& operator=(const basic_string& __str);
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:908:19: note: candidate template ignored: substitution failure [with _Tp = char8_t [4]]: no member named '_EnableIfImpl' in 'std::_MetaBase<false>'
    basic_string& operator=(const _Tp& __t)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:913:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::string' for 1st argument
    basic_string& operator=(basic_string&& __str)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:916:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'initializer_list<std::basic_string<char>::value_type>' (aka 'initializer_list<char>') for 1st argument
    basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:918:45: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::basic_string<char>::value_type *' (aka 'const char *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const value_type* __s) {return assign(__s);}
                                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:922:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::basic_string<char>::value_type' (aka 'char') for 1st argument
    basic_string& operator=(value_type __c);
                  ^
/Users/dbautembach/kraken/3rdparty/matplot/source/matplot/core/line_spec.cpp:396:28: error: no viable overloaded '='
            custom_marker_ = u8"◀";
            ~~~~~~~~~~~~~~ ^ ~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:905:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::string' for 1st argument
    basic_string& operator=(const basic_string& __str);
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:908:19: note: candidate template ignored: substitution failure [with _Tp = char8_t [4]]: no member named '_EnableIfImpl' in 'std::_MetaBase<false>'
    basic_string& operator=(const _Tp& __t)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:913:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::string' for 1st argument
    basic_string& operator=(basic_string&& __str)
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:916:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'initializer_list<std::basic_string<char>::value_type>' (aka 'initializer_list<char>') for 1st argument
    basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:918:45: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'const std::basic_string<char>::value_type *' (aka 'const char *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const value_type* __s) {return assign(__s);}
                                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:922:19: note: candidate function not viable: no known conversion from 'const char8_t [4]' to 'std::basic_string<char>::value_type' (aka 'char') for 1st argument
    basic_string& operator=(value_type __c);
                  ^
4 errors generated.
make[2]: *** [3rdparty/matplot/source/matplot/CMakeFiles/matplot.dir/core/line_spec.cpp.o] Error 1
make[1]: *** [3rdparty/matplot/source/matplot/CMakeFiles/matplot.dir/all] Error 2
make: *** [all] Error 2

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: MacOS
  • OS Version: 12.2.1
  • Compiler: Clang
  • Compiler version: 13.1.6

Additional context

@denniskb
Copy link
Author

denniskb commented Jul 5, 2023

Adding set_target_properties(matplot PROPERTIES CXX_STANDARD 17) resolved the error.

@alandefreitas
Copy link
Owner

alandefreitas commented Jul 5, 2023

You can try git checkout master to check if the error is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants