Building master branch fails on mac OSX.

1,560 views
Skip to first unread message

Chandra Sekhar Nayak

unread,
Oct 30, 2014, 8:57:07 AM10/30/14
to android-...@googlegroups.com
I am trying to build the master branch, but its failing with following error:


host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp

In file included from frameworks/base/tools/validatekeymaps/Main.cpp:17:

In file included from frameworks/native/include/input/KeyCharacterMap.h:26:

In file included from frameworks/native/include/input/Input.h:25:

system/core/include/utils/Vector.h:20:10: fatal error: 'new' file not found

#include <new>

         ^

1 error generated.

make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/Main.o] Error 1


\e[0;31m#### make failed to build some targets (01:43 (mm:ss)) ####\e[00m


Anybody has any idea, how to solve this?

HC Yen

unread,
Nov 6, 2014, 7:41:08 PM11/6/14
to android-...@googlegroups.com
I fix the build problem with following modification. Tested with OS X 10.10 Yosemite and Xcode 6.1.


project build/

diff --git a/build/core/combo/HOST_darwin-x86.mk b/build/core/combo/HOST_darwin-x86.mk

index 7ea0099..7fa48ff 100644

--- a/build/core/combo/HOST_darwin-x86.mk

+++ b/build/core/combo/HOST_darwin-x86.mk

@@ -43,6 +43,7 @@ $(combo_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG := $($(combo_2nd_arch_prefix)HO

 $(combo_2nd_arch_prefix)HOST_AR := $(AR)

 

 $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version)

+$(combo_2nd_arch_prefix)HOST_GLOBAL_CPPFLAGS += -isystem $(mac_sdk_path)/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1

 $(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)

 

 $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables

diff --git a/build/core/combo/HOST_darwin-x86_64.mk b/build/core/combo/HOST_darwin-x86_64.mk

index ae06d59..c06933d 100644

--- a/build/core/combo/HOST_darwin-x86_64.mk

+++ b/build/core/combo/HOST_darwin-x86_64.mk

@@ -43,6 +43,7 @@ HOST_TOOLCHAIN_FOR_CLANG := $(HOST_TOOLCHAIN_ROOT)

 HOST_AR := $(AR)

 

 HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) -DMACOSX_DEPLOYMENT_TARGET=$(mac_sdk_version)

+HOST_GLOBAL_CPPFLAGS += -isystem $(mac_sdk_path)/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1

 HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)

 

 HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables

diff --git a/build/core/combo/mac_version.mk b/build/core/combo/mac_version.mk

index b49feee..6defba7 100644

--- a/build/core/combo/mac_version.mk

+++ b/build/core/combo/mac_version.mk

@@ -9,7 +9,7 @@ ifndef build_mac_version

 

 build_mac_version := $(shell sw_vers -productVersion)

 

-mac_sdk_versions_supported :=  10.6 10.7 10.8

+mac_sdk_versions_supported :=  10.6 10.7 10.8 10.9

 ifneq ($(strip $(MAC_SDK_VERSION)),)

 mac_sdk_version := $(MAC_SDK_VERSION)

 ifeq ($(filter $(mac_sdk_version),$(mac_sdk_versions_supported)),)


project system/core/

diff --git a/system/core/adb/Android.mk b/system/core/adb/Android.mk

index a82f026..49c49ea 100644

--- a/system/core/adb/Android.mk

+++ b/system/core/adb/Android.mk

@@ -24,7 +24,7 @@ ifeq ($(HOST_OS),darwin)

   USB_SRCS := usb_osx.c

   EXTRA_SRCS := get_my_path_darwin.c

   LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit -framework Carbon

-  LOCAL_CFLAGS += -Wno-sizeof-pointer-memaccess -Wno-unused-parameter

+  LOCAL_CFLAGS += -Wno-deprecated-declarations -Wno-sizeof-pointer-memaccess -Wno-unused-parameter

 endif

 

 ifeq ($(HOST_OS),freebsd)

diff --git a/system/core/fastboot/Android.mk b/system/core/fastboot/Android.mk

index 112bd02..1881a97 100644

--- a/system/core/fastboot/Android.mk

+++ b/system/core/fastboot/Android.mk

@@ -31,7 +31,7 @@ ifeq ($(HOST_OS),darwin)

   LOCAL_SRC_FILES += usb_osx.c util_osx.c

   LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit \

  -framework Carbon

-  LOCAL_CFLAGS += -Wno-unused-parameter

+  LOCAL_CFLAGS += -Wno-deprecated-declarations -Wno-unused-parameter

 endif

 

 ifeq ($(HOST_OS),windows)

diff --git a/system/core/include/utils/Unicode.h b/system/core/include/utils/Unicode.h

