Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] Hardcoded CoreFoundation path in aws-c-common-targets.cmake #1245

Closed
kszucs opened this issue Sep 26, 2019 · 2 comments
Closed

[OSX] Hardcoded CoreFoundation path in aws-c-common-targets.cmake #1245

kszucs opened this issue Sep 26, 2019 · 2 comments
Labels
guidance Question that needs advice or information.

Comments

@kszucs
Copy link

kszucs commented Sep 26, 2019

I don't have Xcode installed locally, only command line tools, so the linker cannot locate CoreFoundation:

set_target_properties(AWS::aws-c-common PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "AWS_COMMON_USE_IMPORT_EXPORT"
  INTERFACE_COMPILE_OPTIONS "-pthread"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "-pthread;pthread;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreFoundation.framework"
)

A temporary solution is overriding it.

What platform/OS are you using?

OSX Mojave

Which version of the SDK?

Installed by home-brew:

aws-sdk-cpp: stable 1.7.180 (bottled), HEAD
AWS SDK for C++
https://github.com/aws/aws-sdk-cpp
/usr/local/Cellar/aws-sdk-cpp/1.7.180 (22,152 files, 426.2MB)
  Poured from bottle on 2019-09-18 at 15:36:12
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/aws-sdk-cpp.rb
@singku
Copy link
Contributor

singku commented Sep 26, 2019

The path is not hard coded, it is set during CMake execution when finding CoreFoundation in the target host. When it is installed in that host, it is expected to be fetched from the same location.
https://github.com/awslabs/aws-c-common/blob/master/CMakeLists.txt#L88
https://github.com/awslabs/aws-c-common/blob/master/CMakeLists.txt#L129

But it is a problem when you deploy and use in a different host after installation.
aws-sdk-cpp just consumes this package, so I suggest you to submit an issue to aws-c-common repo https://github.com/awslabs/aws-c-common

@KaibaLopez KaibaLopez added the guidance Question that needs advice or information. label Sep 26, 2019
@kszucs
Copy link
Author

kszucs commented Sep 26, 2019

The path is not hard coded, it is set during CMake execution when finding CoreFoundation in the target host. When it is installed in that host, it is expected to be fetched from the same location.
https://github.com/awslabs/aws-c-common/blob/master/CMakeLists.txt#L88
https://github.com/awslabs/aws-c-common/blob/master/CMakeLists.txt#L129

But it is a problem when you deploy and use in a different host after installation.

A bit more flexible solution would be better.

aws-sdk-cpp just consumes this package, so I suggest you to submit an issue to aws-c-common repo https://github.com/awslabs/aws-c-common

Didn't know that, thanks for the heads up. I'll submit the issue there then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants