Openwide-Ingenierie / buildroot-submodule

Example of use of buildroot as a submodule
GNU General Public License v3.0
33 stars 9 forks source link

Issues with using Makefile.toolchain #6

Open thejpster opened 6 years ago

thejpster commented 6 years ago

If you follow the instructions around using make -f Makefile.toolchain toolchain, but you don't commit the ./toolchain/output directory, you will get a build error when subsequently running make -f Makefile.toolchain toolchain in a fresh checkout.

Executing make -f Makefile.toolchain oldconfig first seems to make things work. It might be useful to add this to the README.

boucman commented 6 years ago

hmm, the idea behind buildroot-submodule is that you should never commit the output directory... what is the exact error you see ? that sounds weird...

thejpster commented 6 years ago
$ make -f Makefile.toolchain toolchain > >(tee toolchain.log |grep '>>>') 2>&1 || { # collapsed multi-line command
Failed build last output
make -C /builds/p3411/cerberus/linux-image/buildroot  O=/builds/p3411/cerberus/linux-image/toolchain/output BR2_EXTERNAL=/builds/p3411/cerberus/linux-image PROJECT_NAME=toolchain BR2_DEFCONFIG=/builds/p3411/cerberus/linux-image/toolchain/defconfig toolchain
  GEN     /builds/p3411/cerberus/linux-image/toolchain/output/Makefile
Makefile:864: *** Please configure Buildroot first (e.g. "make menuconfig").  Stop.
common.mk:70: recipe for target '_all' failed
make: *** [_all] Error 2

But actually there's a bigger problem. Once the toolchain is built, you get this error when running make

>>> toolchain-external-linaro-arm 2017.11 Configuring
Cannot execute cross-compiler '/builds/p3411/cerberus/linux-image/toolchain/output/host/usr/bin/arm-linux-gnueabihf-gcc.br_real'
package/pkg-generic.mk:213: recipe for target '/builds/p3411/cerberus/linux-image/output/build/toolchain-external-linaro-arm-2017.11/.stamp_configured' failed
make[2]: *** [/builds/p3411/cerberus/linux-image/output/build/toolchain-external-linaro-arm-2017.11/.stamp_configured] Error 1
Makefile:79: recipe for target '_all' failed
make[1]: *** [_all] Error 2
common.mk:41: recipe for target 'default' failed
make: *** [default] Error 2
JulienVdG commented 6 years ago

I think the key is the last note: use make oldconfig then make toolchain.From what I recall we don't have the automatic make oldconfig for that target and buildroot neither. I'm mostly using the toolchain with gdb so I do a regular build but I think I've seen this issue already.Le 8 juin 2018 4:11 PM, Boucman notifications@github.com a écrit :hmm, the idea behind buildroot-submodule is that you should never commit the output directory... what is the exact error you see ? that sounds weird...

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.