Remove breakpad from carthage

RESOLVED FIXED

Status

()

Firefox for iOS
Build & Test
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: fluffyemily, Assigned: fluffyemily)

Tracking

unspecified
Other
iOS
Dependency tree / graph

Firefox Tracking Flags

(fxios2.0+)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Assignee)

Description

2 years ago
Breakpad is not carthage compliant so should be moved from carthage into ThirdParty. 

A follow up bug to look at making breakpad carthage compliant in the future can be found here:https://bugzilla.mozilla.org/show_bug.cgi?id=1237620
(Assignee)

Comment 1

2 years ago
sleroux: I'm trying to carthagise the google breakpad project as I decided that it's too big and complex a project to try and squeeze into ThirdPary. 

I've got a branch that moves the Breakpad.xcodeproj to the root directory so that carthage can discover the project. https://github.com/fluffyemily/google-breakpad-ios/tree/carthageise-breakpad

It builds happily under `xcodebuild -scheme Breakpad -project Breakpad.xcodeproj build` but when I try and build it through carthage (carthage update --platform ios --no-use-binaries --verbose) it hangs when it hits breakpad.

The hang is completely silent. It just stops. No xcodebuild output, no errors, nothing. So no clues at all. I've gone through the carthage github project trying to discover what the problem is, but so far no luck. 

I'm a little stumped. Before I raise an contact the carthage guys to get some help, can you cast your eyes over it and see if you can see what the problem might be?
Flags: needinfo?(sleroux)
(Assignee)

Comment 2

2 years ago
Created attachment 8706426 [details]
Carthegise Breakpad
When I checked out your fork, I see that the latest commit moved Breakpad.xcodeproj to the root folder but I don't see it on my checkout nor do I see it at the root folder on Github. When I try to open .xcodeproject inside the src/client/ios directory there are no build schemes. Not sure what's going on here - seems like something weird is going on. Carthage could hang if there is no scheme available maybe?
Flags: needinfo?(sleroux)
(Assignee)

Comment 4

2 years ago
Created attachment 8706440 [details]
Screen Shot 2016-01-11 at 5.06.24 PM.png

When I look at github at the right branch (https://github.com/fluffyemily/google-breakpad-ios/tree/carthageise-breakpad) I see Breakpad.xcodeproj as the first entry. There should not be any xcodeproj at src/client/ios (I can't see it either in github or in my local copy). Not sure why what you are checking out bears no resemblance to what's on github. Scary.
Flags: needinfo?(sleroux)
Ugh ignore me. I thought you were committing it on master because the Github page I opened was the branch page instead of the repo page. Nothing to see here. I'll give this a go.
Flags: needinfo?(sleroux)
Now that I'm on the right branch, I tried to build the Breakpad scheme within Xcode and getting a missing header error. Removing the dir prefix /common/linux works but falls to a similar error for the next line.

https://www.dropbox.com/s/cf4acsoqvekh147/Screenshot%202016-01-11%2012.24.17.png?dl=0
(Assignee)

Comment 7

2 years ago
Hmm, I thought I'd fixed all of those. Maybe it's not made it's way into github and that's why things are broken. 

Thanks for checking.
(Assignee)

Updated

2 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 8

2 years ago
:sleroux: I've made a couple of changes and you should no longer get those linking errors, but still cathage does nothing. Can you take another look please?
Flags: needinfo?(sleroux)
(Assignee)

Comment 9

2 years ago
So, I discovered the problem. the Breakpad project contains 2 other .xcodeproj's - one for the mac client and one for testing the mac client. Deleting these xcodeproj's makes everything work. Not sure if this is the right solution though. 

I'm going to try 2 other solutions
1. put a workspace in the root rather than the xcodeproj for iOS. Add all 3 xcodeprojects to the workspace and setup 3 schemes for each. When I tried this in the past Carthage would ignore the workspace and just look for projects, but it looks like it might well work now.
2. leave the iOS xcodeproject where it was (not worry about linking etc) and just delete the mac xcodeprojects and see if this works. Carthage used to not look for projects in subdirectories, only in the root, but this may have changed if building a root level project won't work if there are others (not that it's been documented anywhere if it has).
Flags: needinfo?(sleroux)
(Assignee)

Comment 10

2 years ago
Created attachment 8706892 [details] [review]
Pull request

Moved all projects to a workspace. 

Much prefer this solution as far less fuxing about with header search paths and less disruption to the overall project structure. This should make it all much easier to maintain in future.
Attachment #8706426 - Attachment is obsolete: true
Attachment #8706892 - Flags: review?(sleroux)
(Assignee)

Comment 11

2 years ago
Comment on attachment 8706892 [details] [review]
Pull request

Cancelling review. This doesn't work after all (works fine from test project, not from firefox-ios)
Attachment #8706892 - Flags: review?(sleroux)
(Assignee)

Comment 12

2 years ago
Comment on attachment 8706892 [details] [review]
Pull request

Turns out there is a carthage bug whereby it can take up to 35 seconds to start building the dependencies. If it hangs, wait a bit.
Attachment #8706892 - Flags: review?(sleroux)
Created attachment 8706926 [details]
Screenshot 2016-01-12 09.44.54.png

I pulled down the latest from the PR and made sure to git clean -fdx before anything but I'm seeing a missing Breakpad iOS project and a bunch of schemes not related to iOS but a Mac framework one.

Also, just to clarify, how would I test the carthageization of this? You linked the carthage command but do I run that from the FF-iOS repo and link it or from the Breakpad directory?
(Assignee)

Comment 14

2 years ago
From inside the google-breakpad-ios project, run `carthage build --platform ios --no-skip-current`. This builds the project as if it were a carthage dependency. If it succeeds then we have a carthage compatible project.

I tested the integration with fxios by replacing the Cartfile contents with 
`github "fluffyemily/google-breakpad-ios" "fluffyemily/make-carthage-compatible"`

I then ran `carthage update --platform ios --no-use-binaries --verbose` which fetches, checks out and builds carthage dependencies.

I don't know why you are seeing missing things. When I look at the project fetched by carthage from my branch everything is as I expect - Breakpad.xcworkspace at root level, src/clients/ios/Breakpad.xcodeproj renamed to src/clients/ios/Breakpad iOS.xcodeproj and the workspace containing 2 subprojects, Breakpad.xcodeproj and Breakpad iOS.xcodeproj. This is also what I see when I clone my repo to a new location and check out the fluffyemily/make-carthage-compatible branch. 

I wonder if it is not merging well with your base project....
Created attachment 8706946 [details]
carthage logs.zip

I recloned sleroux/google-breakpad-ios and hub checkout'ed your PR. The Breakpad iOS project was missing from the workspace still so I removed the link and re-added the project. I tried to build the Breakpad iOS framework target in Xcode and it worked. When I tried to run the 'carthage build --platform ios --no-skip-current' command, the build fails with the follow carthage error log and console output.
Maybe its just my machine? I had an error show up related to an Xcode plugin I installed for some reason when trying to build with Carthage. I removed the plugin but I'm still seeing the build fail. Maybe jhugman can give this a pull/try?
(Assignee)

Comment 17

2 years ago
Try updating your carthage. I remember I had another problem a couple of weeks back that made me update to 0.11 in order for things to work.
Ah there we go. Looks like I was using a pretty old version of Carthage (0.7). After updating to 0.11 I was able to produce the .framework. Still got the errors for the AddressBook class but it seemed to breeze past that. Also was able to pull in the dependency into FFiOS with no problems.
Comment on attachment 8706892 [details] [review]
Pull request

Not sure what's going on with my project file but everything is working as expected and compiles fine.
Attachment #8706892 - Flags: review?(sleroux) → review+
(Assignee)

Comment 20

2 years ago
:sleroux - can you merge the PR and tag it so I can update the firefox-ios cartfile please?
I've merged and created a tag: https://github.com/sleroux/google-breakpad-ios/releases
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.