Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0012645 [FPC] Compiler minor always 2008-11-16 07:55 2009-03-21 14:16
Reporter Gabor Boros View Status public  
Assigned To Vincent Snijders
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0012645: Compiler (windres?) cannot compiler resources in path with spaces
Description Compiling resource C:\DOCUME~1\Somebody\LOCALS~1\Temp\project1.rc
C:\FPC\2.2.2\bin\i386-win32\windres.exe: no resources
project1.lpr(20,1) Error: Error while linking
project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping
Additional Information
Tags No tags attached.
FPCOldBugId 0
Fixed in Revision 12670
Attached Files ? file icon windres.patch [^] (2,032 bytes) 2009-01-13 14:38
? file icon windres_cfileutl.patch [^] (2,024 bytes) 2009-01-13 15:34

- Relationships

-  Notes
(0023506)
Paul Ishenin (developer)
2008-11-23 10:58

I have seen such bug. But imo I cannot do anything with it. It is imo a fpc bug. You can resolve it by choosing easier temp directory in you lazarus environment options. Use some folder without spaces and national symbols like "C:\temp"
(0023507)
Christian (reporter)
2008-11-23 11:06

Maybe it should be moved to fpc Bugtracker ?!
(0023513)
Sergey Bulba (reporter)
2008-11-23 12:59

Yes, windres very strange tool, comparing with brcc32.
(0023576)
Marco van de Voort (manager)
2008-11-26 15:57

"IDE" is reserved for the FPC IDE.
(0023581)
Gabor Boros (reporter)
2008-11-26 18:39

This is a Lazarus bug not FPC. Lazarus builded from current SVN (trunk) contains the bug, but builded from fixes_0_9_26 not. FPC is same 2.2.2.
(0023582)
Vincent Snijders (manager)
2008-11-26 19:18

Gabor, I think Lazarus tries to use a feature that fpc doesn't support yet, or that Lazarus trunk exposes a bug in fpc.

It might be possible to add a workaround in Lazarus, but is better to improve fpc.
(0023583)
Vincent Snijders (manager)
2008-11-26 19:18

Marco, I think this actually a compiler issue, because the compiler calls the resource compiler incorrectly.
(0023588)
Marco van de Voort (manager)
2008-11-26 22:03

Afaik it is the mingw windres tool not functioning with names with spaces in it.
(0023937)
Vincent Snijders (manager)
2008-12-23 20:57

Or it cannot handle paths with ~ in it, such as the short name representation of the temp dir on windows xp.
(0024332)
Vincent Snijders (manager)
2009-01-10 09:45

Windres cannot handle spaces, related mingw tracker item:
https://sourceforge.net/tracker/index.php?func=detail&aid=1640385&group_id=2435&atid=102435 [^]
(0024405)
Vincent Snijders (manager)
2009-01-13 10:33

From a discussion in the MinGW bugtracker can be concluded that windres does not and will not support spaces in paths for its parameters in the foreseeable future.
So the compiler will have to convert file names and directories passed to windres to short path names (quoting them does not work).

Additionally, forward slashes (/) need to be used as directory separator.
(0024415)
Vincent Snijders (manager)
2009-01-13 14:39

Attached patch works for me. I only tested this on i386-win32. It seems that windres is used on linux and for arm-wince too. I did not test that.
(0024417)
Florian Klämpfl (administrator)
2009-01-13 14:49

Maybe use GetShortName of cfilutils instead of ExtractShortPathName?
(0024418)
Vincent Snijders (manager)
2009-01-13 15:34

Using GetShortName from cfileutl works too, modified patch attached.

- Issue History
Date Modified Username Field Change
2008-11-16 07:55 Gabor Boros New Issue
2008-11-16 07:55 Gabor Boros Widgetset => Win32
2008-11-23 09:45 Vincent Snijders LazTarget => 0.9.28
2008-11-23 09:45 Vincent Snijders Assigned To => Paul Ishenin
2008-11-23 09:45 Vincent Snijders Status new => assigned
2008-11-23 09:45 Vincent Snijders Target Version => 0.9.28
2008-11-23 10:58 Paul Ishenin Note Added: 0023506
2008-11-23 10:58 Paul Ishenin Status assigned => feedback
2008-11-23 11:06 Christian Note Added: 0023507
2008-11-23 12:59 Sergey Bulba Note Added: 0023513
2008-11-23 13:01 Paul Ishenin Project Lazarus => FPC
2008-11-25 17:53 Vincent Snijders Status feedback => assigned
2008-11-25 17:53 Vincent Snijders Assigned To Paul Ishenin => Vincent Snijders
2008-11-26 15:57 Marco van de Voort FPCOldBugId => 0
2008-11-26 15:57 Marco van de Voort Note Added: 0023576
2008-11-26 15:57 Marco van de Voort Category IDE => Utilities
2008-11-26 15:57 Marco van de Voort version 0.9.27 (SVN) =>
2008-11-26 18:39 Gabor Boros Note Added: 0023581
2008-11-26 19:18 Vincent Snijders Note Added: 0023582
2008-11-26 19:18 Vincent Snijders Note Added: 0023583
2008-11-26 22:03 Marco van de Voort Note Added: 0023588
2008-12-23 20:57 Vincent Snijders Note Added: 0023937
2009-01-10 09:45 Vincent Snijders Note Added: 0024332
2009-01-12 09:47 Vincent Snijders Target Version 0.9.28 =>
2009-01-12 09:47 Vincent Snijders Summary Can't run not saved project => Compiler (windres?) cannot compiler resources in path with spaces
2009-01-13 10:33 Vincent Snijders Note Added: 0024405
2009-01-13 14:38 Vincent Snijders File Added: windres.patch
2009-01-13 14:39 Vincent Snijders Note Added: 0024415
2009-01-13 14:39 Vincent Snijders Assigned To Vincent Snijders =>
2009-01-13 14:40 Vincent Snijders Status assigned => confirmed
2009-01-13 14:40 Vincent Snijders Category Utilities => Compiler
2009-01-13 14:49 Florian Klämpfl Note Added: 0024417
2009-01-13 15:34 Vincent Snijders File Added: windres_cfileutl.patch
2009-01-13 15:34 Vincent Snijders Note Added: 0024418
2009-01-13 20:50 Vincent Snijders Fixed in Revision => 12545
2009-01-13 20:50 Vincent Snijders Status confirmed => resolved
2009-01-13 20:50 Vincent Snijders Fixed in Version => 2.3.1
2009-01-13 20:50 Vincent Snijders Resolution open => fixed
2009-01-13 20:50 Vincent Snijders Assigned To => Vincent Snijders
2009-03-21 13:03 Jonas Maebe Status resolved => closed
2009-03-21 14:16 Jonas Maebe Fixed in Revision 12545 => 12670
2009-03-21 14:16 Jonas Maebe Fixed in Version 2.3.1 => 2.2.4



Mantis 1.1.1[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker