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

Building fails using Carthage on macOS 10.15 and 11.0 #44

Open
axelboberg opened this issue Aug 28, 2020 · 16 comments
Open

Building fails using Carthage on macOS 10.15 and 11.0 #44

axelboberg opened this issue Aug 28, 2020 · 16 comments

Comments

@axelboberg
Copy link

I'm unable to build CEF.swift using Cartridge as it fails compiling at the steps below.
This is true for environments on both macOS 10.15 (Xcode 11.6) and macOS 11.0 (Xcode 12.0 beta 5).

The following build commands failed: CompileC /Users/[user]/Library/Caches/org.carthage.CarthageKit/DerivedData/11.6_11E708/CEF.swift/[id]/Build/Intermediates.noindex/ArchiveIntermediates/CEF.swift/IntermediateBuildFilesPath/CEF.swift.build/Release/CEFSandbox.build/Objects-normal/x86_64/cef_library_loader_mac.o /Users/[user]/[project]/Carthage/Checkouts/CEF.swift/External/cef_binary/libcef_dll/wrapper/cef_library_loader_mac.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/[user]/Library/Caches/org.carthage.CarthageKit/DerivedData/11.6_11E708/CEF.swift/[id]/Build/Intermediates.noindex/ArchiveIntermediates/CEF.swift/IntermediateBuildFilesPath/CEF.swift.build/Release/CEFSandbox.build/Objects-normal/x86_64/libcef_dll_dylib.o /Users/[user]/[project]/Carthage/Checkouts/CEF.swift/External/cef_binary/libcef_dll/wrapper/libcef_dll_dylib.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (2 failures)

@axelboberg axelboberg changed the title Building fails using Cartridge on macOS 10.15 and 11.0 Building fails using Carthedge on macOS 10.15 and 11.0 Aug 29, 2020
@axelboberg axelboberg changed the title Building fails using Carthedge on macOS 10.15 and 11.0 Building fails using Carthage on macOS 10.15 and 11.0 Aug 29, 2020
@lvsti
Copy link
Owner

lvsti commented Aug 29, 2020

could you also share what the actual errors are?

@axelboberg
Copy link
Author

axelboberg commented Aug 29, 2020

Sorry, it's been a long day. Judging by the logs it seems like it's the following two:

error: Build input file cannot be found: '/Users/[user]/[project]/Carthage/Checkouts/CEF.swift/External/cef_binary/libcef_dll/wrapper/cef_library_loader_mac.mm' (in target 'CEFSandbox' from project 'CEF.swift')

error: Build input file cannot be found: '/Users/[user]/[project]/Carthage/Checkouts/CEF.swift/External/cef_binary/libcef_dll/wrapper/libcef_dll_dylib.cc' (in target 'CEFSandbox' from project 'CEF.swift')

@awmcclain
Copy link

I'm running into the same thing. OS 10.15 and Xcode 10.3

@lvsti
Copy link
Owner

lvsti commented Sep 17, 2020

Unfortunately I cannot test this setup because my MBP tops at 10.14 🙈 Can you check whether the cef_binary folder actually exists? It should be created by the setup.sh after downloading the CEF bundle.

@awmcclain
Copy link

awmcclain commented Sep 20, 2020 via email

@awmcclain
Copy link

@lvsti
Copy link
Owner

lvsti commented Sep 20, 2020

which branch are you guys on?

@awmcclain
Copy link

awmcclain commented Sep 20, 2020 via email

@awmcclain
Copy link

awmcclain commented Sep 21, 2020 via email

@lvsti
Copy link
Owner

lvsti commented Sep 22, 2020

Instead of depending on the Cartfile, I'd rather use a branch.txt which contains the name of the branch. I'll submit a fix soon for the 4103 branch.

@lvsti
Copy link
Owner

lvsti commented Sep 22, 2020

BTW I added the setup build phase to the CEFSandbox target as well, thanks for noticing it. There is one weirdness though, the Carthage build now succeeds but only for the second time onward, in the first run it fails to find the same files. Let me know if you have a hunch why.

@awmcclain
Copy link

awmcclain commented Sep 22, 2020 via email

@johnboiles
Copy link

Maybe set up a new dummy target as a dependency of both projects that only runs the setup script?

That worked for me:

image

@johnboiles
Copy link

@lvsti 👋 want me to make a PR for this?

@johnboiles
Copy link

Hmm this fixed the issue for me when building in Xcode but not building an archive with xcodebuild. Hmm

@johnboiles
Copy link

My final solution was to tell Xcode about these output files:
image
BUT! Xcode goes ahead and creates the External/cef_binary... directory structure if I do that so I also had to add a rm -rf External/cef_binary || true right before creating the symlink in setup.sh.

Kinda messy, but it's working now at least

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

4 participants