Re: [fpc-devel] Paramstr trailing spaces, bug or not?
On Fri, 2011-12-23 at 17:25 +0400, Sergei Gorelkin wrote: 23.12.2011 16:18, Marco van de Voort пишет: - syswin.inc code looks like any number of delimiters between parameters are skipped. .. unless quoted. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. It could be that the makefile logic quotes every argument on windows, in case of spaces. We would need a kind of strace tool for Windows to find out. ... it is the trailing backslash escaping the following character (C style). I could reproduce the issue, by using the following command in 'packages' directory: So to conclude, it's a problem of make that it handles the backslash as if it were a escaping-backslash. There's nothing that we have to change, except that fpmake has to trim it's input values to handle this buggy make-behavior. Joost. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
RE: [fpc-devel] Paramstr trailing spaces, bug or not?
-Message d'origine- De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel- boun...@lists.freepascal.org] De la part de Joost van der Sluis Envoyé : samedi 24 décembre 2011 14:23 À : FPC developers' list Objet : Re: [fpc-devel] Paramstr trailing spaces, bug or not? On Fri, 2011-12-23 at 17:25 +0400, Sergei Gorelkin wrote: 23.12.2011 16:18, Marco van de Voort пишет: - syswin.inc code looks like any number of delimiters between parameters are skipped. .. unless quoted. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. It could be that the makefile logic quotes every argument on windows, in case of spaces. We would need a kind of strace tool for Windows to find out. ... it is the trailing backslash escaping the following character (C style). I could reproduce the issue, by using the following command in 'packages' directory: So to conclude, it's a problem of make that it handles the backslash as if it were a escaping-backslash. There's nothing that we have to change, except that fpmake has to trim it's input values to handle this buggy make-behavior. I don't think that its buggy behavior, windows make, be it cygwin, mingw32 (and probably also msys) do expect only forward slashes for directory separators and always handles backward slashes as escapes. Using forward slashes for all parameters of a make call should avoid the problem... If you really wanted backward slashes, then, simply use escaped backslashes, i.e. two in a row, make install PREFIX=c:\\lazarus\\fpc\\2.7.1\\ Pierre ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
In our previous episode, Sergei Gorelkin said: the space) Can you reproduce that? I tried with a simple hello-world kind of application and in that case I can't reproduce it either. This is on Windows 7 in a virtual machine. (kvm) Just some notes: - syswin.inc code looks like any number of delimiters between parameters are skipped. .. unless quoted. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. It could be that the makefile logic quotes every argument on windows, in case of spaces. We would need a kind of strace tool for Windows to find out. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
23.12.2011 16:18, Marco van de Voort пишет: - syswin.inc code looks like any number of delimiters between parameters are skipped. .. unless quoted. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. It could be that the makefile logic quotes every argument on windows, in case of spaces. We would need a kind of strace tool for Windows to find out. ... it is the trailing backslash escaping the following character (C style). I could reproduce the issue, by using the following command in 'packages' directory: make install PP=f:\trunk\compiler\ppc386.exe PREFIX=f:\lazarus\fpc\2.7.1\ Note the quotes, and also note where they end up in output: make -C fcl-base install make[1]: Entering directory `F:/trunk/packages/fcl-base' .\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o -Fu../../rtl/units/i386-win32 -o -Fu../../packages/hash/units/i386-win32 -o -Fu../../packages/paszlib/units/i386-win32 -o -Fu../../packages/fcl-process/units/i386-win32 -o -Fu../../packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 --compiler=f:/trunk/compiler/ppc386.exe --prefix=f:\lazarus\fpc\2.7.1 --unitinstalldir=f:\lazarus\fpc\2.7.1/units/i386-win32/fcl-base The installer encountered the following error: Failed to create directory f:\lazarus\fpc\2.7.1 --unitinstalldir=f:\lazarus\fpc\2.7.1\units\i386-win32\fcl-base\units\i386-win32\fcl-base\ make[1]: *** [install] Error 1 Without quotes the result is basically the same: .\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o -Fu../../rtl/units/i386-win32 -o -Fu../../packages/hash/units/i386-win32 -o -Fu../../packages/paszlib/units/i386-win32 -o -Fu../../packages/fcl-process/units/i386-win32 -o -Fu../../packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 --compiler=f:/trunk/compiler/ppc386.exe --prefix=f:\lazarus\fpc\2.7.1\ --unitinstalldir=f:\lazarus\fpc\2.7.1\/units/i386-win32/fcl-base The installer encountered the following error: Failed to create directory f:\lazarus\fpc\2.7.1 --unitinstalldir=f:\lazarus\fpc\2.7.1\\units\i386-win32\fcl-base\units\i386-win32\fcl-base\ Finally, when trailing backslash is duplicated, everything runs successfully. Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
On Thu, 22 Dec 2011, Joost van der Sluis wrote: Hi all, With this command-line: fpmake --prefix=bla --baseistall=test paramstr(1) gives --prefix=bla . Thus with the trailing space. Is this a bug or a feature? It's what the shell has passed on. The paramstr() code doesn't do any parsing on Linux. It returns the elements in argv[] Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
On Thu, 2011-12-22 at 17:18 +0100, michael.vancann...@wisa.be wrote: With this command-line: fpmake --prefix=bla --baseistall=test paramstr(1) gives --prefix=bla . Thus with the trailing space. Is this a bug or a feature? It's what the shell has passed on. The paramstr() code doesn't do any parsing on Linux. It returns the elements in argv[] Most of the time I'm indeed on Linux, but this case it was Windows. But I guess the same thing holds? Joost. -- My Lazarus blog: http://www.lazarussupport.com/lazarus/weblog ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
Am 22.12.2011 17:36, schrieb Joost van der Sluis: On Thu, 2011-12-22 at 17:18 +0100, michael.vancann...@wisa.be wrote: With this command-line: fpmake --prefix=bla --baseistall=test paramstr(1) gives --prefix=bla . Thus with the trailing space. Is this a bug or a feature? It's what the shell has passed on. The paramstr() code doesn't do any parsing on Linux. It returns the elements in argv[] Most of the time I'm indeed on Linux, but this case it was Windows. But I guess the same thing holds? AFAIK it's not the same as on Windows you have a commandline string which needs to be parsed by the application. Regards, Sven. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
RE: [fpc-devel] Paramstr trailing spaces, bug or not?
-Message d'origine- De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel- boun...@lists.freepascal.org] De la part de Joost van der Sluis Envoyé : jeudi 22 décembre 2011 17:36 À : FPC developers' list Objet : Re: [fpc-devel] Paramstr trailing spaces, bug or not? On Thu, 2011-12-22 at 17:18 +0100, michael.vancann...@wisa.be wrote: With this command-line: fpmake --prefix=bla --baseistall=test paramstr(1) gives --prefix=bla . Thus with the trailing space. Is this a bug or a feature? It's what the shell has passed on. The paramstr() code doesn't do any parsing on Linux. It returns the elements in argv[] Most of the time I'm indeed on Linux, but this case it was Windows. But I guess the same thing holds? Hi Jost, I am completely unable to reproduce this... on a windows machine! Futhermore this behavior would break lots of code including the compiler itself... Maybe there is some special configuration you are working on that explains this strange behavior... Which Windows OS version do you use? Is it a Virtual machine? What shell are you using? Pierre Muller ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
In our previous episode, Pierre Free Pascal said: parsing on Linux. It returns the elements in argv[] Most of the time I'm indeed on Linux, but this case it was Windows. But I guess the same thing holds? I am completely unable to reproduce this... on a windows machine! From the sourcecode, I would suggest something with quotes something --prefix=bla ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
RE: [fpc-devel] Paramstr trailing spaces, bug or not?
On Thu, 2011-12-22 at 19:15 +0100, Pierre Free Pascal wrote: I am completely unable to reproduce this... on a windows machine! Futhermore this behavior would break lots of code including the compiler itself... Maybe there is some special configuration you are working on that explains this strange behavior... Which Windows OS version do you use? Is it a Virtual machine? What shell are you using? What I did was this: 'make install PREFIX=c:\lazarus\fpc\2.7.1\' the trailing backslash is important... Then make runs (among others) the following command: .\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o -Ur -o -Xs -o -O2 -o -n -o -FuC:/svn/fpc-trunk/rtl/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/hash/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/paszlib/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/fcl-process/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 -o -dRELEASE --compiler=C:/svn/fpc-trunk/compiler/ppc386.exe --prefix=c:\lazarus\fpc\2.7.1\ --unitinstalldir=c:\lazarus\fpc\2.7.1\/units/i386-win32/fcl-base -ie -d Note the two spaces after the prefix. Which result in the error message that the directory c:\lazarus\fpc\2.7.1 \bin coudn't be created. (Note the space) Can you reproduce that? I tried with a simple hello-world kind of application and in that case I can't reproduce it either. This is on Windows 7 in a virtual machine. (kvm) Joost. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Paramstr trailing spaces, bug or not?
23.12.2011 1:26, Joost van der Sluis пишет: What I did was this: 'make install PREFIX=c:\lazarus\fpc\2.7.1\' the trailing backslash is important... Then make runs (among others) the following command: .\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o -Ur -o -Xs -o -O2 -o -n -o -FuC:/svn/fpc-trunk/rtl/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/hash/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/paszlib/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/fcl-process/units/i386-win32 -o -FuC:/svn/fpc-trunk/packages/fpmkunit/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 -o -dRELEASE --compiler=C:/svn/fpc-trunk/compiler/ppc386.exe --prefix=c:\lazarus\fpc\2.7.1\ --unitinstalldir=c:\lazarus\fpc\2.7.1\/units/i386-win32/fcl-base -ie -d Note the two spaces after the prefix. Which result in the error message that the directory c:\lazarus\fpc\2.7.1 \bin coudn't be created. (Note the space) Can you reproduce that? I tried with a simple hello-world kind of application and in that case I can't reproduce it either. This is on Windows 7 in a virtual machine. (kvm) Just some notes: - syswin.inc code looks like any number of delimiters between parameters are skipped. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. - the extra character may be not a whitespace (#32), but something looking like one (e.g. non-breaking space with code #160) Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel