chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] windows paths with spaces


From: Răzvan Rotaru
Subject: [Chicken-hackers] windows paths with spaces
Date: Thu, 22 Nov 2012 20:25:46 +0100

Hi,

I made some tests with chicken on windows and looked into the issue with pathnames that contain spaces. Here's what I found:

When trying to run chicken-install miscmacros, I get following error:

D:\>chicken-install miscmacros
retrieving ...
connecting to host "chicken.kitten-technologies.co.uk", port 80 ...
requesting "/henrietta.cgi?name=miscmacros&mode=default" ...
reading response ...
HTTP/1.1 200 OK
Date: Wed, 21 Nov 2012 21:36:19 GMT
Server: Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.9-dev DAV/2 SVN/1.6.17 PHP/5.2.17 mod_fastcgi/2.4.6
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
reading chunks .
reading files ...
  ./debian/
  ./debian/changelog
  ./debian/control
  ./debian/copyright
  ./debian/rules
  ./miscmacros.setup
  ./miscmacros.meta
  ./miscmacros.scm
 miscmacros located at C:\Users\Razvan~1\AppData\Local\Temp/temp7704.8808/miscmacros
checking platform for `miscmacros' ...
checking dependencies for `miscmacros' ...
install order:
("miscmacros")
installing miscmacros:2.95 ...
changing current directory to C:\Users\Razvan~1\AppData\Local\Temp/temp7704.8808/miscmacros
  "C:\Program Files (x86)\Chicken Scheme\bin\csi" -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-ap i)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"miscmacros\" \"2.95\"))" "C:\Users\Razvan~1\AppData\ Local\Temp\temp7704.8808\miscmacros\miscmacros.setup"
  ""C:\Program Files (x86)\Chicken Scheme\bin\csc"" -feature compiling-extension -setup-mode    -s -O3 -d0 miscmacros.sc m -j miscmacros
'""C:\Program' is not recognized as an internal or external command, operable program or batch file.

Error: shell command failed with nonzero exit status 1:

  ""C:\Program Files (x86)\Chicken Scheme\bin\csc"" -feature compiling-extension -setup-mode    -s -O3 -d0 miscmacros.sc m -j miscmacros


Error: shell command terminated with nonzero exit code 70
"\"C:\\Program Files (x86)\\Chicken Scheme\\bin\\csi\" -bnq -setup-mode -e \"(re...



So, I looked a little bit in the source code, and found that the cause is in line 240 of setup-api.scm:

(shellpath (find-program "csc"))

shellpath, quotes it's arguments on windows systems, and since (find-program "csc") already calls shellpath, we are in a case where shellpath is called twice, therefore ending up with the error above. I changed the function shellpath to prevent quoting the string twice, recompiled chicken, and ran "chicken-install miscmacros" again, this time with success. No errors!

Find attached the changes I made to the file setup-api.scm.

Note: My tests were done using the release version chicken-4.8.0. The patch file attached applies to the git version. I have not made any tests with the git version!

I don't have the necessary knowlegde & experience to evaluate the impact of this change, but on my system it (apparently) works fine. Feel free to ask me to perform other tests, if it can help you.

Răzvan

Attachment: win_path_fix.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]