Closed Bug 1400927 Opened 9 years ago Closed 9 years ago

Building Fennec on MacOS fails when trying to build u2fhid

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect, P1)

53 Branch
All
Android
defect

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: droeh, Assigned: jcj)

References

()

Details

(Whiteboard: [webauthn] [u2f])

Attachments

(1 file, 1 obsolete file)

Building Fennec on MacOS fails after the patches for bug 1388843: > 0:25.19 error: native frameworks are only available on macOS targets > 0:25.19 > 0:25.35 error: aborting due to previous error > 0:25.35 > 0:25.38 error: Could not compile `u2fhid`.
Can you unbreak the build by emptying the main() function here? https://searchfox.org/mozilla-central/source/dom/webauthn/u2f-hid-rs/build.rs#7
Flags: needinfo?(droeh)
(In reply to Tim Taubert [:ttaubert] from comment #1) > Can you unbreak the build by emptying the main() function here? > > https://searchfox.org/mozilla-central/source/dom/webauthn/u2f-hid-rs/build. > rs#7 Yeah, that unbreaks it.
Flags: needinfo?(droeh)
Assignee: nobody → jjones
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [webauthn] [u2f]
Removing build.rs entirely is the easiest fix, but that does break `cargo test`. You should just add #[link(name = "IOKit", kind = "framework")] to the `extern` blocks in src/macos/iokit.rs. That's where the symbols are imported and unlike `build.rs` it will only be compiled if the eventual target is macOS.
Suggested patch per my comment above. I didn't try a full fennec build, but with this change the following crate-local tests worked: cargo build cargo test cargo build --target armv7-linux-androideabi Where the latter previously reproduced the `native frameworks` failure from the description.
Attachment #8909551 - Flags: review?(jjones)
Comment on attachment 8909551 [details] [diff] [review] Fix Android build Review of attachment 8909551 [details] [diff] [review]: ----------------------------------------------------------------- This looks good, and it works for me, too, building from OSX both Fennec and OSX Desktop. I've pushed it into https://github.com/jcjones/u2f-hid-rs/pull/46 as well.
Attachment #8909551 - Flags: review?(jjones) → review+
Attachment #8909530 - Attachment is obsolete: true
Pushed by ttaubert@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3aa403d810d8 Fix u2f-hid-rs cross-compilation on macOS r=jcj
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 57 → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: