[Aries-L] build error when trying to build from scratch: MODULE.HOST.EXECUTABLES.mkqcdtbootimg already defined by hardware/sony/mkqcdtbootimg

RESOLVED WORKSFORME

Status

Firefox OS
GonkIntegration
RESOLVED WORKSFORME
3 years ago
3 years ago

People

(Reporter: nhirata, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Error when build:
build/core/base_rules.mk:158: *** vendor/sony/system/mkqcdtbootimg: MODULE.HOST.EXECUTABLES.mkqcdtbootimg already defined by hardware/sony/mkqcdtbootimg.  Stop.


Two definitions for mkqcdrboot.img
I renamed the vendor file to see what would happen.  It turned out I ran into 2 other of the similar instances:
mv vendor/sony/system/mkqcdtbootimg/Android.mk vendor/sony/system/mkqcdtbootimg/libfdt/Android.mk.bak
mv vendor/sony/system/mkqcdtbootimg/libfdt/Android.mk vendor/sony/system/mkqcdtbootimg/libfdt/Android.mk.bak
mv vendor/sony/system/thermanager/Android.mk vendor/sony/system/thermanager/Android.mk.bak
Came out with more build errors, later on:
make[1]: Leaving directory `/home/nhirata/Projects/B2G_Aries_L2/kernel'
out/host/linux-x86/bin/acp -fp /home/nhirata/Projects/B2G_Aries_L2/out/target/product/aries/obj/KERNEL_OBJ/arch/arm/boot/dts/*.dtb out/target/product/aries/dtbs/
make  -C kernel O=/home/nhirata/Projects/B2G_Aries_L2/out/target/product/aries/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/nhirata/Projects/B2G_Aries_L2/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" modules
make[1]: Entering directory `/home/nhirata/Projects/B2G_Aries_L2/kernel'

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[2]: *** [modules] Error 1
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/nhirata/Projects/B2G_Aries_L2/kernel'
make: [TARGET_KERNEL_BINARIES] Error 2 (ignored)
make  -C kernel O=/home/nhirata/Projects/B2G_Aries_L2/out/target/product/aries/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE="/home/nhirata/Projects/B2G_Aries_L2/prebuilts/misc/linux-x86/ccache/ccache arm-eabi-" modules_install
make[1]: Entering directory `/home/nhirata/Projects/B2G_Aries_L2/kernel'

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[2]: *** [modules_install] Error 1
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/nhirata/Projects/B2G_Aries_L2/kernel'
make: [TARGET_KERNEL_BINARIES] Error 2 (ignored)
mdpath=`find out/target/product/aries/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do arm-eabi-strip --strip-unneeded $i; mv $i out/target/product/aries/system/lib/modules/; done; fi
mdpath=`find out/target/product/aries/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi

real	13m21.897s
user	36m11.176s
sys	5m37.074s

> Build failed! <

Build with |./build.sh -j1| for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
mv hardware/sony/mkqcdtbootimg/Android.mk hardware/sony/mkqcdtbootimg/Android.mk.bak
mv hardware/sony/mkqcdtbootimg/libfdt/Android.mk hardware/sony/mkqcdtbootimg/libfdt/Android.mk.bak
mv hardware/sony/thermanager/Android.mk hardware/sony/thermanager/Android.mk.bak

I decide to mv the other stuff and I was able to build.

I think this came from a recent change?
Flags: needinfo?(lissyx+mozillians)
We moved some repos. Make sure you have everything properly synced, it looked like you have duplicated paths.
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(lissyx+mozillians)
Alexandre, I had completely create the folder from scratch to be sure that it wasn't me.  Could you please relook at the issue?
And for clarity when I say folder, I mean the whole B2G repo from scratch.
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #6)
> And for clarity when I say folder, I mean the whole B2G repo from scratch.

Did you "rm -rf B2G/" ? Do you have uptodate manifests ? The new paths are indeed in hardware/, you should not have them still leaving in vendor/sony etc.
Flags: needinfo?(lissyx+mozillians)
Make sure you kill vendor/sony/system, this should not exist anymore and it's repo's tool job to get rid of it. I'm doing a fresh git clone on a fresh machine (Mac) and I clearly don't see it being pulled.
So, brand new git clone of B2G/ and config.sh of aries-l on a brand new Mac, no issue. I think you just got unlucky and |repo sync| should have removed the vendor/sony/system thing. I'll let it open until you confirm it's fixed :)
Flags: needinfo?(nhirata.bugzilla)
Confirmed that I was unlucky.  I redownloaded the AOSP zip file and then unpacked it, rebuilt my backup folder using Android Lollipop on the device and it worked.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(nhirata.bugzilla)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.