# New Ticket Created by Ron Schmidt # Please include the string: [perl #78152] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=78152 >
Currently make spectest_smolder relies on curl to send the smoke report and uses backticks, which rely on a UNIXish shell, to get the rakudo revision from git. Among other concerns, this doesn't play well with the build process on Windows. By the time we are ready to submit a useful report to smolder we can reasonably expect to have a basically working version of Perl6 and Perl6 has the equivalent of shell backticks with "qqx" and can run curl with its "run" function. The patches, tested at this point on three different systems with Ubuntu Linux, Windows XP with Strawberry Perl, and Windows Vista with Mingw gcc and ActiveState perl, use Perl6 to replace the shell functionality and fixes Configure.pl to allow the change to work properly under Windows. The part of the fix that uses Perl6 to remove the shell dependency is in the file build_Makefile.in.patch. The Perl6 code, however has % symbols, which can be misinterpreted by the Windows cmd interpreter as a sigil for environment variables. So Configure.pl, which already adjusts the Makefile for Windows considerations has had a line added in Configure.pl.patch to substitute % for %% just on the line with curl to give Perl6 the right program from the command line in that environment. Configure.pl.patch also has one more small needed change to fix an existing Windows bug. Currently Configure.pl translates forward slashes to back slashes on Windows. Then, currently, it translates backslashes back to forward slashes on http URL's where backslashes won't work. But the git/roast test URL is missed by this approach since it starts with git:// rather than http:// and is left with backslashes. The other fix line of Configure.pl.patch fixes that problem. Running "(g|mingw32-)make spectest_smolder" under Windows is still not so easy because you need command line versions of git, curl and possibly svn on your execution path. Many of the more obvious looking solutions to making those command line tools available, like cygwin and some configurations of msys git, also puts an "sh" program on your execution path which breaks the build process. I believe I have a fix for that problem too, but that patch will wait for another email and another day, at least for me. For now, AFAIK, the only working Windows configurations that allow for make spectest_smolder are as follows: 1) You need recent version of either Strawberry Perl or ActiveState Perl 2) If you are working with ActiveState Perl you need the Mingw gcc compiler 3) You need msys git installed and, * this is important *, you need "\Program Files\Git\cmd" on your execution path and NOT "\Program Files\Git\bin". 4) You need a win32 curl program that does not depend on modifying your path in a way that puts other stuff on your path that can cause trouble. I went to http://curl.haxx.se/download.html and downloaded the copy of curl from here: http://www.paehl.com/open_source/?download=curl_721_1.zip and then a copy of that curl.exe in the "\Program Files\Git\cmd" directory. 5) If you need a windows command line subversion then, for the moment, I recommend slik subversion at http://www.sliksvn.com/en/download . BTW - I don't know of a document listing the tools needed to do this kind of build for Rakudo on Windows. Do we need to add one someplace? Hoping this is of help, Ron
diff --git a/build/Makefile.in b/build/Makefile.in index d8340a5..437ab2f 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -442,7 +442,7 @@ rakudo_test_run.tar.gz: testable t/spectest.data - $(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data --archive rakudo_test_run.tar.gz --parrot_revision @revision@ spectest_smolder: rakudo_test_run.tar.gz - curl -F architectu...@cpuarch@ -F platfo...@osname@ -F revision=`git log -1 --pretty=format:%H` -F report_fi...@rakudo_test_run.tar.gz -F username=parrot-autobot -F password=qa_rocks http://smolder.parrot.org/app/projects/process_add_report/5 + ./perl6 -e "run qqx[git log -1 --pretty=format:%H].fmt(qq[curl -F architectu...@cpuarch@ -F platfo...@osname@ -F revision=%s -F report_fi...@rakudo_test_run.tar.gz -F username=parrot-autobot -F password=qa_rocks http://smolder.parrot.org/app/projects/process_add_report/5])" testable : all spectest_checkout spectest_update
diff --git a/Configure.pl b/Configure.pl index 23f986e..9562c7e 100644 --- a/Configure.pl +++ b/Configure.pl @@ -171,7 +171,8 @@ sub create_makefile { if ($^O eq 'MSWin32') { $maketext =~ s{/}{\\}g; $maketext =~ s{\\\*}{\\\\*}g; - $maketext =~ s{http:\S+}{ do {my $t = $&; $t =~ s'\\'/'g; $t} }eg; + $maketext =~ s{(?:git|http):\S+}{ do {my $t = $&; $t =~ s'\\'/'g; $t} }eg; + $maketext =~ s/.*curl.*/do {my $t = $&; $t =~ s'%'%%'g; $t}/meg; } if ($makefile_timing) {