Build error on OSX 10.11(EI Captain) for branch android-5.1.1_r14

1,322 views
Skip to first unread message

Hai Guo

unread,
Oct 3, 2015, 10:12:54 AM10/3/15
to Android Building
Hi All,
I'm trying to build android-5.1.1_r14 on OSX 10.11, because the building needs the old version Xcode 5.1.1.
But now OSX 10.11 does not support Xcode 5.1.1 any more.
Does any body shed some light?

Thanks in advance~~


Error log as below:

host C++: libbacktrace_libc++_32 <= system/core/libbacktrace/BacktraceMap.cpp
host C++: libnativebridge_32 <= system/core/libnativebridge/native_bridge.cc
system/core/libnativebridge/native_bridge.cc:19:10: fatal error: 'cstring' file not found
#include <cstring>
         ^
1 error generated.
make: *** [out/host/darwin-x86/obj32/SHARED_LIBRARIES/libnativebridge_intermediates/native_bridge.o] Error 1
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (04:52 (mm:ss)) ####


Hai Guo

unread,
Oct 4, 2015, 12:07:37 AM10/4/15
to Android Building

Build passed.

Just copy MacOSX10.8.sdk(from the Xcode 5.1.1) to folder
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

Then it's like this below.
│── SDKs
│   ├── MacOSX10.10.sdk
│   ├── MacOSX10.8.sdk
│   └── MacOSX10.9.sdk

Nothing else change for the AOSP source tree.

Wendong

unread,
Nov 5, 2015, 12:55:12 AM11/5/15
to Android Building
Hello Hai Guo,

I'm also trying the andriod build on Mac OS 10.11. I tried what you did i.e. copied the 10.8.sdk folder to my installed Xcode. However the build still errors out.

One difference with yours is that I'm build android 5.0.1_r1. I wonder if this is why I got the different results as you.

Just wanted to know if you tried 5.0.1_r1 or not.

The build error I'm getting seems to be related to the clang.

Thanks,
Wendong 

Wendong

unread,
Nov 5, 2015, 10:35:04 AM11/5/15
to Android Building
Just to be more detailed, the current error I'm facing is:

clang: error: unsupported option '--gdwarf2'


Thanks,

Wendong

Wendong

unread,
Nov 6, 2015, 12:18:41 PM11/6/15
to Android Building
Just one update:

I tried with android-5.1.1_r14 same as Hai Guo, and the build worked. I was doing the same as what Hai Guo had mentioned here.

Thanks,
Wendong

shadyboss

unread,
Nov 23, 2015, 9:12:04 AM11/23/15
to Android Building
Hello Hai Guo:

I'm building android master on EI Captain with Xcode 7.0. But the MacOSX 10.11.sdk caused the failed building, after I copied MacOSX10.8.sdk to folder
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, it still not work.

What's the Xcode version u are using?

Thanks.

在 2015年10月4日星期日 UTC+8下午12:07:37,Hai Guo写道:

Jianchun Zuo

unread,
Nov 23, 2015, 11:32:43 AM11/23/15
to Android Building
Hi, Hai,
I have the same question about the Xcode version you are using.

Actually, I tried to build 5.1.1_r14 with both Xcode 6.1.1 on OS X 10.11.1, with your 10.8.sdk copied from Xcode 5.1.1, but failed with following errors:

Import includes file: out/target/product/generic/obj/EXECUTABLES/backtrace_test_intermediates/import_includes
target thumb C: libbacktrace_test <= system/core/libbacktrace/backtrace_testlib.c
In file included from external/libcxx/include/__locale:30:0,
                 from external/libcxx/include/ios:216,
                 from external/libcxx/include/ostream:131,
                 from external/gtest/src/../include/gtest/gtest.h:55,
                 from external/gtest/src/gtest_main.cc:32:
external/libcxx/include/support/android/locale_bionic.h:21:21: fatal error: xlocale.h: No such file or directory
 #include <xlocale.h>
                     ^
In file included from external/libcxx/include/__locale:30:0,
                 from external/libcxx/include/ios:216,
                 from external/libcxx/include/ostream:131,
                 from external/gtest/src/../include/gtest/gtest.h:55,
                 from external/gtest/src/gtest-all.cc:39:
external/libcxx/include/support/android/locale_bionic.h:21:21: fatal error: xlocale.h: No such file or directory
 #include <xlocale.h>
                     ^
compilation terminated.
compilation terminated.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libgtest_main_intermediates/gtest_main.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libgtest_intermediates/gtest-all.o] Error 1

Any suggestions?

Thanks
Jianchun

在 2015年11月23日星期一 UTC+8下午10:12:04,shadyboss写道:

Wendong Li

unread,
Dec 1, 2015, 12:00:38 PM12/1/15
to android-...@googlegroups.com
Just for your information. I was using Xcode 7.1.

Regards,
Wendong

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/vhnftES4MN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anis

unread,
Jan 17, 2016, 1:58:29 PM1/17/16
to Android Building
Hello,
I tried to build 5.1.1_r14 with both Xcode 7.2 on OS X 10.11.2, with your MacOSX10.8.sdk copied from Xcode 5.1.1 to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, but failed with following errors:
(in my /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs I have MacOSX10.11.sdk MacOSX10.6.sdk MacOSX10.8.sdk)
Java SDK: jdk1.7.0_80.jdk

including ./system/security/softkeymaster/Android.mk ...

including ./system/vold/Android.mk ...

including ./tools/external/fat32lib/Android.mk ...

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

host C: libcutils_32 <= system/core/libcutils/config_utils.c

host C: libcutils_32 <= system/core/libcutils/cpu_info.c

host C: libcutils_32 <= system/core/libcutils/load_file.c

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

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

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

make: *** Waiting for unfinished jobs....


#### make failed to build some targets (03:22 (mm:ss)) ####



Thank you for your help

Regards
Anis

Ravi Subramanian

unread,
Apr 20, 2016, 10:47:58 PM4/20/16
to Android Building
I ran into similar problems building Android 5.1.1 for Hammerhead/Nexus 5 on El Capitan. This is what I did and it worked for me: http://stackoverflow.com/a/36709862/562139.
Reply all
Reply to author
Forward
0 new messages