Can't compile breakpad for android using --host=arm-linux-androideabi

423 views
Skip to first unread message

Michael Truong

unread,
Nov 20, 2016, 5:01:48 AM11/20/16
to google-breakpad-discuss
Hi there,
Been trying to wrap my brain on why I just can't get breakpad to compile for android. I'm sure I'm missing something basic but I can't seem to figure it out.

My workflow in a brand-new ubuntu 16.0.4 VM:
- using depot-tools, I fetch breakpad
- ./configure && make in the breakpad src directory produces a libbreakpad_client.a (which is not compatible with my cross-platform Android project)
- following the Android readme, I do ./configure --host=arm-linux-androideabi --disable processor --disable-tools && make -j4

What follows is a spew of errors, just a snippet:

make: *** [src/client/linux/crash_generation/crash_generation_client.o] Error 1
In file included from /usr/include/c++/4.8/bits/postypes.h:40:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:40,
                 from /usr/include/c++/4.8/string:40,
                 from ./src/client/linux/handler/minidump_descriptor.h:36,
                 from src/client/linux/handler/minidump_descriptor.cc:32:
/usr/include/c++/4.8/cwchar:64:11: error: ‘::mbstate_t’ has not been declared
   using ::mbstate_t;
           ^
/usr/include/c++/4.8/cwchar:139:11: error: ‘::wint_t’ has not been declared
   using ::wint_t;
           ^
/usr/include/c++/4.8/cwchar:141:11: error: ‘::btowc’ has not been declared
   using ::btowc;
           ^
/usr/include/c++/4.8/cwchar:142:11: error: ‘::fgetwc’ has not been declared
   using ::fgetwc;
           ^
/usr/include/c++/4.8/cwchar:143:11: error: ‘::fgetws’ has not been declared
...
/usr/include/c++/4.8/cwchar: In function ‘wchar_t* std::wcschr(wchar_t*, wchar_t)’:
/usr/include/c++/4.8/cwchar:213:55: error: invalid conversion from ‘const wchar_t*’ to ‘wchar_t*’ [-fpermissive]
   { return wcschr(const_cast<const wchar_t*>(__p), __c); }
                                                       ^
/usr/include/c++/4.8/cwchar:212:3: error:   initializing argument 1 of ‘wchar_t* std::wcschr(wchar_t*, wchar_t)’ [-fpermissive]
   wcschr(wchar_t* __p, wchar_t __c



I spent a few days trying different things, such as:
- having build-essential installed
- editing the Makefile to use std=gnu++11 instead of std=c++11

But to no luck. Am I simply just 'missing' something? I have a feeling it really shouldn't be that hard to build the static library for Android.

Thanks,
Michael

Michael Truong

unread,
Nov 28, 2016, 5:21:13 PM11/28/16
to google-breakpad-discuss
If anyone is checking on this, I was able to compile it eventually...turns out I needed to use the windows ndk build (doh) and also use APP_STL := gnustl_static in application.mk.
Reply all
Reply to author
Forward
0 new messages