Open eliaSchenker opened 7 months ago
I can confirm but have no idea what is the root cause or how to resolve this. A pull request that updates Carthage (or the way we use it) would be appreciated.
I don't see anything directly relevant in the CocoaAsyncSocket repo (discussions, issues, recent commits).
If this library and CocoaAsyncSocket have different deployment target requirements, we can lower ours (which I bump every so often since I don't test on 5 year old versions and such) to match.
@michaelklishin I don't think lowering the target of this package would be a good idea as it's no longer supported on newer systems (/newer version of Xcode). The fact that CocoaAsyncSocket's target is lower than the one of this library doesn't seem to matter much, the problem is that CocoaAsyncSocket's target is outdated (and therefore xcodebuild refuses to compile with it)
I did find this pull request in CocoaAsyncSocket, https://github.com/robbiehanson/CocoaAsyncSocket/pull/830, which has unfortunately been marked as stale (do you know if the repo is still being actively maintained?). It seems that they would have to increase their deployment target (to 10.13, which is the lowest supported) for the issue to be resolved.
We may have a similar problem with the other dependency (JKVValue, where the deployment target is even lower (10.9). Same applies to the iOS target (for both dependencies)
I tried to create a temporary workaround to this issue locally by first updating carthage without building, overriding the deployment targets of the dependencies and then building:
carthage update --no-build
sed -i -e 's/MACOSX_DEPLOYMENT_TARGET = 10.10/MACOSX_DEPLOYMENT_TARGET = 10.13/g' ./Carthage/Checkouts/CocoaAsyncSocket/CocoaAsyncSocket.xcodeproj/project.pbxproj
sed -i -e 's/MACOSX_DEPLOYMENT_TARGET = 10.9/MACOSX_DEPLOYMENT_TARGET = 10.13/g' ./Carthage/Checkouts/JKVValue/JKVValue.xcodeproj/project.pbxproj
carthage build --platform macOS,iOS
When using carthage without the --use-xcframeworks
(as per this repos readme, which is not recommended by carthage https://github.com/Carthage/Carthage?tab=readme-ov-file#building-platform-independent-xcframeworks-xcode-12-and-above) the build fails:
Building universal frameworks with common architectures is not possible. The device and simulator slices for "CocoaAsyncSocket" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.
I'm assuming this is because I'm on a newer silicon mac which the old method doesn't support. Maybe this repo should migrate to using XCFramework' (https://github.com/Carthage/Carthage?tab=readme-ov-file#migrating-a-project-from-framework-bundles-to-xcframeworks)?
Describe the bug
If installed using carthage (as per the installation guide), a build error occurs for the CocoaAsyncSocket dependency:
If the build command that carthage executes is run manually for the other dependency (JKVValue) the archive succeeds, could this be an issue with the CocoaAsyncSocket dependency?
Reproduction steps
Follow carthage installation steps in repostiory (https://github.com/rabbitmq/rabbitmq-objc-client?tab=readme-ov-file#installation-with-carthage):
carthage bootstrap
Expected behavior
Setup using carthage shouldn't fail
Additional context
package version
macOS
swift version
uname -a: