Closed Bug 684150 Opened 13 years ago Closed 13 years ago

Fennec build fails on Mac OS X in google-breakpad

Categories

(Toolkit :: Crash Reporting, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file, 2 obsolete files)

This is the error that I originally got:

In file included from /Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc:34:
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/../common/stabs_reader.h:53:19: error: a.out.h: No such file or directory
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc: In member function ‘bool google_breakpad::StabsReader::Process()’:
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc:94: error: ‘N_UNDF’ was not declared in this scope

I think this is because toolkit/crashreporter/google-breakpad/src/common/Makefile.in checks OS_ARCH instead of HOST_OS_ARCH, which makes linux cross-compiles on OS X fail.

So, I tried this patch: http://pastebin.mozilla.org/1318780

With that patch, the original failure doesn't happen, but I now get this failure:

dump_symbols.cc
c++ -o host_dump_symbols.o -c  -I/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/../.. -I/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux -I. -I../../../../../../dist/include -I../../../../../../dist/include/nsprpub  -I/Users/ehsanakhgari/moz/tmp/obj-android/dist/include/nspr -I/Users/ehsanakhgari/moz/tmp/obj-android/dist/include/nss     -I/Users/ehsanakhgari/moz/tmp/obj-android/dist/include/nspr /Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:38:17: error: elf.h: No such file or directory
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:41:18: error: link.h: No such file or directory
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc: In function ‘void<unnamed>::FixAddress(void*)’:
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:134: error: ‘Addr’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:134: error: ‘ElfW’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:134: error: expected `;' before ‘base’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: ‘Ehdr’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: ‘elf_header’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: expected type-specifier before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: expected `>' before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: expected `(' before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: expected primary-expression before ‘>’ token
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:135: error: expected `)' before ‘;’ token
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:136: error: ‘base’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: ‘Shdr’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: ‘sections’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: expected type-specifier before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: expected `>' before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: expected `(' before ‘ElfW’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: expected primary-expression before ‘>’ token
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:138: error: expected `)' before ‘;’ token
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc: At global scope:
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:144: error: ISO C++ forbids declaration of ‘ElfW’ with no type
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:144: error: ‘Addr’ was not declared in this scope
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:144: error: expected ‘,’ or ‘;’ before ‘GetLoadingAddress’
/Users/ehsanakhgari/moz/tmp/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc:758: error: expected `}' at end of input
make[2]: *** [host_dump_symbols.o] Error 1
make[1]: *** [libs] Error 2
make: *** [default] Error 2

I _think_ that file should not even be built on Mac, but I couldn't figure out what I need to do to make that file be excluded on Mac host builds.

Ted, Kyle, can any of you guys give me a pointer on this?  Thanks!
The Breakpad tools don't support dumping symbols on a different OS from the target. I'd recommend you just --disable-crashreporter, honestly.
hmm, if this is a configuration that is bound to fail, should we just disable crashreporter (or emit an error) in configure.in when OS_ARCH and HOST_OS_ARCH are different?
I think we can do that. OS_ARCH is still Linux for Android builds, IIRC, so that shouldn't cause any breakage on our current builds. (I'd push to try just to be sure, though.) I'd probably make this a configure error, with the note that you should --disable-crashreporter.
ok, I'll write a patch to do that.
Attached patch Patch (v1) (obsolete) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #557827 - Flags: review?(ted.mielczarek)
Attached patch Patch (v2) (obsolete) — Splinter Review
Ted, if you want, I can put the nspr part into its own bug, though if you can review all of this in one go that would be great!
Attachment #557827 - Attachment is obsolete: true
Attachment #557827 - Flags: review?(ted.mielczarek)
Attachment #557833 - Flags: review?(ted.mielczarek)
Comment on attachment 557833 [details] [diff] [review]
Patch (v2)

Wrong bug :(
Attachment #557833 - Attachment is obsolete: true
Attachment #557833 - Flags: review?(ted.mielczarek)
Attachment #557827 - Attachment is obsolete: false
Attachment #557827 - Flags: review?(ted.mielczarek)
NSPR patches in their own bugs make life a bit easier for me, if you don't mind.
Attached patch Patch (v2)Splinter Review
(In reply to Ted Mielczarek [:ted, :luser] from comment #8)
> NSPR patches in their own bugs make life a bit easier for me, if you don't
> mind.

Sure, filed bug 684254.
Attachment #557827 - Attachment is obsolete: true
Attachment #557827 - Flags: review?(ted.mielczarek)
Attachment #557846 - Flags: review?(ted.mielczarek)
Blocks: 684254
No longer blocks: 684254
I have another solution in bug 684254.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Dammit, wrong bug again!
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Attachment #557846 - Flags: review?(ted.mielczarek) → review+
http://hg.mozilla.org/mozilla-central/rev/78e81382db7f
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: