Question

I am trying to build AOSP on on OS X 10.7.5, with Xcode 4.2.1 and I get the error:

host C++: libutils <= system/core/libutils/Printer.cpp

system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter::printLine(const char*)’:

system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope

make: * [out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o] Error 1

However if I myself write a program using the function dprintf it compiles fine, so I guess my problem is that AOSP compilation uses the wrong compiler / toolchain. I tried to see what C compiler I have on my machine and I get this:

$ whereis gcc

/usr/bin/gcc

$ ls -al /usr/bin/gcc

lrwxr-xr-x 1 root wheel 12 Dec 16 23:08 /usr/bin/gcc -> llvm-gcc-4.2

I read that llvm is not suported for aosp. Could this be the reason? If this is the case, how can I install another compiler?

Was it helpful?

Solution

I solved the issue upgrading to OS X 10.9 (Mavericks) and XCode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top