do anyone know how this building problem occured?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

do anyone know how this building problem occured?

2,332 Views
harry_liang
Contributor II

c:/nxp/mcuxpressoide_11.2.0_4120/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.2.0.202001021529/tools/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lMIMXRT1021xxxxx_Project

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:48: M7_Pebble_FW.axf] Error 1

"make -r -j4 all" terminated with exit code 2. Build might be incomplete.

Labels (1)
0 Kudos
8 Replies

2,184 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Harry,

 

Could you please let me know the steps you are doing on your side so I can replicate this issue?

 

Best regards,

Felipe

0 Kudos

2,184 Views
harry_liang
Contributor II

Hi, Felipe

I'll reproduce my  issues. First of all, I installed MCUXpressoIDE_ 11.2.0_ 4120, and then downloaded the SDK_ 2.7.0_ Evk-mimxrt1020 (1), after starting the IDE, I draged the SDK into the IDE installation step by step, and then I introduced my own project ‘pebble_ M7_ Firmware_ For remote master’ through Quikstart Panel.Then, I built my project , two errors appeared  in the compilation result as I posted above.

now, I have removed the MIMXRT1021xxxxx_Project from Libraries.

removing   MIMXRT1021 xxxx_Project.jpg

however it caused another issue as follow:

lto-wrapper.exe: fatal error: arm-none-eabi-gcc returned 1 exit status
compilation terminated.
c:/nxp/mcuxpressoide_11.2.0_4120/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.2.0.202001021529/tools/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:48: M7_Pebble_FW.axf] Error 1
"make -r -j4 all" terminated with exit code 2. Build might be incomplete.

14:47:52 Build Failed. 2 errors, 0 warnings. (took 1s.270ms)

捕获.PNG

0 Kudos

2,184 Views
converse
Senior Contributor V

You haven't posted the entire error message. I can see from your screenshot that there is a REALLY IMPORTANT message that starts:

fatal error: bycode stream inf file...

This implies that you have the link-time optimisation flag on, but there is a problem with one of the object files.

Either post the entire error log (so we can advise on the problem) or remove the link time optimisation flags from the linker.

0 Kudos

2,184 Views
harry_liang
Contributor II

Hi,Con

here's the entire error starting from 'fatal error:bycode stream':

lto1.exe: fatal error: bytecode stream in file 'C:\Users\harry.liang\Documents\MCUXpressoIDE_11.2.0_4120\workspace\M7_Pebble_FW\libraries\libSnoreDetector.a' generated with LTO version 7.2 instead of the expected 8.1
compilation terminated.
lto-wrapper.exe: fatal error: arm-none-eabi-gcc returned 1 exit status
compilation terminated.
c:/nxp/mcuxpressoide_11.2.0_4120/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.2.0.202001021529/tools/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:48: M7_Pebble_FW.axf] Error 1
"make -r -j4 all" terminated with exit code 2. Build might be incomplete.

16:05:19 Build Failed. 2 errors, 19 warnings. (took 26s.508ms)

how can I  remove the link time optimisation flags from the linker? Could you tell me how to remove? thanks!

0 Kudos

2,184 Views
converse
Senior Contributor V

so libSnoreDetector.a was built with a different toolset. You can either rebuild using the same tools, or you can remove lto. See screenshot

pastedImage_1.png

0 Kudos

2,184 Views
harry_liang
Contributor II

Hi,Con

I checked the option and found it is not selected. So,maybe it is not caused by this situation.

0 Kudos

2,184 Views
converse
Senior Contributor V

n that case you will need to rebuild that library with the same version of the compiler as you are using now. (Or, you could find out which version was used to build the library, and use that version for the rest of your project). Good luck

0 Kudos

2,184 Views
harry_liang
Contributor II

OK,thanks a lot!

0 Kudos