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

Support on macOS (via Homebrew) #29

Open
mavam opened this issue Jan 13, 2022 · 24 comments
Open

Support on macOS (via Homebrew) #29

mavam opened this issue Jan 13, 2022 · 24 comments

Comments

@mavam
Copy link

mavam commented Jan 13, 2022

Great project! It would be really nice if we had support on macOS via Homebrew, allowing users to install Diagon via brew install diagon.

Is there anything that would prevent a build on OSX in principle? I tried to build it on OSX Big Sur 11.6 with Apple Clang 13, but no success with a first shot:

5/12] Building CXX object CMakeFiles/input_output_test.dir/src/input_output_test.cpp.o
FAILED: CMakeFiles/input_output_test.dir/src/input_output_test.cpp.o
ccache /usr/local/opt/llvm/bin/clang++  -I/tmp/Diagon/build/src -I/tmp/Diagon/src -isystem /usr/local/opt/llvm/include/c++/v1 -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wall -Wno-sign-compare -Wno-attributes -std=gnu++17 -MD -MT CMakeFiles/input_output_test.dir/src/input_output_test.cpp.o -MF CMakeFiles/input_output_test.dir/src/input_output_test.cpp.o.d -o CMakeFiles/input_output_test.dir/src/input_output_test.cpp.o -c /tmp/Diagon/src/input_output_test.cpp
/tmp/Diagon/src/input_output_test.cpp:67:34: error: invalid operands to binary expression ('basic_ostream<char, std::char_traits<char>>' and 'const std::filesystem::directory_entry')
        std::cout << "  [PASS] " << test << std::endl;
        ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
/usr/local/opt/llvm/include/c++/v1/cstddef:141:3: note: candidate function template not viable: no known conversion from 'basic_ostream<char, std::char_traits<char>>' to 'std::byte' for 1st argument
  operator<< (byte  __lhs, _Integer __shift) noexcept
  ^
/usr/local/opt/llvm/include/c++/v1/ostream:748:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/usr/local/opt/llvm/include/c++/v1/ostream:781:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:788:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'signed char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:795:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:809:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const char *' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/usr/local/opt/llvm/include/c++/v1/ostream:855:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:862:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const signed char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:870:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const unsigned char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1055:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const std::error_code' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
/usr/local/opt/llvm/include/c++/v1/ostream:741:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'std::filesystem::directory_entry')
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/usr/local/opt/llvm/include/c++/v1/__random/uniform_int_distribution.h:282:1: note: candidate template ignored: could not match 'uniform_int_distribution<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:802:1: note: candidate template ignored: could not match 'const _CharT *' against 'std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1038:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:1046:1: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:1063:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1082:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1030:11: note: candidate template ignored: requirement 'integral_constant<bool, false>::value' was not satisfied [with _Stream = std::ostream &, _Tp = std::filesystem::directory_entry]
_Stream&& operator<<(_Stream&& __os, const _Tp& __x)
          ^
/usr/local/opt/llvm/include/c++/v1/ostream:1075:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-2, type-parameter-0-3>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:362:1: note: candidate template ignored: could not match '__iom_t8<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:482:1: note: candidate template ignored: could not match '__iom_t10<type-parameter-0-0>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:572:33: note: candidate template ignored: could not match '__quoted_output_proxy<type-parameter-0-0, type-parameter-0-2, type-parameter-0-1>' against 'const std::filesystem::directory_entry'
basic_ostream<_CharT, _Traits>& operator<<(
                                ^
/usr/local/opt/llvm/include/c++/v1/iomanip:592:33: note: candidate template ignored: could not match '__quoted_proxy<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::filesystem::directory_entry'
basic_ostream<_CharT, _Traits>& operator<<(
                                ^
/usr/local/opt/llvm/include/c++/v1/ostream:188:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::ostream &(*)(std::ostream &)' for 1st argument
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:192:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'basic_ios<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> &(*)(basic_ios<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> &)' (aka 'basic_ios<char, std::char_traits<char>> &(*)(basic_ios<char, std::char_traits<char>> &)') for 1st argument
    basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:197:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::ios_base &(*)(std::ios_base &)' for 1st argument
    basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:200:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'bool' for 1st argument
    basic_ostream& operator<<(bool __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:201:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'short' for 1st argument
    basic_ostream& operator<<(short __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:202:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned short' for 1st argument
    basic_ostream& operator<<(unsigned short __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:203:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'int' for 1st argument
    basic_ostream& operator<<(int __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:204:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned int' for 1st argument
    basic_ostream& operator<<(unsigned int __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:205:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long' for 1st argument
    basic_ostream& operator<<(long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:206:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned long' for 1st argument
    basic_ostream& operator<<(unsigned long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long long' for 1st argument
    basic_ostream& operator<<(long long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned long long' for 1st argument
    basic_ostream& operator<<(unsigned long long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:209:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'float' for 1st argument
    basic_ostream& operator<<(float __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:210:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'double' for 1st argument
    basic_ostream& operator<<(double __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:211:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long double' for 1st argument
    basic_ostream& operator<<(long double __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:212:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:213:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'basic_streambuf<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> *' (aka 'basic_streambuf<char, std::char_traits<char>> *') for 1st argument
    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:216:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    basic_ostream& operator<<(nullptr_t)
                   ^
/tmp/Diagon/src/input_output_test.cpp:69:34: error: invalid operands to binary expression ('basic_ostream<char, std::char_traits<char>>' and 'const std::filesystem::directory_entry')
        std::cout << "  [FAIL] " << test << std::endl;
        ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
/usr/local/opt/llvm/include/c++/v1/cstddef:141:3: note: candidate function template not viable: no known conversion from 'basic_ostream<char, std::char_traits<char>>' to 'std::byte' for 1st argument
  operator<< (byte  __lhs, _Integer __shift) noexcept
  ^
/usr/local/opt/llvm/include/c++/v1/ostream:748:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/usr/local/opt/llvm/include/c++/v1/ostream:781:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:788:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'signed char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:795:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/usr/local/opt/llvm/include/c++/v1/ostream:809:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const char *' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/usr/local/opt/llvm/include/c++/v1/ostream:855:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:862:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const signed char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:870:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const unsigned char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1055:1: note: candidate function template not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const std::error_code' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
/usr/local/opt/llvm/include/c++/v1/ostream:741:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'std::filesystem::directory_entry')
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/usr/local/opt/llvm/include/c++/v1/__random/uniform_int_distribution.h:282:1: note: candidate template ignored: could not match 'uniform_int_distribution<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:802:1: note: candidate template ignored: could not match 'const _CharT *' against 'std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1038:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:1046:1: note: candidate template ignored: could not match 'basic_string_view<type-parameter-0-0, type-parameter-0-1>' against 'std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/local/opt/llvm/include/c++/v1/ostream:1063:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1082:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
/usr/local/opt/llvm/include/c++/v1/ostream:1030:11: note: candidate template ignored: requirement 'integral_constant<bool, false>::value' was not satisfied [with _Stream = std::ostream &, _Tp = std::filesystem::directory_entry]
_Stream&& operator<<(_Stream&& __os, const _Tp& __x)
          ^
/usr/local/opt/llvm/include/c++/v1/ostream:1075:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-2, type-parameter-0-3>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:362:1: note: candidate template ignored: could not match '__iom_t8<type-parameter-0-2>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:482:1: note: candidate template ignored: could not match '__iom_t10<type-parameter-0-0>' against 'const std::filesystem::directory_entry'
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
^
/usr/local/opt/llvm/include/c++/v1/iomanip:572:33: note: candidate template ignored: could not match '__quoted_output_proxy<type-parameter-0-0, type-parameter-0-2, type-parameter-0-1>' against 'const std::filesystem::directory_entry'
basic_ostream<_CharT, _Traits>& operator<<(
                                ^
/usr/local/opt/llvm/include/c++/v1/iomanip:592:33: note: candidate template ignored: could not match '__quoted_proxy<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const std::filesystem::directory_entry'
basic_ostream<_CharT, _Traits>& operator<<(
                                ^
/usr/local/opt/llvm/include/c++/v1/ostream:188:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::ostream &(*)(std::ostream &)' for 1st argument
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:192:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'basic_ios<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> &(*)(basic_ios<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> &)' (aka 'basic_ios<char, std::char_traits<char>> &(*)(basic_ios<char, std::char_traits<char>> &)') for 1st argument
    basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:197:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::ios_base &(*)(std::ios_base &)' for 1st argument
    basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:200:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'bool' for 1st argument
    basic_ostream& operator<<(bool __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:201:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'short' for 1st argument
    basic_ostream& operator<<(short __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:202:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned short' for 1st argument
    basic_ostream& operator<<(unsigned short __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:203:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'int' for 1st argument
    basic_ostream& operator<<(int __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:204:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned int' for 1st argument
    basic_ostream& operator<<(unsigned int __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:205:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long' for 1st argument
    basic_ostream& operator<<(long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:206:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned long' for 1st argument
    basic_ostream& operator<<(unsigned long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long long' for 1st argument
    basic_ostream& operator<<(long long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'unsigned long long' for 1st argument
    basic_ostream& operator<<(unsigned long long __n);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:209:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'float' for 1st argument
    basic_ostream& operator<<(float __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:210:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'double' for 1st argument
    basic_ostream& operator<<(double __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:211:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'long double' for 1st argument
    basic_ostream& operator<<(long double __f);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:212:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:213:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'basic_streambuf<std::basic_ostream<char>::char_type, std::basic_ostream<char>::traits_type> *' (aka 'basic_streambuf<char, std::char_traits<char>> *') for 1st argument
    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                   ^
/usr/local/opt/llvm/include/c++/v1/ostream:216:20: note: candidate function not viable: no known conversion from 'const std::filesystem::directory_entry' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    basic_ostream& operator<<(nullptr_t)
                   ^
2 errors generated.
[6/12] Building CXX object src/translator/graph_planar/CMakeFiles/translator_graph_planar.dir/GraphPlanar.cpp.o
FAILED: src/translator/graph_planar/CMakeFiles/translator_graph_planar.dir/GraphPlanar.cpp.o
ccache /usr/local/opt/llvm/bin/clang++  -I/tmp/Diagon/build/src -I/tmp/Diagon/src -I/tmp/Diagon/build/_deps/antlr-src/runtime/Cpp/runtime/src -isystem /usr/local/opt/llvm/include/c++/v1 -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -Wno-attributes -Wall -Wno-sign-compare -std=gnu++17 -MD -MT src/translator/graph_planar/CMakeFiles/translator_graph_planar.dir/GraphPlanar.cpp.o -MF src/translator/graph_planar/CMakeFiles/translator_graph_planar.dir/GraphPlanar.cpp.o.d -o src/translator/graph_planar/CMakeFiles/translator_graph_planar.dir/GraphPlanar.cpp.o -c /tmp/Diagon/src/translator/graph_planar/GraphPlanar.cpp
/tmp/Diagon/src/translator/graph_planar/GraphPlanar.cpp:18:10: fatal error: 'boost/graph/adjacency_list.hpp' file not found
#include <boost/graph/adjacency_list.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build
@ArthurSonzogni
Copy link
Owner

Thanks!

The first error is probably fixable by replacing the line with:

        std::cout << "  [PASS] " << test.path() << std::endl;

The second error is about a missing boost library.

I don't have a MacOS OS, but I tried to build it using github action here:
https://github.com/ArthurSonzogni/Diagon/runs/4610501448?check_suite_focus=true
Same errors.

If you want, you can try to make it work, and let me know if you managed to do it.
Here is the github action:

#- name: "MacOS clang"
#os: macos-latest
#cc: clang
#cxx: clang++
#test: true
#cmake: cmake

The part installing boost on MacOS

- name: "Install boost for macOS"
if: runner.os == 'macOS'
run: brew install boost

@mavam
Copy link
Author

mavam commented Jan 14, 2022

The first error is probably fixable by replacing the line with

Yes, I just checked that.

The reason why Boost is not found is because Diagon doesn't use find_package in the CMakeLists.txt to properly setup the dependencies. If that'd be there, CMake would find my existing Boost installation in /usr/local. Fixing this would probably get us macOS support for free.

@ArthurSonzogni
Copy link
Owner

Indeed!

If you want to give it a try on MacOS, I would merge the PR.
Otherwise, I will try myself this week end.

@DameonSmith
Copy link

Any update on this? I tried fixing it to use test.path() but then got this error. Not a C++ dev so I'm a little stuck.

Consolidate compiler generated dependencies of target input_output_test
[100%] Linking CXX executable diagon
[100%] Linking CXX executable input_output_test
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
ld: library not found for -lc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [diagon-1.0.127] Error 1
make[1]: *** [CMakeFiles/diagon.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: library not found for -lc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [input_output_test-1.0.127] Error 1
make[1]: *** [CMakeFiles/input_output_test.dir/all] Error 2
make: *** [all] Error 2

@ArthurSonzogni
Copy link
Owner

I recently merged @iwahbe PR
#42

This fixes the test.path() among other.

@PythonicNinja
Copy link
Contributor

Seems there has been some progress 🎉

Were you able to successfully build it for macOS?

@iwahbe
Copy link
Contributor

iwahbe commented Sep 16, 2022

My PR was brittle to upgrades in GCC version. See comments
#42 (comment)
and
#42 (comment)

That should do it.

@celie56
Copy link

celie56 commented Nov 14, 2022

I was unable to build with the latest code and saw a link error due to stdc++fs.
Removing this from the link targets allowed me to build on a mac m1.
My changes are here: #48

@ArthurSonzogni
Copy link
Owner

Update:

I am now able to build on the CI on Linux, Windows, Mac, WebAssembly:
https://github.com/ArthurSonzogni/Diagon/actions/runs/3509142920

I still need to tweak it a bit, so that I can extract the binaries produced from Mac and Windows.

@ArthurSonzogni
Copy link
Owner

It's done:
https://github.com/ArthurSonzogni/Diagon/releases/tag/v1.0.139

In the release, there are 3 assets for MacOS:

I don't have a Mac. Could someone try one of them to confirm this is working on Mac?

What are the next step to publish it to homebrew?

@celie56
Copy link

celie56 commented Nov 27, 2022

Running the binary does not work on my system. Building from source for v1.0.139 does work. So good job there.

Here is what I saw when running the binary.

$ sw_vers                              
ProductName:	macOS
ProductVersion:	12.4
BuildVersion:	21F79
$ shasum -a 1 diagon-1.0.139-Darwin.zip
af623cb2f90872d135510c42907ab72111a34897  diagon-1.0.139-Darwin.zip
$ unzip diagon-1.0.139-Darwin.zip
Archive:  diagon-1.0.139-Darwin.zip
   creating: diagon-1.0.139-Darwin/bin/
  inflating: diagon-1.0.139-Darwin/bin/diagon-1.0.139  
    linking: diagon-1.0.139-Darwin/bin/diagon  -> diagon-1.0.139 
finishing deferred symbolic links:
$ xattr -d com.apple.quarantine ./diagon-1.0.139-Darwin/bin/diagon
$ ls /opt/homebrew/opt/boost/lib | grep graph
libboost_graph.dylib
libboost_graph-mt.dylib
libboost_graph-mt.a
libboost_graph.a
$ echo "a -> b: c" | ./diagon-1.0.139-Darwin/bin/diagon Sequence
dyld[86982]: Library not loaded: /usr/local/opt/boost/lib/libboost_graph-mt.dylib
  Referenced from: /Users/chriselie/Downloads/diagon-1.0.139-Darwin/bin/diagon-1.0.139
  Reason: tried: '/usr/local/opt/libboost_graph-mt.dylib' (no such file), '/usr/local/opt/boost/lib/libboost_graph-mt.dylib' (no such file), '/usr/local/lib/libboost_graph-mt.dylib' (no such file), '/usr/lib/libboost_graph-mt.dylib' (no such file)
[1]    86981 done       echo "a -> b: c" | 
       86982 abort      ./diagon-1.0.139-Darwin/bin/diagon Sequence

It could be a problem with my setup, but I have boost installed via homebrew and it seems to work fine when building from source 🤷

@RobertAudi
Copy link

One problem I see straight away is that homebrew now installs everything under /opt/homebrew and the boost prefix is /opt/homebrew/opt/boost not /usr/local/opt/boost.

@ArthurSonzogni
Copy link
Owner

Thanks @RobertAudi & @celie56

I tried to link against boost statically. Unfortunately, there was a bug in Boost for MacOS:
Homebrew/homebrew-core#67427

Instead, I removed the "GraphPlanar" translator from MacOS for the moment.

Does it fix the problem?

New builds:

@celie56
Copy link

celie56 commented Dec 4, 2022

Those links appear to be broken.

$ wget https://github.com/ArthurSonzogni/Diagon/releases/download/untagged-0910bf0242436e9ed24c/diagon-1.0.139-Darwin.zip
--2022-12-04 16:15:52--  https://github.com/ArthurSonzogni/Diagon/releases/download/untagged-0910bf0242436e9ed24c/diagon-1.0.139-Darwin.zip
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-12-04 16:15:52 ERROR 404: Not Found.

@ArthurSonzogni
Copy link
Owner

I removed the previous draft prerelease. It is no more available. However the last links should be working.

@RobertAudi
Copy link

@ArthurSonzogni The links to the builds you linked in your previous comment are no longer available, or at least I get a 404 😕

@ArthurSonzogni
Copy link
Owner

Okay. It looks like I need to publish the release to make the link to work.

This is now fixed @RobertAudi and @celie56. See the links from:
https://github.com/ArthurSonzogni/Diagon/releases/tag/v1.0.139

@RobertAudi
Copy link

@ArthurSonzogni The new binary seems to work perfectly on my M1 🎉

@celie56
Copy link

celie56 commented Dec 6, 2022

Yep. Works on my machine too 👍
Thanks for the fix.

@ArthurSonzogni
Copy link
Owner

Awesome! Thanks for checking!

@mavam
Copy link
Author

mavam commented Dec 23, 2022

Double-confirming: same here! 🙌

I think the final swoop would be getting this now into Homebrew, which means writing a PR for https://github.com/Homebrew/homebrew-core.

@realshovanshah
Copy link

Looks like it's been a while so I'd also like to lend my upvote to the imminent homebrew support.

@fakkoweb
Copy link

fakkoweb commented Dec 4, 2023

Excuse everyone: how do I run it on Mac (M1) from the .dmg? All I get is something in bin classified as "document" so cannot really run it.

@realshovanshah
Copy link

realshovanshah commented Dec 7, 2023

Hey @fakkoweb! I'd guess everyone just copied the executable from the mounted directory to the desired location (and ejecting it, ofc) — /usr/local/bin works well for me.

image

Do you see no binary in the mounted dir?

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

9 participants