index 5b98de2..5bb2312 100644

--- a/system/core/include/utils/Unicode.h

+++ b/system/core/include/utils/Unicode.h

@@ -24,9 +24,17 @@ extern "C" {

 

 // Definitions exist in C++11

 #if defined __cplusplus && __cplusplus < 201103L

+#ifdef __STDC_UTF_32__

+typedef __char32_t char32_t;

+#else

 typedef uint32_t char32_t;

+#endif

+#ifdef __STDC_UTF_16__

+typedef __char16_t char16_t;

+#else

 typedef uint16_t char16_t;

 #endif

+#endif

 

 // Standard string functions on char16_t strings.

 int strcmp16(const char16_t *, const char16_t *);

Al Sutton

unread,
Nov 7, 2014, 9:53:57 AM11/7/14
to android-...@googlegroups.com
Have you submitted the patch to Gerrit? (http://source.android.com/source/submit-patches.html)

-- 
Al Sutton
Funky Android Ltd.
(funkyandroid.com)

The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, its associates, or its subsidiaries. 


--
--
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 the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chandra Sekhar Nayak

unread,
Nov 9, 2014, 1:33:37 AM11/9/14
to android-...@googlegroups.com
Is your Yosemite is a 32 bit OS?

Chandra Sekhar Nayak

unread,
Nov 9, 2014, 7:13:22 AM11/9/14
to android-...@googlegroups.com
Thanks a lot HC. Your solution worked for me. But in the middle i got the below error:

ERROR: unable to process assets while packaging 'out/target/product/generic/obj/APPS/LatinIME_intermediates/package.apk'

java.io.IOException: No space left on device

at java.io.FileOutputStream.writeBytes(Native Method)

at java.io.FileOutputStream.write(FileOutputStream.java:345)

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)

at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)

at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)

at sun.tools.jar.Main.addFile(Main.java:742)

at sun.tools.jar.Main.create(Main.java:491)

at sun.tools.jar.Main.run(Main.java:201)

at sun.tools.jar.Main.main(Main.java:1177)

make: *** [out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar] Error 1


I guess it's because of less space in my case-sensitive drive. How much space is necessary to build AOSP? Mine is 50 GB now. Can I increase it's space to continue from where the build broke or I need to recreate a new case-sensitive drive with a larger space and redo all the stuffs I did earlier?


Your help will be appreciable.


On Friday, 7 November 2014 06:11:08 UTC+5:30, HC Yen wrote:

Al Sutton

unread,
Nov 10, 2014, 10:15:30 AM11/10/14
to android-...@googlegroups.com
Anyone trying HCs’ original patch should be aware that a commit went in over the weekend[1] which makes the changes to system/core/include/utils/Unicode.h unnecessary.

I’ve uploaded a couple of patches to Gerrit which should make finding these changes easier for people;

https://android-review.googlesource.com/113793
https://android-review.googlesource.com/113804

Al.

[1] - https://android.googlesource.com/platform/system/core/+/2f5ad5ff8623604ac2e7fa0b704287511acea1e2
--
Al Sutton
Funky Android Ltd.
(funkyandroid.com)

The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, its associates, or its subsidiaries.


Shawn Schaerer

unread,
Nov 17, 2014, 4:21:24 PM11/17/14
to android-...@googlegroups.com
I am also getting new errors building the master branch (sync'd at 12PM today).

I get the following errors

/Developer/SDKs/MacOSX10.6.sdk/usr/include/mach-o/getsect.h:83:17: note: candidate function not viable: no known conversion from 'const mach_header *' to 'const struct mach_header_64 *' for 1st argument

extern uint8_t *getsectiondata(

                ^

1 error generated.

make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/src/Unwind/Unwind_AppleExtras.o] Error 1


#### make failed to build some targets (02:59 (mm:ss)) ####



I am running Xcode 6.1 + OSX10.10.  I had to symlink my 10.10 SDK to 10.6


Ideas?

Alan Jeon

unread,
Nov 18, 2014, 6:51:09 PM11/18/14
to android-...@googlegroups.com
I added some reviewers. 

Al Sutton

unread,
Nov 20, 2014, 2:04:25 AM11/20/14
to android-...@googlegroups.com
Thanks Alan.

One of the patches has been merged into the master branch, which means no modifications are now necessary to system/core (https://android.googlesource.com/platform/system/core/+/f456d47c506d87265ce0ff6080cba5374dced011).

Avtar Singh

unread,
Nov 21, 2014, 5:22:18 AM11/21/14
to android-...@googlegroups.com
I did not make any symbolic link. I patched build/core/combo/mac_version.mk by adding the following line (as noted in the patch of H C Yen in this thread):

mac_sdk_versions_supported :=  10.6 10.7 10.8 10.9 10.10

However, I am now stuck at

host C++: libinput_32 <= frameworks/native/libs/input/Input.cpp
In file included from system/core/include/cutils/log.h:1,
                 from system/core/include/utils/KeyedVector.h:24,
                 from frameworks/native/include/input/Input.h:26,
                 from frameworks/native/libs/input/Input.cpp:23:
system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory

So, I modified the following line in build/core/combo/HOST_darwin-x86-64.mk (I am building lunch aosp_arm64-eng) 

ifeq ($(mac_sdk_version),10.8)
# Mac SDK 10.8 no longer has stdarg.h, etc

to

ifeq ($(mac_sdk_version),10.10)
# Mac SDK 10.8 no longer has stdarg.h, etc

but the error stays. Has anyone succeeded in build the master branch on Yosemite with Xcode 6.1? Any help?

- Av

Al Sutton

unread,
Nov 21, 2014, 11:39:25 AM11/21/14
to android-...@googlegroups.com
If you re-sync with master you’ll be able to build without any modifications. A few commits have been merged in the last couple of days which fix all the issues you’re seeing.

If you’re sync doesn’t include https://android.googlesource.com/platform/build/+/1199f7388cb608e7b1ca7b1677bd8535f3ec087b then something upstream is blocking you from getting all the commits from the Google servers.

Al.
-- 
Al Sutton
Funky Android Ltd.
(funkyandroid.com)

The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, its associates, or its subsidiaries. 


Avtar Singh

unread,
Nov 25, 2014, 1:06:23 AM11/25/14
to android-...@googlegroups.com
Thanks, AI. Resync also did not help. So, looks like the servers in my zone are not yet replicated to push those changes. However, I got the committed files explicitly (change id #113793, https://android-review.googlesource.com/#/c/113793/) and was able to continue on from the original errors until I got stuck at some dependency on "protobuf" module. I guess, I will check whether older branches build fine and wait for sometime before resyncing with the servers again.

- Av

Summersmd

unread,
Nov 26, 2014, 10:23:26 PM11/26/14
to android-...@googlegroups.com

I’m trying to build Android 5.0 on OS X Yosemite and am able to compile it with a bunch of warnings but when I try to run the emulator, I get the following error:

dyld: Symbol not found: _code_profile_dirname
Referenced from: /Volumes/android/WORKING_DIRECTORY/prebuilts/android-emulator/darwin-x86_64/emulator64-arm
Expected in: flat namespace
in /Volumes/android/WORKING_DIRECTORY/prebuilts/android-emulator/darwin-x86_64/emulator64-arm
Trace/BPT trap: 5

I followed the instructions at http://source.android.com/source/building-running.html to configure my build environment and execute the build.

Any suggestions?

Chitrang Talaviya

unread,
May 29, 2015, 3:26:07 PM5/29/15
to android-...@googlegroups.com

host C++: libinput_32 <= frameworks/native/libs/input/InputDevice.cpp

In file included from system/core/include/cutils/log.h:1,

                 from system/core/include/utils/KeyedVector.h:24,

                 from frameworks/native/include/input/Input.h:26,

                 from frameworks/native/include/input/KeyCharacterMap.h:26,

                 from frameworks/base/tools/validatekeymaps/Main.cpp:17:

system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory

In file included from system/core/include/cutils/log.h:1,

                 from system/core/include/utils/KeyedVector.h:24,

                 from frameworks/native/include/input/Input.h:26,

                 from frameworks/native/include/input/InputDevice.h:20,

                 from frameworks/native/libs/input/InputDevice.cpp:23:

system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory

In file included from system/core/include/cutils/log.h:1,

                 from system/core/include/utils/KeyedVector.h:24,

                 from frameworks/native/include/input/Input.h:26,

                 from frameworks/native/libs/input/Input.cpp:23:

system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory

make: *** [out/host/darwin-x86/obj32/EXECUTABLES/validatekeymaps_intermediates/Main.o] Error 1

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

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

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

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.


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


Can you help me out?

Chitrang Talaviya

unread,
May 29, 2015, 3:26:10 PM5/29/15
to android-...@googlegroups.com
Hey Chandra Shekar Nayak 
 
I am also building lollipop 5.0.0_r4.0.1 on Mac OS X with Xcode 6.1

I am getting the similar kind of error but, I am getting at \e[0;31m#### make failed to build some targets (06:32 (mm:ss)) ####\e[00m. Have you found the solution?


On Thursday, October 30, 2014 at 5:57:07 AM UTC-7, Chandra Sekhar Nayak wrote:
Reply all
Reply to author
Forward
0 new messages