Building SDK for Windows (froyo) doesn't even start

646 views
Skip to first unread message

François Droumaguet

unread,
Apr 28, 2011, 4:38:31 AM4/28/11
to Android Building
Hello,
This time I want to build the SDK for Windows, because most of the
people who will be using my custom SDK will be on Windows. But I can't
even start to build it.

So, I followed the instructions in the file /development/docs/
howto_build_SDK.txt, section 'Building an SDK for Windows'. And
everything here is done with the froyo branch.
I have my SDK compiled on Linux. I got Cygwin legacy 1.5 and all the
packages.

I also checked out the froyo branch. At the end I got this

Fetching projects: 100% (158/158), done.
Checking out files: 100% (2261/2261), done.
Checking out files: 100% (455/455), done. out files: 41% (188/455)
Checking out files: 100% (8690/8690), done.
Checking out files: 100% (9073/9073), done.ut files: 0% (58/9073)
Checking out files: 100% (2272/2272), done.ut files: 2% (61/2272)
Checking out files: 100% (434/434), done.g out files: 38% (169/434)
Checking out files: 100% (312/312), done.g out files: 16% (52/312)
Checking out files: 100% (962/962), done.g out files: 8% (85/962)
Checking out files: 100% (427/427), done.g out files: 41% (176/427)
Checking out files: 100% (323/323), done.g out files: 45% (148/323)
Checking out files: 100% (721/721), done.g out files: 23% (170/721)
Checking out files: 100% (1060/1060), done.out files: 6% (70/1060)
Checking out files: 100% (524/524), done.g out files: 28% (150/524)
Checking out files: 100% (568/568), done.g out files: 5% (34/568)
Checking out files: 100% (3358/3358), done.
Checking out files: 100% (322/322), done.g out files: 49% (159/322)
Checking out files: 100% (120/120), done.g out files: 30% (36/120)
Checking out files: 100% (4170/4170), done.out files: 6% (279/4170)
Checking out files: 100% (1138/1138), done.
Checking out files: 100% (704/704), done.g out files: 8% (61/704)
Checking out files: 100% (1326/1326), done.
Checking out files: 100% (634/634), done.g out files: 42% (267/634)
Checking out files: 100% (746/746), done.g out files: 43% (328/746)
Checking out files: 100% (643/643), done.g out files: 16% (104/643)
Checking out files: 100% (712/712), done.g out files: 19% (137/712)
Checking out files: 100% (634/634), done.g out files: 16% (104/634)
Checking out files: 100% (1006/1006), done.out files: 12% (125/1006)
Checking out files: 100% (9996/9996), done.out files: 1% (106/9996)
Checking out files: 100% (10074/10074), done.t files: 0% (9/10074)
Checking out files: 100% (4749/4749), done. out files: 6% (317/4749)
Checking out files: 100% (531/531), done.ng out files: 18% (99/531)
Checking out files: 100% (647/647), done.ng out files: 26% (174/647)
Checking out files: 100% (312/312), done.ng out files: 44% (140/312)
Checking out files: 100% (349/349), done.ng out files: 34% (120/349)
Checking out files: 100% (481/481), done.ng out files: 43% (207/481)
Checking out files: 100% (521/521), done.ng out files: 29% (156/521)
Checking out files: 100% (354/354), done.ng out files: 40% (143/354)
Checking out files: 100% (648/648), done.
Checking out files: 100% (486/486), done.ng out files: 6% (32/486)
4 [main] git 2852 C:\cygwin\bin\git.exe: *** fatal error - could
not load
shell32, Win32 error 487
Traceback (most recent call last):
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/main.py", line
238, in <mod
ule>
_Main(sys.argv[1:])
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/main.py", line
220, in _Mai
n
repo._Run(argv)
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/main.py", line
125, in _Run

cmd.Execute(copts, cargs)
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/subcmds/sync.py",
line 417,
in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/project.py", line
954, in S
ync_LocalHalf
self._InitWorkTree()
File "/home/pzgz9801/32_ANDROID_SOURCES/.repo/repo/project.py", line
1570, in
_InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree


But when I did another 'repo sync'...

$ repo sync
remote: Counting objects: 22, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 12 (delta 7), reused 0 (delta 0)
Unpacking objects: 100% (12/12), done.
From git://android.git.kernel.org/platform/cts
451b947..545e9b3 gingerbread -> korg/gingerbread
remote: Counting objects: 113, done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 74 (delta 47), reused 0 (delta 0)
Unpacking objects: 100% (74/74), done.
From git://android.git.kernel.org/platform/frameworks/base
17ba30b..13b21e6 master -> korg/master
Fetching projects: 74% (117/158) remote: Counting objects: 14, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 8 (delta 3), reused 4 (delta 1)
Unpacking objects: 100% (8/8), done.
From git://android.git.kernel.org/platform/packages/apps/Gallery3D
c6db749..a2c6e06 master -> korg/master
Fetching projects: 81% (128/158) remote: Counting objects: 14, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 8 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://android.git.kernel.org/platform/packages/apps/Settings
7fceefa..bc20d67 master -> korg/master
Fetching projects: 82% (130/158) remote: Counting objects: 14, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 8 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://android.git.kernel.org/platform/packages/apps/SoundRecorder
30fe588..7bdedbe master -> korg/master
Fetching projects: 95% (151/158) remote: Counting objects: 30, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 21 (delta 7), reused 0 (delta 0)
Unpacking objects: 100% (21/21), done.
From git://android.git.kernel.org/platform/prebuilt
88dd4e5..1f29113 master -> korg/master
Fetching projects: 96% (152/158) remote: Counting objects: 97, done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 69 (delta 40), reused 0 (delta 0)
Unpacking objects: 100% (69/69), done.
From git://android.git.kernel.org/platform/system/bluetooth
9bd9826..dad064d master -> korg/master
* [new tag] android-3.0_r1 -> android-3.0_r1
* [new tag] android-3.0_r1.1 -> android-3.0_r1.1
* [new tag] android-3.0_r1.2 -> android-3.0_r1.2
* [new tag] android-3.0_r1.3 -> android-3.0_r1.3
* [new tag] android-sdk-3.0_r1 -> android-sdk-3.0_r1
From git://android.git.kernel.org/platform/system/bluetooth
* [new tag] android-sdk-3.0-pre -> android-sdk-3.0-pre
remote: Counting objects: 36, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 25 (delta 16), reused 0 (delta 0)
Unpacking objects: 100% (25/25), done.
From git://android.git.kernel.org/platform/system/core
f819d02..a2842b6 master -> korg/master
Fetching projects: 100% (158/158), done.
Checking out files: 100% (1259/1259), done. out files: 9% (117/1259)
Checking out files: 100% (613/613), done.ng out files: 50% (310/613)
Checking out files: 100% (913/913), done.ng out files: 25% (235/913)
Syncing work tree: 100% (158/158), done.

Maybe there's an error here I don't know.

And when I tried to run the shell script to compile the SDK, here is
what I got :

$ development/build/tools/make_windows_sdk.sh /home/pzgz9801/android-
sdk_8_eng
.francois_linux-x86.zip /home/pzgz9801/32_SDK_WINDOWS

Using SDK pzgz9801-20110428-095613
Current values:
- Input SDK: /home/pzgz9801/android-sdk_8_eng.francois_linux-x86.zip
- Output dir: /home/pzgz9801/32_SDK_WINDOWS
- Temp dir: /cygdrive/c/WINDOWS/TEMP

Building...
including device/htc/dream/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/sapphire/vendorsetup.sh
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2.1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=MASTER
============================================
/bin/bash: prebuilt/windows/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
gcc.exe: No su
ch file or directory
build/core/main.mk:401: sdk-only: javac available.
build/core/java.mk:20: *** packages/apps/Music: Invalid
LOCAL_SDK_VERSION '8' Ch
oices are: current . Stop.
Error: Build failed
Aborting


