Installation of master fails on MacOS 13.0 with Arm64
Description
I am trying to build OpenVDS master
on an Arm64 Mac with the current MacOS release (Ventura), but it fails. Any input would be appreciated. I would also try to supply patches/merge requests where it makes sense.
I am using the following command to configure
cmake -S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_JAVA=OFF \
-DBUILD_PYTHON=ON \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTS=OFF \
-DBUILD_DOCS=OFF \
-DDISABLE_AWS_IOMANAGER=ON \
-DDISABLE_AZURESDKFORCPP_IOMANAGER=ON \
-DDISABLE_GCP_IOMANAGER=ON \
-DDISABLE_DMS_IOMANAGER=ON \
-DDISABLE_STRICT_WARNINGS=ON \
-DCMAKE_INSTALL_PREFIX="${INSTALLATION_DIR}" \
where INSTALLATION_DIR
points to /Users/aej/software/openvds-master-install-python
.
and the following command line for building OpenVDS
cmake --build "build" \
--config Release \
--target install \
-j 1 \
--verbose \
Expectation
OpenVDS is built and installed in the specified directory.
Actual behavior
The build fails. I found the following problems
-
If I delete a downloaded third-party dependency from the
3rdParty
directory, delete my build directory and then rerun the CMake configuration step the automatic fetching of the library fails. After a second deletion of the build directory and rerunning the CMake configuration step the third-party library seems to be fetched correctly. -
I get a problem due to the inclusion of
curl.h
bycpprestsdk
In file included from /Users/aej/software/compilescripts/openvds/openvds-3.1.0-src/src/OpenVDS/IO/IOManagerCurl.h:41: /Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/curl/curl.h:115:41: error: too few arguments provided to function-like macro invocation __has_declspec_attribute(dllimport))
This seems to be related to changed behavior of LLVM/clang and it appears with other projects and has been reported to cURL as well. It seems to be some interaction of cURL and casablanca. There are an issue and a pull request in the
cpprestsdk
repository for this, but they say that this will not be fixed sincecpprestsdk
is in maintenance mode.I can fix it by commenting out the
#define dllimport
, but I am not sure if that is the best thing to do.cpprestapi_file="${SOURCE_DIR}/3rdparty/cpprestapi-2.10.16/Release/include/cpprest/details/cpprest_compat.h" sed -i '' 's/\#define dllimport/\/\/\#define dllimport/' "${cpprestapi_file}" sed -i '' 's/\/\/\/\/\#define dllimport/\/\/\#define dllimport/' "${cpprestapi_file}"
As the
cpprestsdk
project is marked as being in maintenance mode so maybe it is necessary to move to another project in the (near?) future.Side question: Why is the package called
cpprestapi
within the OpenVDS project? It makes debugging a bit confusing since the actual package/repository is calledcpprestsdk
. -
Building the AWS IOManager fails
/Users/aej/software/compilescripts/openvds/openvds-master-src/src/OpenVDS/IO/IOManagerAWSCurl.h:10:10: fatal error: 'aws/crt/auth/Credentials.h' file not found #include <aws/crt/auth/Credentials.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
The file exists though if I search for in from the OpenVDS repository root
$ find . -iname "Credentials.h" -type f ./3rdparty/google-cloud-cpp-1.14.0/google/cloud/storage/oauth2/credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/aws-cpp-sdk-cognito-identity/include/aws/cognito-identity/model/Credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/aws-cpp-sdk-finspace-data/include/aws/finspace-data/model/Credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/aws-cpp-sdk-connect/include/aws/connect/model/Credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/aws-cpp-sdk-sts/include/aws/sts/model/Credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/crt/aws-crt-cpp/include/aws/crt/auth/Credentials.h ./3rdparty/aws-cpp-sdk-1.9.336_/crt/aws-crt-cpp/crt/aws-c-auth/include/aws/auth/credentials.h
I am currently a bit stuck at this step since I did not find any straightforward way yet to avoid this problem. I assume that the include paths is not populated properly.
System
-
Arm64 MacOS 13.0.1
-
OpenVDS
master
branch -
clang 14.0.0
$ clang --version Apple clang version 14.0.0 (clang-1400.0.29.202) Target: arm64-apple-darwin22.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
-
cmake 3.24.3 (via Homebrew)