9.2.1: Linking with LTO produces erros unless -save-temps

Bug #1853451 reported by Michał Fita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Unassigned

Bug Description

Building my complex project with LTO enabled with 2019-q4 toolchain leads to bunch of errors at linking stage:

The system cannot find the path specified.
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans28.ltrans.o] Error 1 (ignored)
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans24.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans30.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans8.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans5.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans3.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans13.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans1.ltrans.o] Error 1 (ignored)
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans26.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans32.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans0.ltrans.o] Error 1 (ignored)
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans14.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans20.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans6.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans25.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans23.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans33.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans31.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans15.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans4.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans18.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans16.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans17.ltrans.o] Error 1 (ignored)
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans10.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans37.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans22.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans36.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans12.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans9.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans7.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans27.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans11.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans21.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans34.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans38.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans29.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans35.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans2.ltrans.o] Error 1 (ignored)
The system cannot find the path specified.
make[2]: [c:\Projects\Complex\Build\Temp\Complex.elf.TsjAGF.ltrans19.ltrans.o] Error 1 (ignored)

But adding `-save-temps` to `LD_FLAGS` makes these errors disappear.

As far as I remember MinGW had some issues with temporary files in the past, so definitely this issue takes place here... like temp files removed too early?

Tags: lto
tags: added: lto
description: updated
Revision history for this message
Joey Ye (jinyun-ye) wrote :

Michal, may you provide information helping us to reproduce this issue please?

Thanks,
Joey

Revision history for this message
Michał Fita (michal.fita) wrote :

Working on that, Joey. But our project is large and making attempts on small sample to recreate the issue is rather tedious task. I managed on the other one with `static constexpr` so I think I'll manage with this one as well.

Revision history for this message
Michał Fita (michal.fita) wrote :

Gotcha! The original example had -save-temps left in build.bat, I removed and voilà, that's what I'm getting at the linking stage:

The system cannot find the path specified.
make: [C:\Users\SESA40~1\AppData\Local\Temp\application.elf.3vHzAa.ltrans0.ltrans.o] Error 1 (ignored)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.