I looked into the makefiles (I did not modify anything), to see that
the 'Choices' available for the LOCAL_SDK_VERSION were obtained by
checking the directories in /prebuilt/sdk/ . But I don't have these.
So should I add them? Is it because I had an error while checking out
the sources?

Thank you

François Droumaguet

unread,
May 3, 2011, 5:03:07 AM5/3/11
to Android Building
Hello,

I tried to run again the command to compile the SDK for Windows, but
without setting the PATH so it can find javac. And this time it began
to compile. But quickly, I had this error :

$ development/build/tools/make_windows_sdk.sh ~/android-
sdk_8_eng.francois_linu
x-x86.zip ~/32_SDK_WINDOWS/

Using SDK 8
Current values:
- Input SDK: /home/pzgz9801/android-sdk_8_eng.francois_linux-x86.zip
- Output dir: /home/pzgz9801/32_SDK_WINDOWS/
- Temp dir: /cygdrive/c/WINDOWS/TEMP

Building...
including device/htc/dream/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/sapphire/vendorsetup.sh
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2.1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=windows
HOST_BUILD_TYPE=release
BUILD_ID=MASTER
============================================
/bin/bash: prebuilt/windows/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
gcc.exe: No su
ch file or directory
which: no javac in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
cygdrive/c/WIND
OWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/
cygdrive/c/P
ROGRA~1/QUICKT~1/QTSystem/:/cygdrive/c/PROGRA~1/WI4507~1/:/cygdrive/c/
PROGRA~1/G
emalto/ACCESS~1/v5/:/cygdrive/c/PROGRA~1/TORTOI~1/bin)
build/core/main.mk:421: sdk-only: javac not available.
/bin/bash: prebuilt/windows/sdl/bin/sdl-config: No such file or
directory
/bin/bash: prebuilt/windows/sdl/bin/sdl-config: No such file or
directory

...

make: *** No rule to make target `out/host/windows-x86/bin/acp',
needed by `out/
host/windows-x86/bin/aapt.exe'. Stop.
Error: Build failed
Aborting

Is this because I don't have the arm-eabi-gcc.exe ? Because there is
no package for Cygwin with this .exe.

On 28 avr, 10:38, François Droumaguet <francois.droumag...@gmail.com>
wrote:

Ying Wang

unread,
May 3, 2011, 1:35:07 PM5/3/11
to android-...@googlegroups.com
We don't build winsdk with cygwin on windows these days, but with mingw on linux, see  development/build/tools/windows_sdk.mk.
Run this build command on Linux:
$make -j PRODUCT-sdk-win_sdk showcommands dist

 
--
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

François Droumaguet

unread,
May 10, 2011, 4:48:37 AM5/10/11
to Android Building
Hi
Thank you very much for your answer.
I did as you told me. But then, after some time of compilation, I have
these errors.
I think that it's because I have something missing on my host,
something I should install. But what? I'm thinking this because I hade
an similar error previously with zlib, and when I installed the zilbc
package the error was gone.

