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

Fix module redefinition errors related to CommonCrypto and zlib #353

Closed
wants to merge 2 commits into from

Conversation

pixelspark
Copy link

@pixelspark pixelspark commented Jul 5, 2017

When building Starscream in a project together with Kitura-WebSocket (or other IBM packages that use crypto), the compiler complains about there being two 'CommonCrypto' modules. See 'swift package show-dependencies' output:

├── Kitura-WebSocket<https://github.com/IBM-Swift/Kitura-WebSocket@0.8.2>
│   ├── Kitura-net<https://github.com/IBM-Swift/Kitura-net.git@1.7.12>
....
│   │   └── SSLService<https://github.com/IBM-Swift/BlueSSLService.git@0.12.44>
│   │       └── Socket<https://github.com/IBM-Swift/BlueSocket.git@0.12.55>
│   └── Cryptor<https://github.com/IBM-Swift/BlueCryptor.git@0.8.14>
│       └── CommonCrypto<https://github.com/IBM-Swift/CommonCrypto.git@0.1.4>
└── Starscream<https://github.com/daltoniam/Starscream.git@2.1.0>
    ├── zlib<https://github.com/daltoniam/zlib-spm.git@1.0.0>
    └── CommonCrypto<https://github.com/daltoniam/common-crypto-spm.git@1.0.0>

This PR makes Starscream use the IBM module (which essentially is the same kind of wrapper around CommonCrypto as is daltoniam/common-crypto-spm), which resolves the issue (and leaves you with one less repository to maintain 🙂).

@pixelspark
Copy link
Author

pixelspark commented Jul 6, 2017

Also, the zlib module is defined by the system as of XCode 9... which leads to 'module redefinition' errors. Should change the name of the zlib module to something else (e.g. "CZLib") and use that instead (or remove the module altogether, but that only works >=XCode 9). See PR daltoniam/zlib-spm#1

@pixelspark pixelspark changed the title Use IBM CommonCrypto module instead of custom one Fix module redefinition errors related to CommonCrypto and zlib Jul 6, 2017
@daltoniam
Copy link
Owner

Thanks for the PR (I merged the other one on zlib repo). I had to do some updates to the pod spec too, so I just pulled this changes in manually. Thanks again.

@daltoniam daltoniam closed this Jul 7, 2017
@pixelspark
Copy link
Author

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants