Closed kpstsp closed 2 years ago
I only have access to an ancient Mac that is stuck at an old version of MacOS, so I need to provide work-around for POSIX functionality that first appeared in version MacOS 10.12 and tried using examples found online for what the "correct" ifdef for this would be, which obviously didn't work.
Can you test for me:
In types.h and stuff/compat.c
Change:
# if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
into:
# if !defined(MAC_OS_X_VERSION_10_12)
And I will later test the same change on my old MacOS and check that it still works as expected there too.
I did changes. 'make' still failing.
PS: I also have Mojave for tests if need.
Could you attach Availability.h from your system to this bugreport?
Hmm, doing some more searches online, maybe the simple fix is to instead add
#include <AvailabilityVersions.h>
under
#include <Availability.h>
Hmm, doing some more searches online, maybe the simple fix is to instead add
#include <AvailabilityVersions.h>
under#include <Availability.h>
Works with both modifications: replacing if defined
and added #include <AvailabilityVersions.h>
make did some works and stop on next error
g++ -I/opt/local/include -fno-common -fPIC -Wall -I.././ -DVERSION=\"2.3.4-beta\" -Dstricmp=strcasecmp -Ilibbinio-git/src adplug-git/src/adl.cpp -o adplug_adl.o -c
adplug-git/src/adl.cpp:109:14: error: '(anonymous struct at adplug-git/src/adl.cpp:109:14)' cannot be defined in the
result type of a function
static const struct {
^
adplug-git/src/adl.cpp:111:3: error: functions that differ only in their return type cannot be overloaded
} nullptr;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__nullptr:48:24: note:
expanded from macro 'nullptr'
#define nullptr _VSTD::__get_nullptr_t()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__nullptr:46:62: note:
previous definition is here
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR nullptr_t __get_nullptr_t() {return nullptr_t(0);}
~~~~~~~~~ ^
2 errors generated.
make[1]: *** [adplug_adl.o] Error 1
make: *** [dirs] Error 2
I think the latest master should compile for you, (but probably throws a lot of warnings)
I tried latest master:head, got
error: typedef redefinition with different types
than I applied patch with changes in type.h and compat.c:
# if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
to ->> # if !defined(MAC_OS_X_VERSION_10_12)
(looks like it still not changed in repos) and 'make' finally done.
I got another problem with ld paths (mb problem with my configure options). But it already another case.
I thought that the original guard
# if !defined(MAC_OS_X_VERSION_10_12) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
worked after we added #include <AvailabilityVersions.h>
I added one more include file:
#include <AvailabilityMacros.h
Finally build done successful! Thanks
I try to build latest code from git on Mac OS X Catalina 10.15.7
0.2.9.6 from tar.gz fail with same errors