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

Carthage update fails #86

Closed
SebastienChauvin opened this issue Jul 21, 2020 · 10 comments
Closed

Carthage update fails #86

SebastienChauvin opened this issue Jul 21, 2020 · 10 comments
Milestone

Comments

@SebastienChauvin
Copy link

SebastienChauvin commented Jul 21, 2020

Issue type

Incorrect behavior

Description of the problem

Build fails

             SRGLetterboxViewManager.h       SRGLetterboxViewManager.m       Srgletterbox.xcodeproj          Srgletterbox.xcworkspace        build
Sebastiens-MacBook-Pro-6:ios seb$ cat >> Cartfile
github "SRGSSR/srgmediaplayer-apple"
Sebastiens-MacBook-Pro-6:ios seb$ carthage update --configuration Release-static
*** Cloning srgmediaplayer-apple
*** Cloning srglogger-apple
*** Cloning MAKVONotificationCenter
*** Cloning libextobjc
*** Checking out MAKVONotificationCenter at "1.0_srg4"
*** Checking out libextobjc at "0.6_srg2"
*** Checking out srgmediaplayer-apple at "5.0.0"
*** Checking out srglogger-apple at "2.0.1"
*** xcodebuild output can be found in /var/folders/33/6ggld9410xj4dz254q1zwpjr0000gn/T/carthage-xcodebuild.e29684.log
*** Building scheme "libextobjc framework (tvOS)" in extobjc.xcodeproj
Failed to write to /Users/seb/Documents/rts/rn/react-native-srgletterbox/ios/Carthage/Build/tvOS/Static/libextobjc.framework: Error Domain=NSCocoaErrorDomain Code=260 "The file “libextobjc.framework” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Users/seb/Documents/rts/rn/react-native-srgletterbox/ios/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc%20framework%20(tvOS)/BuildProductsPath/Release-static-appletvos/libextobjc.framework, NSFilePath=/Users/seb/Documents/rts/rn/react-native-srgletterbox/ios/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc framework (tvOS)/BuildProductsPath/Release-static-appletvos/libextobjc.framework, NSUnderlyingError=0x7ff213f36f20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

Environment information

xcode 11.6
carthage 0.35.0

Reproducibility

Always reproducible

@SebastienChauvin SebastienChauvin changed the title Release-static Carthage update with Release-static Jul 21, 2020
@SebastienChauvin SebastienChauvin changed the title Carthage update with Release-static Carthage update fails Jul 21, 2020
@SebastienChauvin
Copy link
Author

Same result with Dynamic framework carthage update

@SebastienChauvin
Copy link
Author

SebastienChauvin commented Jul 21, 2020

I must have missed something:

I also have this issue when simply doing:

git clone [email protected]:SRGSSR/srgmediaplayer-apple.git
carthage update

-->

*** Checking out MAKVONotificationCenter at "1.0_srg4"
*** Checking out libextobjc at "0.6_srg2"
*** Checking out srglogger-apple at "2.0.1"
*** xcodebuild output can be found in /var/folders/33/6ggld9410xj4dz254q1zwpjr0000gn/T/carthage-xcodebuild.lZGNbU.log
*** Building scheme "libextobjc framework (tvOS)" in extobjc.xcodeproj
Failed to write to /Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Build/tvOS/libextobjc.framework: Error Domain=NSCocoaErrorDomain Code=260 "The file “libextobjc.framework” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc%20framework%20(tvOS)/BuildProductsPath/Release-appletvos/libextobjc.framework, NSFilePath=/Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc framework (tvOS)/BuildProductsPath/Release-appletvos/libextobjc.framework, NSUnderlyingError=0x7fab5cd64b00 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

See carthage verbose attached:
log.txt

@defagos
Copy link
Member

defagos commented Jul 22, 2020

Hi!

Just tested with Xcode 12 beta 2 (don't have 11.6 yet, but I'll download it and test again). The first example you provide:

carthage update --configuration Release-static

works fine on my machine 😈

Maybe this is related to Xcode 11.6. We had to fix a build issue for 11.4, so I wouldn't be surprised if this is the case.

In the meantime, I propose you just try a Carthage cache cleanup with the command rm -rf Carthage; rm -rf ~/Library/Caches/org.carthage.CarthageKit executed from the repository main directory. Then try again.

If you also don't need the tvOS build, you can only build for iOS with the --platform iOS parameter. I also recommend enabling the new Carthage resolver and build caching, so in general:

carthage update --cache-builds --new-resolver

Let me know if this works for you, otherwise I'll try with 11.6 tomorrow.

@SebastienChauvin
Copy link
Author

Thanks for the feedback Sam !

Sadly I had already tried some combination of what you proposed here.

My latest attempt:

Sebastiens-MacBook-Pro-6:srgmediaplayer-apple seb$ rm -rf Carthage/
Sebastiens-MacBook-Pro-6:srgmediaplayer-apple seb$ rm -rf ~/Library/Caches/org.carthage.CarthageKit/
Sebastiens-MacBook-Pro-6:srgmediaplayer-apple seb$ carthage update --cache-builds --new-resolver --platform iOS
*** Cloning libextobjc
*** Cloning srglogger-apple
*** Cloning MAKVONotificationCenter
*** Checking out libextobjc at "0.6_srg2"
*** Checking out srglogger-apple at "2.0.1"
*** Checking out MAKVONotificationCenter at "1.0_srg4"
*** No cache found for libextobjc, building with all downstream dependencies
*** No cache found for MAKVONotificationCenter, building with all downstream dependencies
*** No cache found for srglogger-apple, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/33/6ggld9410xj4dz254q1zwpjr0000gn/T/carthage-xcodebuild.NA4dUA.log
*** Building scheme "libextobjc framework (iOS)" in extobjc.xcodeproj
Failed to write to /Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Build/iOS/libextobjc.framework: Error Domain=NSCocoaErrorDomain Code=260 "The file “libextobjc.framework” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc%20framework%20(iOS)/BuildProductsPath/Release-iphoneos/libextobjc.framework, NSFilePath=/Users/seb/Documents/rts/rn/ios/srgmediaplayer-apple/Carthage/Checkouts/libextobjc/build/ArchiveIntermediates/libextobjc framework (iOS)/BuildProductsPath/Release-iphoneos/libextobjc.framework, NSUnderlyingError=0x7ff6ebd637d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

@defagos
Copy link
Member

defagos commented Jul 22, 2020

Just tried with Xcode 11.6, works fine on my machine™️. I propose we have a look at it tomorrow, just get in touch with me. In the meantime I can also provide you with the binaries so that you can progress on what matters (the code), but still I am interested in knowing why this fails and to solve it.

Having a look at the log it seems everything was successful (the archive was built and I see only compilation warnings). What does not work is the copy operation itself. Wonder if this is possibly related to an access rights issue. Could you maybe try again with the Cartfile somewhere in /tmp just to see what you get?

@SebastienChauvin
Copy link
Author

I am under the impression that my problem is similar to those:
BradLarson/GPUImage#2573 or Carthage/Carthage#2220 but I have tried to look at the project settings on xcode and did not see anything obvious.

Well, anyway I would appreciate tvOS / iOS static binary frameworks for SRGMediaPlayer (and its dependencies), SRGAnalytics and the bridge between the two or maybe I can just build them on the MacMini ... 🤔

I will also see with @GautierAnd if he can build on his computer

Thanks !

@defagos
Copy link
Member

defagos commented Jul 23, 2020

I saw two interesting comments about derived data settings:

  • File > Project (or Workspace if you are using a workspace) Settings
  • Xcode > Preferences, Locations tab

Anyway, hopefully we should be able to move away from Carthage soon, hopefully such issues will not occur anymore.

@pyby
Copy link
Member

pyby commented Jul 23, 2020

Tested without error in /tmp and git clone with:

➜  xcodebuild -version
Xcode 11.6
Build version 11E708
➜  carthage version                              
0.35.0

You may clean all Xcode DerivedData, and set to Default location (at least, update if it's the legacy one in the Xcode > Preferences, Locations tab).

You can use:
rm -frd ~/Library/Developer/Xcode/DerivedData/* && rm -frd ~/Library/Caches/com.apple.dt.Xcode/*
Or
https://itunes.apple.com/app/devcleaner/id1388020431

The archive step uses the var sub folder, IDEArchivePathOverride = /var/folders/[…]/T/[lib_name]. Is write right correct to /var/folders/[…]/T/ on your machine?

An other check to do: If the .pkg was installed, and then, brew is used to install a Carthage update, some cleanings is required. See https://github.com/Carthage/Carthage#installing-carthage.

  • Binary installation: /usr/local/bin/carthage
  • Brew installation: /usr/local/Cellar/carthage/0.35.0/bin/carthage

@defagos defagos added this to the 6.0.0 milestone Jul 27, 2020
@defagos
Copy link
Member

defagos commented Jul 27, 2020

Such issues will disappear with version 6.0.0 and SPM. Carthage support will be dropped.

@SebastienChauvin
Copy link
Author

We have worked around this with Sam, I have binaries now

@defagos defagos closed this as completed Oct 23, 2020
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

No branches or pull requests

3 participants