Bug 11031 - ld-elf2flt: host/bin/ld.real': execvp: No such file or directory
Summary: ld-elf2flt: host/bin/ld.real': execvp: No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 critical
Target Milestone: ---
Assignee: Yann E. MORIN
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-23 10:14 UTC by Christophe Priouzeau
Modified: 2018-05-29 07:09 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Priouzeau 2018-05-23 10:14:17 UTC
With the rc of 2018.05 preparation, it's not possible to generate uclibc with a
stm32 build. 
During the installation of uclibc, the call to elf2flt crash:

  CC utils/getconf
ld.real (ld-elf2flt): error trying to exec '/mnt/internal_storage/stm32f7/buildroot_to_test/output/host/bin/ld.real': execvp: No such file or directory
collect2: error: ld returned 255 exit status

Setup: 
  VERSION of buildroot: 2018.05-rc2
  PC with Ubuntu 16.04

How to reproduce:
  git clone git://git.buildroot.net/buildroot
  cd buildroot
  git checkout -b work 2018.05-rc2
  make stm32f469_disco_defconfig
  make 

Trace of compilation are available on attached file.
Comment 1 Yann E. MORIN 2018-05-23 17:49:21 UTC
Hello Christophe,

Thanks for the report.

I've bisected this issue to the folowing commit:
    f9cffb6af464c5c049daa93d557e485ea61f14a8 binutils: replace hard-links with soft-links to fix rpath

I've added Thomas in cc of this bug now, as he already investigating the
reason for the offending commit in the first place.

Regards,
Yann E. MORIN.
Comment 2 Yann E. MORIN 2018-05-25 20:51:48 UTC
Hello Chritophe,

I've sent two patches to try and fix this issue:
    https://patchwork.ozlabs.org/patch/920759/
    https://patchwork.ozlabs.org/patch/920760/

I only tried to build stm32f469_disco_defconfig with them, and it
was OK. I can't test-run by lack of hardware, though, so it would
be nice if you could confirm they indeed fix the issue.

Regards,
Yann E. MORIN.
Comment 4 Christophe Priouzeau 2018-05-29 07:09:17 UTC
Hi Yann,
  I have made the test with the hardware and your patch.

  compilation with your patch: OK
  Test on board: KO

  I have made several verification:
    runtime execution with stm32f469 configuration:
      version of buildroot     - status
      2017.11                     OK
      2018.02                     KO
      2018.05-rc2                 KO

Error seen at runtime:
[    1.460000] Unhandled exception: IPSR = 00000006 LR = fffffff1
[    1.460000] CPU: 0 PID: 1 Comm: init Tainted: G        W       4.11.0 #2
[    1.460000] Hardware name: STM32 (Device Tree Support)
[    1.460000] task: 00822000 task.stack: 00828000
[    1.460000] PC is at ret_fast_syscall+0x2/0x4a
[    1.460000] LR is at tty_ioctl+0x327/0x7e4
[    1.460000] pc : [<08009942>]    lr : [<080c1013>]    psr: 4000000b
[    1.460000] sp : 00829fa8  ip : 0000001c  fp : 00a95600
[    1.460000] r10: 00000000  r9 : 00828000  r8 : 08009ae0
[    1.460000] r7 : 00000036  r6 : 00adcee0  r5 : 00000000  r4 : 00adcf3c
[    1.460000] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 00000000
[    1.460000] xPSR: 4000000b
[    1.460000] CPU: 0 PID: 1 Comm: init Tainted: G        W       4.11.0 #2
[    1.460000] Hardware name: STM32 (Device Tree Support)
[    1.460000] [<0800bdc5>] (unwind_backtrace) from [<0800b153>] (show_stack+0xb/0xc)
[    1.460000] [<0800b153>] (show_stack) from [<0800b717>] (__invalid_entry+0x4b/0x4c)

I will create a new bugzilla for the runtime issue.

regards
Christophe Priouzeau