out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(exec.o): In function `cpu_exec_init_all':
/home/francois/32_ANDROID_SOURCES/external/qemu/exec.c:506: undefined
reference to `_cpu_gen_init'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(exec.o): In function `code_gen_alloc':
/home/francois/32_ANDROID_SOURCES/external/qemu/exec.c:495: undefined
reference to `_code_gen_max_block_size'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(exec.o): In function `tb_gen_code':
/home/francois/32_ANDROID_SOURCES/external/qemu/exec.c:931: undefined
reference to `_cpu_arm_gen_code'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(exec.o): In function `cpu_io_recompile':
/home/francois/32_ANDROID_SOURCES/external/qemu/exec.c:3715: undefined
reference to `_cpu_restore_state'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(exec.o): In function `check_watchpoint':
/home/francois/32_ANDROID_SOURCES/external/qemu/exec.c:2819: undefined
reference to `_cpu_restore_state'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(translate.o): In function `gen_pc_load':
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
9192: undefined reference to `_gen_opc_pc'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(translate.o): In function `tcg_gen_helperN':
/home/francois/32_ANDROID_SOURCES/external/qemu/tcg/tcg-op.h:336:
undefined reference to `_tcg_ctx'
/home/francois/32_ANDROID_SOURCES/external/qemu/tcg/tcg-op.h:336:
undefined reference to `_tcg_ctx'
/home/francois/32_ANDROID_SOURCES/external/qemu/tcg/tcg-op.h:336:
undefined reference to `_tcg_ctx'
/home/francois/32_ANDROID_SOURCES/external/qemu/tcg/tcg-op.h:336:
undefined reference to `_tcg_ctx'
/home/francois/32_ANDROID_SOURCES/external/qemu/tcg/tcg-op.h:336:
undefined reference to `_tcg_ctx'
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(translate.o):/home/francois/32_ANDROID_SOURCES/external/
qemu/tcg/tcg-op.h:336: more undefined references to `_tcg_ctx' follow
out/host/windows-x86/obj/STATIC_LIBRARIES/emulator-arm_intermediates/
emulator-arm.a(translate.o): In function
`gen_intermediate_code_internal':
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8962: undefined reference to `_gen_opc_buf'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8965: undefined reference to `_gen_opc_instr_start'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8970: undefined reference to `_gen_opc_icount'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8968: undefined reference to `_gen_opc_pc'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8969: undefined reference to `_gen_opc_instr_start'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
9009: undefined reference to `_gen_opc_buf'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
9103: undefined reference to `_gen_opc_buf'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
9105: undefined reference to `_gen_opc_instr_start'
/home/francois/32_ANDROID_SOURCES/external/qemu/target-arm/translate.c:
8992: undefined reference to `_tcg_ctx'
...
It continues for 100 more lines...
> ...
>
> plus de détails »

koba

unread,
May 10, 2011, 12:46:58 PM5/10/11
to Android Building
I tried, too

On Ubuntu 10.04 (x86_64),

$ repo init -b android-2.3.4_r1
$ repo sync

$ sudo apt-get install mingw32
$ make -j8 PRODUCT-sdk-win_sdk showcommands dist

It worked fine for me.



François Droumaguet

unread,
May 11, 2011, 4:17:51 AM5/11/11
to Android Building
Actually, I went up to see the first make error. Here it is :

