Add macOS (arm64) support via Homebrew + Apple frameworks#40
Open
ps-spb wants to merge 1 commit intoJackOfMostTrades:masterfrom
Open
Add macOS (arm64) support via Homebrew + Apple frameworks#40ps-spb wants to merge 1 commit intoJackOfMostTrades:masterfrom
ps-spb wants to merge 1 commit intoJackOfMostTrades:masterfrom
Conversation
Contributor
|
Seems better than mine! I'd be happy if this gets merged! |
JackOfMostTrades
requested changes
May 17, 2025
| OPENSSL_PREFIX := $(shell brew --prefix openssl@3 2>/dev/null) | ||
| ifneq ($(OPENSSL_PREFIX),) | ||
| OPENSSL_INC := -I$(OPENSSL_PREFIX)/include | ||
| OPENSSL_LIB := -L$(OPENSSL_PREFIX)/lib |
Owner
There was a problem hiding this comment.
Can this append to LIBS rather than being a separate var? (Seems like it might just simplify the commands below)
| JSONC_PREFIX := $(shell brew --prefix json-c 2>/dev/null) | ||
| ifneq ($(JSONC_PREFIX),) | ||
| JSON_C_INC := -I$(JSONC_PREFIX)/include -I$(JSONC_PREFIX)/include/json-c | ||
| JSON_C_LIB := -L$(JSONC_PREFIX)/lib |
Owner
There was a problem hiding this comment.
Same comment about this going into LIBS?
| certificates_test: certificates.cpp certificates_test.cpp | ||
| g++ -g -fPIC -Wall -I$(AWS_SDK_PATH)/include $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 \ | ||
| debug.cpp util.cpp certificates.cpp certificates_test.cpp -o certificates_test $(STATIC_LIBS) $(LIBS) -lcrypto -ljson-c -lcurl -lz | ||
| g++ -g -fPIC -Wall -I$(AWS_SDK_PATH)/include $(OSX_FRAMEWORKS) $(OPENSSL_INC) $(JSON_C_INC) $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 \ |
Owner
There was a problem hiding this comment.
Looks like JSON_C_INC is on here twice now.
|
|
||
| aws_kms_pkcs11_test: aws_kms_pkcs11_test.c aws_kms_pkcs11.so | ||
| g++ -g -fPIC -Wall -I$(AWS_SDK_PATH)/include $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 \ | ||
| g++ -g -fPIC -Wall -I$(AWS_SDK_PATH)/include $(OSX_FRAMEWORKS) $(OPENSSL_INC) $(JSON_C_INC) $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 \ |
| aws_kms_pkcs11.so: aws_kms_pkcs11.cpp unsupported.cpp aws_kms_slot.cpp debug.cpp util.cpp attributes.cpp certificates.cpp | ||
| g++ -shared -fPIC -Wall -I$(AWS_SDK_PATH)/include $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 $(SRC) \ | ||
| -o aws_kms_pkcs11.so $(STATIC_LIBS) $(LIBS) -lcrypto -ljson-c -lcurl -lz | ||
| g++ -shared -fPIC -Wall -I$(AWS_SDK_PATH)/include $(OSX_FRAMEWORKS) $(OPENSSL_INC) $(JSON_C_INC) $(PKCS11_INC) $(JSON_C_INC) $(PROXY_CFLAGS) -fno-exceptions -std=c++17 $(SRC) \ |
Owner
|
Thanks! This PR looks great! Just a couple of small things to clean up in the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for building aws-kms-pkcs11 on macOS (arm64), including:
I'm aware theres another PR - this seemed a simpler approach. Mandating a user installs via brew doesn't seem too onerous, rather than trying to account for all the edge cases.