CEF.swift
CEF.swift copied to clipboard
Building fails using Carthage on macOS 10.15 and 11.0
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)
could you also share what the actual errors are?
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')
I'm running into the same thing. OS 10.15 and Xcode 10.3
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.
Nope, the whole Externals directory isn't there. Let me see if I can wrangle the log
Carthage/Checkouts/CEF.swift virtual-camera β 1d3h β
βΆ ls
CEF.swift LICENSE.txt README.md requirements.txt
CEF.swift.xcodeproj Modules Samples scripts
On Thu, Sep 17, 2020 at 12:46 PM Tamas Lustyik [email protected] wrote:
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.
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lvsti/CEF.swift/issues/44#issuecomment-694460676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RR6TG7X5TO3XH3HOWS3SGJRR3ANCNFSM4QOTLT6Q .
which branch are you guys on?
cef_4103
On Sun, Sep 20, 2020 at 4:19 AM Tamas Lustyik [email protected] wrote:
which branch are you guys on?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lvsti/CEF.swift/issues/44#issuecomment-695775424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RR7ORFGPJZD5M4RERW3SGXQKLANCNFSM4QOTLT6Q .
-- Sent from a phone
I've narrowed down the problem. I think the issue is that the CEFSandbox
gets built first (because it's a dependency) but it doesn't have the
external resources build step, so setup.sh
never gets run. I fixed that,
but since I'm using Carthage to incorporate CEF into another project it
gets confused about the git branch that I'm on.
I can fix that by grabbing the cef branch name from the Cartfile (whenever $CARTHAGE=YES). I'm happy to put all this in a PR unless there's another approach you'd prefer.
On Sun, Sep 20, 2020 at 9:09 AM Andrew McClain [email protected] wrote:
cef_4103
On Sun, Sep 20, 2020 at 4:19 AM Tamas Lustyik [email protected] wrote:
which branch are you guys on?
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lvsti/CEF.swift/issues/44#issuecomment-695775424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RR7ORFGPJZD5M4RERW3SGXQKLANCNFSM4QOTLT6Q .
-- Sent from a phone
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.
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.
I noticed the same thing!
I think itβs because it pre-caches the headers before running the script (at least looking at the logs, thereβs a bunch of stuff that happens before the script the second time).
Maybe set up a new dummy target as a dependency of both projects that only runs the setup script?
Maybe set up a new dummy target as a dependency of both projects that only runs the setup script?
That worked for me:
![image](https://user-images.githubusercontent.com/218876/133726345-c1e762e8-3e8d-4d9a-8fd8-5ebd0d06e50f.png)
@lvsti π want me to make a PR for this?
Hmm this fixed the issue for me when building in Xcode but not building an archive with xcodebuild. Hmm
My final solution was to tell Xcode about these output files:
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