Bug 12656

Summary: bison fails to relocate with relocate-sdk.sh
Product: buildroot Reporter: Marcelo Roberto Jimenez <marcelo.jimenez>
Component: OtherAssignee: Thomas Petazzoni <thomas.petazzoni>
Status: RESOLVED FIXED    
Severity: major CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2019.11   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Marcelo Roberto Jimenez 2020-03-17 14:16:49 UTC
Hi,

I am having a problem while compiling the linux kernel with a toolchain generated by buildroot. The git tag for the toolchain build is "2019.11":

PIG_KERNEL_MAKE=/home/user/prog/scripts/pig-kmake.sh --ccache /home/user/prog/tmp/arm /home/user/prog/tmp/linux ARCH=arm CROSS_COMPILE=arm-buildroot-linux-gnueabi-
PWD=/home/user/prog
kernel defconfig ........................................................ [Fail(B]
/home/user/prog/scripts/pig-kmake.sh --ccache /home/user/prog/tmp/arm /home/user/prog/tmp/linux ARCH=arm CROSS_COMPILE=arm-buildroot-linux-gnueabi- cpti-arietta_defconfig
make[1]: Entering directory '/home/user/prog/tmp/arm'
  GEN     ./Makefile
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
bison: /home/user/buildroot/output/host/share/bison/m4sugar/m4sugar.m4: cannot open: No such file or directory
make[2]: *** [scripts/Makefile.lib:196: scripts/kconfig/zconf.tab.c] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/user/prog/linux/Makefile:534: cpti-arietta_defconfig] Error 2
make[1]: Leaving directory '/home/user/prog/tmp/arm'
make: *** [Makefile:146: sub-make] Error 2

The problem seems to be the same as the one reported here: https://github.com/bootlin/toolchains-builder/issues/17

The toolchain has been generated in one machine and is beeing used in another different machine. Somehow bison still keeps its absolute path dependency.

Best regards,
Marcelo.
Comment 1 Marcelo Roberto Jimenez 2020-03-17 14:20:30 UTC
Also, a suggestion for a quick workaround while the bug is being addressed is welcome ;)

Regards,
Marcelo.
Comment 2 Thomas Petazzoni 2020-05-18 06:27:38 UTC
Thanks for your bug report, I have submitted https://patchwork.ozlabs.org/project/buildroot/patch/20200518062648.1744905-1-thomas.petazzoni@bootlin.com/ to fix it.
Comment 3 Yann E. MORIN 2020-05-19 19:25:22 UTC
Marcelo, All,

Fixed with the patch from Thomas applied to master.

Thanks for the report!

Regards,
Yann E. MORIN.