VS Arduino
Visual Micro >> Installation & Troubleshooting >> "No such file or directory" Error when compiling
https://www.visualmicro.com/forums/YaBB.pl?num=1317678291

Message started by sticks on Oct 3rd, 2011 at 9:44pm

Title: "No such file or directory" Error when compiling
Post by sticks on Oct 3rd, 2011 at 9:44pm
Hi,
First, great work! I've been looking forward to this release all week.

Second, I can't get the new compiler to work and it seems to be a missing set of quotation marks. When I create a new Arduino solution/project and just click on "build", the "Sketch Build" window just shows a bunch of

: No such file or directory.

I turned on the verbose compiler and the problem looks to be in the output filename. Please note the missing quotes around the last argument.

C:\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=22 -I"C:\arduino-0022\hardware\arduino\cores\arduino" "C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\asdf\ethernet\asdf.cpp" -oC:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\asdf\ethernet\asdf.cpp.o


When I run the command on the  command line, I get similar errors. When I fix the quotes, the errors go away.

thanks.

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 3rd, 2011 at 9:47pm
I meant to add that this is on Windows XP. I'd expect that Vista/Win7 wouldn't have this problem, since they don't use the "documents and settings" path.

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 3rd, 2011 at 10:40pm
Yes, the missing quotes seem to be to the -o parameter. The include paths and the path to the cpp file is properly quoted.

Unfortunately, this means I'm pretty much stuck, unless there is a way to override what the temp folder is.

Title: Re: "No such file or directory" Error when compiling
Post by Visual Micro on Oct 3rd, 2011 at 10:58pm
Oh that's very useful thanks.

The missing quotes have been found and a new version uploaded (10.3)

Thanks very much for the feed back. Let us know how the compile goes on xp

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 3rd, 2011 at 11:28pm
Thanks for the quick turnaround, but it looks like there are many more places. The -g++ command is fixed, but the -gcc is still missing the quotes as are what look to be the assembler commands as well as some others. The last .net exception might just be an artifact of the other problems.

C:\arduino-0022\hardware\tools\avr\bin\avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=22 -I"C:\arduino-0022\hardware\arduino\cores\arduino" "C:\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c" -oC:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\pins_arduino.c.o

C:\arduino-0022\hardware\tools\avr\bin\avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=22 -I"C:\arduino-0022\hardware\arduino\cores\arduino" "C:\arduino-0022\hardware\arduino\cores\arduino\wiring_shift.c" -oC:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\wiring_shift.c.o



C:\arduino-0022\hardware\tools\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\Test.elf C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\Test.eep

Couldn't determine program size: System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at processing.app.debug.Sizer.message(String s) (3.5 secs)

Title: Re: "No such file or directory" Error when compiling
Post by Visual Micro on Oct 3rd, 2011 at 11:53pm
Ah oops. You were right. I missed a lot of places where quotes were needed. I hope I have found them all now.

I've uploaded 10.4

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 4th, 2011 at 12:21am
Closer, it looks. Still missing the quotes around the -ar call



C:\arduino-0022\hardware\tools\avr\bin\avr-ar rcs C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\core.a C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\pins_arduino.c.o

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 4th, 2011 at 12:45am
Arrgh. So close! looks like the linking step only has the output files, not the input files.


C:\arduino-0022\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\Test.elf" C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\Test.cpp.o C:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet\core.a -LC:\Documents and Settings\User\Local Settings\Application Data\VMicro\Arduino\Builds\Test\ethernet -lm


And no I don't, but I've been uninstalling and reinstalling as opposed to upgrading. When I tried 10.2, I wasn't convinced that it upgraded properly, so I've just been following the same pattern.

Title: Re: "No such file or directory" Error when compiling
Post by Visual Micro on Oct 4th, 2011 at 12:50am
yes i think you were right. there were another error that would have hit after the error you found. but as you say its near the end. The code after these lines makes the .hex and I think i nailed the uploader earlier.

So please try 10.6 when you get a mo. Thanks

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 4th, 2011 at 1:04am
That looks to have got it. When I first tried it with an existing project, it was still failing. It was compiling all of my stuff, but claiming that it couldn't find a library I was using (VirtualWire, FWIW.)

I blew away the AppData directory we've been fighting with and it built successfully. I removed the VirtualWire.cpp.o just for grins and it failed again. It looks like the logic to detect if it needs to rebuild the libs is a bit dodgy.

But, overall, I'm functional. Thanks!

Title: Re: "No such file or directory" Error when compiling
Post by Visual Micro on Oct 4th, 2011 at 1:20am
Thanks for the effort.

I'll look into the lib detect. It should be detecting normal compile errors correctly but it's worth a look to see if this type of error can happen under normal circumstances.

It is always good to know that someone other than myself has a fully working system. Normally I only get to hear about the ones that are not working  :)

Please let me know if you find anything else

By the way, if anyone does hit an optimization issues, there are two tools>options>visual micro>compiler options to switch off the compiler optimization. One for core and one for libs.

Title: Re: "No such file or directory" Error when compiling
Post by sticks on Oct 4th, 2011 at 1:40am
Well, I've uploaded and used the Serial monitor successfully, too. Everything is looking good. Thanks so much for the effort.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.