ArthurSonzogni / Diagon

Interactive ASCII art diagram generators. :star2:
https://arthursonzogni.com/Diagon/
MIT License
1.47k stars 56 forks source link

Support on macOS (via Homebrew) #29

Open mavam opened 2 years ago

mavam commented 2 years ago

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 commented 2 years ago

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: https://github.com/ArthurSonzogni/Diagon/blob/0d4a89e5139226d3f619b8d1a5d75632f3045f82/.github/workflows/continuous-integration.yaml#L41-L46

The part installing boost on MacOS https://github.com/ArthurSonzogni/Diagon/blob/0d4a89e5139226d3f619b8d1a5d75632f3045f82/.github/workflows/continuous-integration.yaml#L77-L79

mavam commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

I recently merged @iwahbe PR https://github.com/ArthurSonzogni/Diagon/pull/42

This fixes the test.path() among other.

PythonicNinja commented 1 year ago

Seems there has been some progress šŸŽ‰

Were you able to successfully build it for macOS?

iwahbe commented 1 year ago

My PR was brittle to upgrades in GCC version. See comments https://github.com/ArthurSonzogni/Diagon/pull/42#issuecomment-1227204706 and https://github.com/ArthurSonzogni/Diagon/pull/42#issuecomment-1227207944

That should do it.

celie56 commented 1 year ago

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: https://github.com/ArthurSonzogni/Diagon/pull/48

ArthurSonzogni commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Thanks @RobertAudi & @celie56

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

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

Does it fix the problem?

New builds:

celie56 commented 1 year ago

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 commented 1 year ago

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

RobertAudi commented 1 year ago

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

ArthurSonzogni commented 1 year ago

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 commented 1 year ago

@ArthurSonzogni The new binary seems to work perfectly on my M1 šŸŽ‰

celie56 commented 1 year ago

Yep. Works on my machine too šŸ‘ Thanks for the fix.

ArthurSonzogni commented 1 year ago

Awesome! Thanks for checking!

mavam commented 1 year ago

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 commented 7 months ago

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

fakkoweb commented 7 months ago

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 commented 6 months ago

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?