Open x37v opened 2 years ago
arf, can you try going into src/ossia/detail/ssize.hpp and replacing __MAC_OS_X_VERSION_MIN_REQUIRED >= 113000
by e.g. 114000? Or even just #ifdefing the whole thing to make sure that it builds this way
incrementing to 114000
solved the ssize
failure, still failing on FullMatch
hmmm checking into re2's code it seems that there is an overload which depends on __cpp_lib_string_view
being defined. wild that xcode 11.3 didn't yet provides it even though it provided the type... trying to think of a fix
I'm wondering: what does it give if you try to run CMake with -DCMAKE_CXX_FLAGS="-D__cpp_lib_string_view=201803L"
to try to force things a bit ? Maybe they didn't define the flag at the time because not all member functions were implemented but with some luck we aren't using them.... the only reference to __cpp_lib_string_view I could find in ossia's source tree is in re2
nevermind, there's an overload that takes (const char* data, size_t size) ; i'll just change the code to use that
can you try at current git master?
I just tried to compile it on my machine and have the same problem: with current master [514c7f5bf] and follwoing these instructions: https://github.com/ossia/libossia/wiki/Building#building-the-max-implementation-on-macos
[ 27%] Building CXX object src/CMakeFiles/ossia.dir/ossia/network/base/name_validation.cpp.o
/Users/maybites/Arbeiten/02_code/library/ossia/libossia/src/ossia/network/base/name_validation.cpp:25:22: error:
call to 'ssize' is ambiguous
for(int i = 0; i < std::ssize(ret); i++)
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:1955:16: note:
candidate function [with _Cont = std::__1::basic_string<char>]
constexpr auto ssize(const _Cont& __c)
^
/Users/maybites/Arbeiten/02_code/library/ossia/libossia/src/ossia/detail/ssize.hpp:19:23: note:
candidate function [with T = std::__1::basic_string<char>]
static constexpr auto ssize(const T& t) noexcept
^
/Users/maybites/Arbeiten/02_code/library/ossia/libossia/src/ossia/network/base/name_validation.cpp:39:22: error:
call to 'ssize' is ambiguous
for(int i = 0; i < std::ssize(ret); i++)
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:1955:16: note:
candidate function [with _Cont = std::__1::basic_string<char>]
constexpr auto ssize(const _Cont& __c)
^
/Users/maybites/Arbeiten/02_code/library/ossia/libossia/src/ossia/detail/ssize.hpp:19:23: note:
candidate function [with T = std::__1::basic_string<char>]
static constexpr auto ssize(const T& t) noexcept
^
[ 28%] Building CXX object src/CMakeFiles/ossia.dir/ossia/network/base/node.cpp.o
[ 29%] Building CXX object src/CMakeFiles/ossia.dir/ossia/network/base/node_functions.cpp.o
2 errors generated.
make[2]: *** [src/CMakeFiles/ossia.dir/ossia/network/base/name_validation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/ossia.dir/all] Error 2
make: *** [all] Error 2
agh, and can you tell me which version of Xcode you are using ?
Version 12.4 (12D4e)
hmmm... I wonder if it's still the same with a clean build? It looks like it could be using an old Xcode SDK maybe? Can you send me the CMakeCache.txt at the root of the build folder?
okay, it's Xcode 12 but with the macosx 11.1 sdk:
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
can you try to run
cmake . -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
to set it to the last version ? if I'm not mistaken that's the right path but cannot check on my mac right now
I cleaned the 'build-max' folder and executed
cmake ../libossia -DOSSIA_EXAMPLES=1 -DOSSIA_TESTING=1 -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
which was running without issues
but my error reported above when executing 'make' still persists.
hmmm... can you send me the new CMakeCache.txt from this build ? I wonder if there isn't some package which tries to force-use the MacOSXA.B.sdk somewhere
.. at worst, can you try to move it somewhere else temporarily and do a clean build ?
I just did a clean clone and build, same error.
okay, I can see still the line in the CMakeCacke.txt:
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
so there seems to be something in either our cmake code or a third party dep, that forces to it when it is detected. I will try to simulate on my mac by adding the SDK manually and seeing where things go wrong.
In the meantime:
could you make a clean build folder and run:
1/ the command
cmake /* usual cmake build commands */ --trace > trace.log
// send me trace.log
// clear the build dir
cmake /* usual cmake build commands */ --trace-expand > trace-expand.log
// send me trace-expand.log
this way I can see exactly where the issue happens in your machine in case I cannot reproduce on mine. thanks, sorry for all the steps... debugging build issues on mac are always a pain ahha
oops... had a typo in my message sorry. It's 2>
not >
. But even in the log you showed it talks about DNSSD - i'll investigate around this part first so don't worry about runnign the commands again
libossia:
8fee847c5e809dcc91f1f79c93eea4069a056be4
i'm on osx 10.15.7 with xcode 11.7. seems like I should be good according to https://github.com/OSSIA/libossia/wiki/Building#building-libossia-and-tests-on-macos-on-the-command-lineI have a branch that builds: https://github.com/ossia/libossia/compare/master...Cycling74:libossia:xnor/master-build Though some tests fail, i'm not sure if those tests failed before or not. There was also a note
Note : if this is changed, also change the Qt version in js_utilities.cpp
but I didn't find/change the appropriate thing to change.