"no such file or directory linker" error work around

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

"no such file or directory linker" error work around

3,320 Views
Kratz
Contributor IV

It looks like I am experiencing an error that has come up in another forum. I need to know if I am experiencing the "Windows larger than 8192 characters" path problem or what? See the following discussion:  KDS Static Library Project - Another Bug Report - Need Fix   My Console log with the error is at the bottom of the post for view-ability.

 

If I do have the path length problem, a number of fixes were proposed.  Which is the best way that would allow for fairly straight forward "clean" and "build", and how specifically would I do it?

 

1. "reduce the number of files"  Specifically how would I reduce the number of files? Should I take the generated files and condense them into one file and then delete the others generated files?  Where do I change the code that is looking for the other files?


2. "bundling your input files into a single arguments file"  Where is the tool setting window that the contributor found and What needs to be put there?


3. "move the directory" to reduce folder locations.  When I tried to move the folder, KDS does not want to open the project because it is not set up with relative paths I assume.  Is there a work around?


4. Erich Styger proposed the following:

a) use relative paths in your project (the toolchain uses the (debug) output folder as current directory, so use ..\src instead of  c:\myprojects\otherdirectory\ProjectA\Sources or similar for compiler paths/etc

b) Build one or multiple libraries you can link to your main application.

I like the relative path idea, but I need a specific example of where to put the \src instead of the path. What file name and where in the file? What  conditions modify the file that I would have to re-do or replace it?


5. The reported quick work around that worked is complicated looking:

1. In Debug folder, created a file "ProjectName.args"

2. Copy object files paths into "ProjectName.args" ; for this, in Debug folder we looked into subdir.mk files and retreived the information under the  variable OBJS.

3. Inside "ProjectName.args", set an object file path per line, and be sure to put the name between " " (ex.  "./Sources/main.o" )

4. In Project "Properties"/"C/C++ Build"/"Settings" ->  "Tool Settings Tab" -> "Cross ARM C++ Linker":

  - We had to modify the command line pattern: changed the argument ${INPUTS} to -> @"ProjectName.args"


Problems: make: *** [24-228 KDS.elf] Error 1

 

Console Log:

15:27:19 **** Incremental Build of configuration Debug for project 24-228 KDS ****

make all

'Building file: ../Sources/mqx_tasks.c'

'Invoking: Cross ARM C Compiler'

arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -I"C:\Freescale\KDS_1.1.1\eclipse\ProcessorExpert/lib/Kinetis/pdd/inc" -I"C:\Freescale\KDS_1.1.1\eclipse\ProcessorExpert/lib/Kinetis/iofiles" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Sources" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Generated_Code" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/include" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/config" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/kernel" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m/core/M0" -I"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/MQXLITE/psp/cortex_m/compiler/cwgcc" -std=c99 -MMD -MP -MF"Sources/mqx_tasks.d" -MT"Sources/mqx_tasks.o" -c -o "Sources/mqx_tasks.o" "../Sources/mqx_tasks.c"

'Finished building: ../Sources/mqx_tasks.c'

' '

'Building target: 24-228 KDS.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"F:/ENG/24-228/24-228 KDS Soft/24-228 KDS/Project_Settings/Linker_Files" -Wl,-Map,"24-228 KDS.map" -nanolibc -o "24-228 KDS.elf"  ./Sources/Events.o ./Sources/main.o ./Sources/mqx_tasks\ bak.o ./Sources/mqx_tasks.o  ./Project_Settings/Startup_Code/startup.o  ./MQXLITE/psp/cortex_m/core/M0/boot.o ./MQXLITE/psp/cortex_m/core/M0/dispatch.o  ./MQXLITE/psp/cortex_m/cortex.o ./MQXLITE/psp/cortex_m/int_gkis.o ./MQXLITE/psp/cortex_m/int_inst.o ./MQXLITE/psp/cortex_m/int_kisr.o ./MQXLITE/psp/cortex_m/int_pvta.o ./MQXLITE/psp/cortex_m/int_unx.o ./MQXLITE/psp/cortex_m/int_vtab.o ./MQXLITE/psp/cortex_m/int_xcpt.o ./MQXLITE/psp/cortex_m/mem_zero.o ./MQXLITE/psp/cortex_m/psp_iinit.o ./MQXLITE/psp/cortex_m/psp_supp.o ./MQXLITE/psp/cortex_m/psp_tiad.o ./MQXLITE/psp/cortex_m/psp_tinm.o ./MQXLITE/psp/cortex_m/psp_tipr.o ./MQXLITE/psp/cortex_m/psp_tisu.o ./MQXLITE/psp/cortex_m/sc_irdyq.o ./MQXLITE/psp/cortex_m/stack_bu.o ./MQXLITE/psp/cortex_m/stack_de.o ./MQXLITE/psp/cortex_m/stack_st.o  ./MQXLITE/kernel/idletask.o ./MQXLITE/kernel/int.o ./MQXLITE/kernel/klog.o ./MQXLITE/kernel/lwevent.o ./MQXLITE/kernel/lwlog.o ./MQXLITE/kernel/lwmem.o ./MQXLITE/kernel/lwmsgq.o ./MQXLITE/kernel/lwsem.o ./MQXLITE/kernel/lwtimer.o ./MQXLITE/kernel/mqx_utils.o ./MQXLITE/kernel/mqxlite.o ./MQXLITE/kernel/mutex.o ./MQXLITE/kernel/qu_test.o ./MQXLITE/kernel/sched.o ./MQXLITE/kernel/task.o ./MQXLITE/kernel/time_ticks.o  ./MQXLITE/config/task_template_list.o  ./Generated_Code/AD1.o ./Generated_Code/BowlOut.o ./Generated_Code/Cpu.o ./Generated_Code/HopperIn.o ./Generated_Code/HopperOut.o ./Generated_Code/MQX1.o ./Generated_Code/PE_LDD.o ./Generated_Code/PORT.o ./Generated_Code/RunIn.o ./Generated_Code/SW1.o ./Generated_Code/SW10.o ./Generated_Code/SW2.o ./Generated_Code/SW3.o ./Generated_Code/SW4.o ./Generated_Code/SW5.o ./Generated_Code/SW6.o ./Generated_Code/SW7.o ./Generated_Code/SW8.o ./Generated_Code/SW9.o ./Generated_Code/Sens1.o ./Generated_Code/Sens2.o ./Generated_Code/Sens3.o ./Generated_Code/Sens4.o ./Generated_Code/SystemTimer1.o ./Generated_Code/Valve1.o ./Generated_Code/Valve2.o ./Generated_Code/Valve3.o ./Generated_Code/Valve4.o ./Generated_Code/Vectors.o ./Generated_Code/WDog1.o  ./.metadata/.plugins/org.eclipse.cdt.make.core/specs.o  

arm-none-eabi-g++: error: ./Sources/mqx_tasks\: No such file or directory

arm-none-eabi-g++: error: bak.o: No such file or directory

make: *** [24-228 KDS.elf] Error 1

 

 

15:27:33 Build Finished (took 14s.225ms)

Labels (1)
0 Kudos
2 Replies

1,668 Views
RadekS
NXP Employee
NXP Employee

I looked at your console log and it seems that dave408 is right. It doesn’t look like issue with "Windows larger than 8192 characters" path problem.

It seems that there is problem with slash/backslash and space characters in the path:

./Sources/Events.o

./Sources/main.o

./Sources/mqx_tasks\ bak.o

Could you please look at your project – “Properties"->"C/C++ Build"->"Settings"->"Tool Settings Tab" and try checking path in “Includes” and “Miscellaneous” options?


Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,668 Views
dave408
Senior Contributor II

Hi Kevin, I am fighting the same problem under Windows.  I came to the conclusion that I was having this issue because I took the linker command line and put it into a text editor that could give me the column number of the cursor.  I had a problem very close to 8210 characters (I assume the Windows limitation is in the number of characters in the arguments list).  I haven't attempted to solve the problem in Windows yet, though I have started to set up KDS in Ubuntu in parallel, just in case.

After looking at your linker command line, I don't think you're experiencing this problem.  First, bak.o appears around column 432.  Second, your command line is only 2491 characters.

I'm new to eclipse and everything else, so I can only guess that you've got a path defined incorrectly in Project Properties -> C/C++ Build -> Settings *somewhere*.  I'm just not sure where.  Hopefully, someone else here can help you out with this.  I'll keep watching this thread in case I have anything else to add as I try to figure out my problem.