Build fails for Android JB422_100

cancel
Showing results for 
Search instead for 
Did you mean: 

Build fails for Android JB422_100

Jump to solution
3,559 Views
andreygelman
Contributor III

I'm building the recent Android release - JB422_100 - for SabreSD platform on Ubuntu 12.04.

The build fails with:

/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_nl80211.o: in function wpa_driver_nl80211_init:external/wpa_supplicant_6/wpa_supplicant/src/drivers/driver_nl80211.c:1510: error: undefined reference to 'nl_handle_destroy'

collect2: ld returned 1 exit status

make: *** [out/target/product/sabresd_6dq/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant] Error 1


If I totally delete external/wpa_supplicant_6, this error disappears, but this one emerges:

make: *** No rule to make target `out/target/product/sabresd_6dq/obj/SHARED_LIBRARIES/libwpa_client_intermediates/export_includes', needed by `out/target/product/sabresd_6dq/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/import_includes'.  Stop.

There are additional problems that I have, somehow, figured out the solution.

Previously I have successfully built Android 4.0.4 and I did not have half these problems.

Any help will be greatly appreciated !

Labels (3)
0 Kudos
1 Solution
165 Views
andreygelman
Contributor III

I have eventually figured out how Android JellyBean can be built on Ubuntu 12.04.

It all boils down to 2.5 to 3 issues:

1. To compile correctly external/mtd-utils, I had to copy locally liblzo2, libuuid for i386, and add the path to LOCAL_LDFLAGS in external/mtd-utils/mkfs.ubifs/Android.mk

2. This part is tricky ...

SabreSD board is not equipped with Wi-Fi, however if one merely removes "BOARD_WLAN_VENDOR := ATHEROS" line in device/fsl/sabresd_6dq/BoardConfig.mk, the Android build system will attempt to compile wpa_supplicant_6, which is so outdated, that it simply cannot be compiled these days.

Put

"WPA_SUPPLICANT_VERSION := VER_0_8_X"

"BOARD_WPA_SUPPLICANT_DRIVER := WEXT"

"BOARD_HOSTAPD_DRIVER := WEXT"

to build wpa_supplicant with no specific hardware support.

2.5 When building the whole system use "make" (as opposed to "make -j<num-cpus>"), because there are some unclear dependencies that will be broken by parallel compilation, but this is something I can currently live with.

...

Kinda so ...

View solution in original post

0 Kudos
7 Replies
165 Views
YixingKong
Senior Contributor IV

Andrey, have you got the issue fixed? If yes, please click Correct Answer.

Thanks,

Yixing

0 Kudos
166 Views
andreygelman
Contributor III

I have eventually figured out how Android JellyBean can be built on Ubuntu 12.04.

It all boils down to 2.5 to 3 issues:

1. To compile correctly external/mtd-utils, I had to copy locally liblzo2, libuuid for i386, and add the path to LOCAL_LDFLAGS in external/mtd-utils/mkfs.ubifs/Android.mk

2. This part is tricky ...

SabreSD board is not equipped with Wi-Fi, however if one merely removes "BOARD_WLAN_VENDOR := ATHEROS" line in device/fsl/sabresd_6dq/BoardConfig.mk, the Android build system will attempt to compile wpa_supplicant_6, which is so outdated, that it simply cannot be compiled these days.

Put

"WPA_SUPPLICANT_VERSION := VER_0_8_X"

"BOARD_WPA_SUPPLICANT_DRIVER := WEXT"

"BOARD_HOSTAPD_DRIVER := WEXT"

to build wpa_supplicant with no specific hardware support.

2.5 When building the whole system use "make" (as opposed to "make -j<num-cpus>"), because there are some unclear dependencies that will be broken by parallel compilation, but this is something I can currently live with.

...

Kinda so ...

View solution in original post

0 Kudos
165 Views
JackLee1z
NXP Employee
NXP Employee

Hi Andrey,

Did you follow section 2.1 "Set Up Your Computer" in the Android User Guide? Here are two steps you need to do correctly:

BR,
Jack

0 Kudos
165 Views
LeonardoSandova
Specialist I

Try to build using an Ubuntu 10.04 box. Newer Ubuntu versions have not been fully tested.

165 Views
andreygelman
Contributor III

No problem. I have built a 10.04 virtual machine. Now it fails with:

external/mtd-utils/mkfs.ubifs/mkfs.ubifs.c: In function ‘write_super’:

external/mtd-utils/mkfs.ubifs/mkfs.ubifs.c:1902: warning: implicit declaration of function ‘uuid_generate_random’

external/mtd-utils/mkfs.ubifs/mkfs.ubifs.c:1906: warning: implicit declaration of function ‘uuid_unparse_upper’

make: *** [out/host/linux-x86/obj/EXECUTABLES/mkfs.ubifs_intermediates/mkfs.ubifs.o] Error 1

0 Kudos
165 Views
Chris1z
Contributor III

Andrey,

Try adding these packages..

sudo apt-get install liblzo2-dev uuid-dev

165 Views
andreygelman
Contributor III

Thanks, now it fails with

/mnt/host/Work/jb-4-imx6/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sabresd_6dq/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_nl80211.o: in function wpa_driver_nl80211_init:external/wpa_supplicant_6/wpa_supplicant/src/drivers/driver_nl80211.c:1435: error: undefined reference to 'nl_handle_alloc_cb'

/mnt/host/Work/jb-4-imx6/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sabresd_6dq/obj/EXECUTABLES/wpa_supplicant_intermediates/src/drivers/driver_nl80211.o: in function wpa_driver_nl80211_init:external/wpa_supplicant_6/wpa_supplicant/src/drivers/driver_nl80211.c:1510: error: undefined reference to 'nl_handle_destroy'

collect2: ld returned 1 exit status

make: *** [out/target/product/sabresd_6dq/obj/EXECUTABLES/wpa_supplicant_intermediates/LINKED/wpa_supplicant] Error 1

(*)

Libnl is installed ...


0 Kudos