From: SourceForge.net <no...@so...> - 2007-02-26 10:43:45
|
Bugs item #1646333, was opened at 2007-01-28 10:04 Message generated for change (Comment added) made by madwizard You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1646333&group_id=68108 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Windows Vista Error Initial Comment: Hi, I was compiling this code on Windows XP, but I have received an error on Windows Vista: > "make.exe" all -------- begin -------- avr-gcc (GCC) 4.1.1 (WinAVR 20070122) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiling C: main.c avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/main.o.d main.c -o main.o avr-gcc: _spawnvp: No such file or directory make.exe: *** [main.o] Error 1 > Process Exit Code: 2 It seems that it can't find _spawnvp... yielding make.exe error. Regards ---------------------------------------------------------------------- Comment By: madwizard (madwizard) Date: 2007-02-26 11:43 Message: Logged In: YES user_id=1729144 Originator: NO spawnvp is used to call the subprograms like cc1.exe. It fails because it cannot find the path to these program. I looked around with ollydbg and the source code and I think the problem lies in the calls to msvcrt's _access function. This function can check whether a file exists or has read/write rights. It is also used to figure out the right paths for the subprograms (cc1 is in libexec\gcc\avr\4.1.1). It calls access to check whether these paths exist. Now the access call is done with the X_OK mode, which is 1 numerically. This should check for 'execute' righs, so it basically checks whether the file exists. This may work in linux but in msvcrt's _access function X_OK is not a valid mode. You can only specify 0 (existence), 2 (write only), 4 (read only) or 6 (read and write). See <http://msdn2.microsoft.com/en-us/library/1w06ktdy(VS.80).aspx>. winavr calls _access with 1 (X_OK), _access fails with an invalid parameter error (which is ignored) and winavr assumes it was an invalid directory while it is not. This behavior is new in Vista because older msvcrt DLLs do not check for this invalid value. But the error lies with WinAVR. Basically the X_OK constant should be 0 on windows systems, not 1. I have little experience with the whole cygwin/msys compilation thing so someone else has to verify and fix this in the source code. Meanwhile I did make a binary patch for avr-gcc.exe. It fixes the compilation for the project posted here and I haven't seen any error yet but other executables may need to be patched too. Quick & dirty fix (WinAVR 20070122) 1. Get a hex editor. If you don't have/know one, use HxD: http://mh-nexus.de/hxd/ 2. Be sure to run the hex editor as admin if you have UAC on. 3. Open bin\avr-gcc.exe from the WinAVR directory 4. Goto offset 16A90 (in Hxd: ALT+g, 16A90, hex, relative to begin) 5. The bytes at this offset should read: FF 25 DC 21 42 00 90 90 00 00 00 00 00 00 00 00 If they don't you have a different version, do not proceed! 6. Change the bytes to: 90 A1 DC 21 42 00 81 64 24 08 FE 00 00 00 FF E0 (in HxD, select the previous bytes and paste the new bytes. Be sure to *replace* instead of insert, HxD will give you a warning if you do it wrong). 7. Save the file Basically this patch masks out the first bit in _access mode parameter just before it is called, so that a call with mode 1 becomes mode 0. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-02-20 02:46 Message: Logged In: NO Not wanting make u peeps who wrote the comments look stupid but .... I cannot recall seeing this saying it is "Vista" ready ... Many Thanks to The powers that have upheld this project. You all have done an brilliant job. I have used this time saver on many projects with no bugs. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-02-16 16:49 Message: Logged In: NO same here.... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-02-11 21:30 Message: Logged In: NO I also have this problem.. please fix it =) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-01-31 13:35 Message: Logged In: NO I have this problem too. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1646333&group_id=68108 |