Setup Android Environment

40 views
Skip to first unread message

Philipp Neumann

unread,
Dec 16, 2024, 11:10:17 AM12/16/24
to cobalt-dev
Hello there,
I'm trying to setup build environment for building cobalt for android.

In the lasts steps building crashpad handler the compiler fails with these and more:
_______
[1/261] CXX x86/obj/third_party/protobuf/protoc_lib/csharp_doc_comment.o
FAILED: x86/obj/third_party/protobuf/protoc_lib/csharp_doc_comment.o
ccache "../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-16-init-17653-g39da55e8-2/bin/clang++" -MMD -MF x86/obj/third_party/protobuf/protoc_lib/csharp_doc_comment.o.d -DUSE_COBALT_CUSTOMIZATIONS -DSTARBOARD_BUILD_TYPE_QA -DCOBALT_BUILD_TYPE_QA -DNDEBUG -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -I../.. -Ix86/gen -I../../third_party/protobuf/src -m32 -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-unused-function -O2 -Wno-unused-function -Wno-enum-compare-switch -Wno-enum-compare -Wno-unknown-warning-option -fno-exceptions -std=gnu++14 -fno-rtti -c ../../third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc -o x86/obj/third_party/protobuf/protoc_lib/csharp_doc_comment.o
In file included from ../../third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc:34:
In file included from ../../third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.h:35:
../../third_party/protobuf/src/google/protobuf/io/printer.h:40:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
___________

I've used a ubuntu:20.04 docker container and took all the requirements steps mentioned in the tutorial. Any idea what I missed?

Kind regards
Philipp

Kaido Kert

unread,
Dec 16, 2024, 1:10:12 PM12/16/24
to Philipp Neumann, cobalt-dev
Hi Philipp,

Thanks for pointing that out, there may be missing a requirement in the instructions.
If you do `apt install g++-multilib` ( as in the CI container ) does that resolve the missing header problem ?

Kaido

You received this message because you are subscribed to the Google Groups "cobalt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobalt-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cobalt-dev/cae2b757-0606-4a05-8c7d-19591242eda4n%40googlegroups.com.

Philipp Neumann

unread,
Dec 16, 2024, 2:46:20 PM12/16/24
to cobalt-dev
Thanks a lot yep that solved the build! I was able to build the APK. Really appreciate your help 👍
Kind regards 
Philipp
Reply all
Reply to author
Forward
0 new messages