build/tools/soslim/main.c(130): open(out/target/product/generic/
symbols/system/lib/libGLES_android.so): No such file or directory (2)
Install: out/host/linux-x86/framework/layoutlib_utils.jar
make: *** [out/target/product/generic/obj/lib/libGLES_android.so]
Error 1
make: *** Waiting for unfinished jobs....
out/host/linux-x86/bin/acp -fpt out/host/common/obj/JAVA_LIBRARIES/
cts_intermediates/javalib.jar out/host/linux-x86/framework/cts.jar
Install: out/host/linux-x86/framework/layoutopt.jar
out/host/linux-x86/bin/acp -fpt out/host/common/obj/JAVA_LIBRARIES/
apkbuilder_intermediates/javalib.jar out/host/linux-x86/framework/
apkbuilder.jar
out/host/linux-x86/bin/acp -fpt out/host/common/obj/JAVA_LIBRARIES/
ddms_intermediates/javalib.jar out/host/linux-x86/framework/ddms.jar
out/host/linux-x86/bin/acp -fpt out/host/common/obj/JAVA_LIBRARIES/
layoutlib_utils_intermediates/javalib.jar out/host/linux-x86/framework/
layoutlib_utils.jar
out/host/linux-x86/bin/acp -fpt out/host/common/obj/JAVA_LIBRARIES/
layoutopt_intermediates/javalib.jar out/host/linux-x86/framework/
layoutopt.jar
host Prebuilt: AdbWinApi (out/host/windows-x86/obj/STATIC_LIBRARIES/
AdbWinApi_intermediates/AdbWinApi.a)
Killing adb server so we can replace AdbWinApi.dll
host Prebuilt: AdbWinUsbApi (out/host/windows-x86/obj/EXECUTABLES/
AdbWinUsbApi_intermediates/AdbWinUsbApi.dll)
host Prebuilt: libSDL (out/host/windows-x86/obj/STATIC_LIBRARIES/
libSDL_intermediates/libSDL.a)
/bin/bash: adb: command not found
adb appears to be missing
host Prebuilt: libSDLmain (out/host/windows-x86/obj/STATIC_LIBRARIES/
libSDLmain_intermediates/libSDLmain.a)
true
make[1]: Nothing to be done for `aidl'.
make[1]: Nothing to be done for `dmtracedump'.
make[1]: Nothing to be done for `hprof-conv'.
make[1]: Nothing to be done for `mksdcard'.
make[1]: Nothing to be done for `sdklauncher'.
make[1]: Nothing to be done for `sqlite3'.
target Prebuilt: (out/target/product/generic/system/etc/security/
cacerts.bks)
host Executable: zipalign (out/host/windows-x86/obj/EXECUTABLES/
zipalign_intermediates/zipalign.exe)
true
host Prebuilt: AdbWinApi (out/host/windows-x86/obj/EXECUTABLES/
AdbWinApi_intermediates/AdbWinApi.dll)
host Executable: etc1tool (out/host/windows-x86/obj/EXECUTABLES/
etc1tool_intermediates/etc1tool.exe)
host Executable: dexdump (out/host/windows-x86/obj/EXECUTABLES/
dexdump_intermediates/dexdump.exe)
true
host Executable: aapt (out/host/windows-x86/obj/EXECUTABLES/
aapt_intermediates/aapt.exe)
make[1]: Nothing to be done for `prebuilt'.
make[1]: Nothing to be done for `adb'.
make[1]: Nothing to be done for `fastboot'.
host Executable: emulator (out/host/windows-x86/obj/EXECUTABLES/
emulator_intermediates/emulator.exe)
out/host/windows-x86/obj/STATIC_LIBRARIES/libz_intermediates/
libz.a(inflate.o): In function `inflate':
/home/francois/32_ANDROID_SOURCES/external/zlib/inflate.c:866:
undefined reference to `_inflate_table'
/home/francois/32_ANDROID_SOURCES/external/zlib/inflate.c:932:
undefined reference to `_inflate_table'
/home/francois/32_ANDROID_SOURCES/external/zlib/inflate.c:941:
undefined reference to `_inflate_table'
collect2: ld returned 1 exit status
make[1]: *** [out/host/windows-x86/obj/EXECUTABLES/
zipalign_intermediates/zipalign.exe] Error 1
make[1]: *** Waiting for unfinished jobs....
out/host/windows-x86/obj/STATIC_LIBRARIES/libpng_intermediates/
libpng.a(png.o): In function `png_check_cHRM_fixed':
/home/francois/32_ANDROID_SOURCES/external/libpng/png.c:906: undefined
reference to `_png_warning'
/home/francois/32_ANDROID_SOURCES/external/libpng/png.c:940: undefined
reference to `_png_warning'
.......
And then a heap of lines with undefined reference errors.

François Droumaguet

unread,
May 17, 2011, 3:25:52 AM5/17/11
to Android Building
Okay, so I was compiling on a virtual machine. I tried then to compile
on the machine where I usually work, and it worked just fine. I don't
know what was missing though.
Anyway, thank you again, now my work is useful to moy colleagues!

On 11 mai, 10:17, François Droumaguet <francois.droumag...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages