{"thread":{"id":"39900","subject":"[PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","startedAt":"2015-07-20T22:54:04Z","lastAt":"2015-07-22T22:57:35Z","messageCount":9,"participants":["Philip Oakley","Junio C Hamano","Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":16},"messages":[{"id":"266522","messageId":"1437432846-5796-1-git-send-email-philipoakley@iee.org","threadId":"39900","inReplyTo":null,"subject":"[PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-07-20T22:54:04Z","receivedAt":"2015-07-20T22:54:04Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"This updates two patches in the series based on Eric Sunshine's comments.\n\nPatch 8b updates the commit message to make clear what was going wrong.\n\nPatch 10b improves the perl code.\n\nJunio: would a full re-roll be appropriate at a suitable point?\n\nPhilip Oakley (2):\n\n  engine.pl: ignore invalidcontinue.obj which is known to MSVC\n  engine.pl: delete the captured stderr file if empty\n\n\n-- \n2.4.2.windows.1.5.gd32afb6\n"},{"id":"266523","messageId":"1437432846-5796-2-git-send-email-philipoakley@iee.org","threadId":"39900","inReplyTo":"1437432846-5796-1-git-send-email-philipoakley@iee.org","subject":"[PATCH v2 8b/16] engine.pl: ignore invalidcontinue.obj which is known to MSVC","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-07-20T22:54:05Z","receivedAt":"2015-07-20T22:54:05Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Commit 4b623d8 (MSVC: link in invalidcontinue.obj for better\nPOSIX compatibility, 2014-03-29) introduced invalidcontinue.obj\ninto the Makefile output, which was not parsed correctly by the\nbuildsystem. Ignore it, as it is known to Visual Studio and,\nthere is no matching source file.\n\nOnly substitute filenames ending with .o when generating the\nsource .c filename, otherwise a .cbj file may be expected.\n\nSplit the .o and .obj processing; 'make' does not produce .obj\nfiles.\n\nIn the future there may be source files that produce .obj files\nso keep the two issues (.obj files with & without source files)\nseparate.\n\nSigned-off-by: Philip Oakley <philipoakley@iee.org>\n---\n contrib/buildsystems/engine.pl | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl\nindex 60c7a7d..9db3d43 100755\n--- a/contrib/buildsystems/engine.pl\n+++ b/contrib/buildsystems/engine.pl\n@@ -289,7 +289,7 @@ sub handleLibLine\n #    exit(1);\n     foreach (@objfiles) {\n         my $sourcefile = $_;\n-        $sourcefile =~ s/\\.o/.c/;\n+        $sourcefile =~ s/\\.o$/.c/;\n         push(@sources, $sourcefile);\n         push(@cflags, @{$compile_options{\"${sourcefile}_CFLAGS\"}});\n         push(@defines, @{$compile_options{\"${sourcefile}_DEFINES\"}});\n@@ -333,8 +333,12 @@ sub handleLinkLine\n         } elsif ($part =~ /\\.(a|lib)$/) {\n             $part =~ s/\\.a$/.lib/;\n             push(@libs, $part);\n-        } elsif ($part =~ /\\.(o|obj)$/) {\n+        } elsif ($part eq 'invalidcontinue.obj') {\n+            # ignore - known to MSVC\n+        } elsif ($part =~ /\\.o$/) {\n             push(@objfiles, $part);\n+        } elsif ($part =~ /\\.obj$/) {\n+            # do nothing, 'make' should not be producing .obj, only .o files\n         } else {\n             die \"Unhandled link option @ line $lineno: $part\";\n         }\n@@ -343,7 +347,7 @@ sub handleLinkLine\n #    exit(1);\n     foreach (@objfiles) {\n         my $sourcefile = $_;\n-        $sourcefile =~ s/\\.o/.c/;\n+        $sourcefile =~ s/\\.o$/.c/;\n         push(@sources, $sourcefile);\n         push(@cflags, @{$compile_options{\"${sourcefile}_CFLAGS\"}});\n         push(@defines, @{$compile_options{\"${sourcefile}_DEFINES\"}});\n-- \n2.3.1\n"},{"id":"266524","messageId":"1437432846-5796-3-git-send-email-philipoakley@iee.org","threadId":"39900","inReplyTo":"1437432846-5796-1-git-send-email-philipoakley@iee.org","subject":"[PATCH v2 10b/16] engine.pl: delete the captured stderr file if empty","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-07-20T22:54:06Z","receivedAt":"2015-07-20T22:54:06Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Keep the build clean of extraneous files if it is indeed clean.\nOtherwise leave the msvc-build-makedryerrors.txt file both as\na flag for any CI system or for manual debugging.\n\nAlternatively, with improved syntactic sugar[1]:\n\tunlink $ErrsFile if -f -z $ErrsFile;\ncould be used but requires Perl 5.10 or later, which is not\navailable on Msysgit, but is available on the newer Git-for-Windows\nSDK on Msys2 [2].\n\nNote that the file will contain the new values of the GIT_VERSION\nand GITGUI_VERSION if they were generated by the make file. They\nare omitted if the release is tagged and identically defined in\ntheir respective GIT_VERSION_GEN file DEF_VER variables.\n\n[1]: http://perldoc.perl.org/functions/-X.html\n[2]: http://git-for-windows.github.io/\n\nHelped-by:  Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Philip Oakley <philipoakley@iee.org>\n---\nEric's help gmane.comp.version-control.msysgit/21745\n---\n contrib/buildsystems/engine.pl | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl\nindex a6999b6..154575d 100755\n--- a/contrib/buildsystems/engine.pl\n+++ b/contrib/buildsystems/engine.pl\n@@ -77,6 +77,8 @@ EOM\n \n my $ErrsFile = \"msvc-build-makedryerrors.txt\";\n @makedry = `cd $git_dir && make -n MSVC=1 V=1 2>$ErrsFile` if !@makedry;\n+# test for an empty Errors file and remove it\n+unlink $ErrsFile if -f $ErrsFile && -z _;\n \n # Parse the make output into usable info\n parseMakeOutput();\n-- \n2.3.1\n"},{"id":"266526","messageId":"xmqq1tg2xwbd.fsf@gitster.dls.corp.google.com","threadId":"39900","inReplyTo":"1437432846-5796-1-git-send-email-philipoakley@iee.org","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-07-20T23:07:18Z","receivedAt":"2015-07-20T23:07:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philip Oakley <philipoakley@iee.org> writes:\n\n> This updates two patches in the series based on Eric Sunshine's comments.\n>\n> Patch 8b updates the commit message to make clear what was going wrong.\n>\n> Patch 10b improves the perl code.\n\nIs v2b like saying v3 or something else?  Does 8b replaces 8 or\nupdates it (i.e. comes between 8 and 9)?\n\n> Junio: would a full re-roll be appropriate at a suitable point?\n\nProbably, but I'd like to see people try it out and give positive\nfeedback first.  This part of the tree I can give no input or pre-\npushout testing at all.\n\nWho are the people involved in this part of the system in the past?\nDoes \"shortlog -n --no-merges contrib/buildsystems compat/vcbuild\"\ntell us anything?\n\n\n> Philip Oakley (2):\n>\n>   engine.pl: ignore invalidcontinue.obj which is known to MSVC\n>   engine.pl: delete the captured stderr file if empty\n"},{"id":"266558","messageId":"73004CECB3514744A5916831B4501689@PhilipOakley","threadId":"39900","inReplyTo":"xmqq1tg2xwbd.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-07-21T16:46:00Z","receivedAt":"2015-07-21T16:46:00Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Junio C Hamano\" <gitster@pobox.com>\n> Philip Oakley <philipoakley@iee.org> writes:\n>\n>> This updates two patches in the series based on Eric Sunshine's\n>> comments.\n>>\n>> Patch 8b updates the commit message to make clear what was going\n>> wrong.\n>>\n>> Patch 10b improves the perl code.\n>\n> Is v2b like saying v3 or something else?  Does 8b replaces 8 or\n> updates it (i.e. comes between 8 and 9)?\n\n\nSorry for the confusion. Yes these are quick replacements, rather than\nre-rolling the whole series immediately.\n\n>\n>> Junio: would a full re-roll be appropriate at a suitable point?\n>\n> Probably, but I'd like to see people try it out and give positive\n> feedback first.  This part of the tree I can give no input or pre-\n> pushout testing at all.\n\nIt has been tried out on the Msysgit list, and also against the github\nPull Request, with responses noted there.\n\nI'll do another branch / rebase and PR onto the G4W SDK as well,\nfor an extra chance at getting more replies. Ideally, if part of this\nmainstream Git, it would get picked up automatically by them\n(rather than being local 'fixes' endlessly carried forward).\n\n>\n> Who are the people involved in this part of the system in the past?\n> Does \"shortlog -n --no-merges contrib/buildsystems compat/vcbuild\"\n> tell us anything?\n>\n\nThere has been no activity here on the 'create a visual studio project'\naspects in the last few years. Any changes listed in the logs relate to\nensuring that the MSVC compiler will run as part of a regular Makefile\nrun (IIUC). The last significant commit was 74cf9bd (engine.pl: Fix a\nrecent breakage of the buildsystem generator, 2010-01-22) Ramsay Jones,\nso that's five and a half years. Mind you, it's taken me a while to find \nall\nthe bit rots.\n\n>\n>> Philip Oakley (2):\n>\n"},{"id":"266562","messageId":"xmqqvbdduxd5.fsf@gitster.dls.corp.google.com","threadId":"39900","inReplyTo":"73004CECB3514744A5916831B4501689@PhilipOakley","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-07-21T19:25:10Z","receivedAt":"2015-07-21T19:25:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Philip Oakley\" <philipoakley@iee.org> writes:\n\n> ... Ideally, if part of this\n> mainstream Git, it would get picked up automatically by them\n> (rather than being local 'fixes' endlessly carried forward).\n\nActually, that is not \"ideal\", but what I want to avoid.\n\nAs I do not do Windows, it simply is wrong for me to apply changes\nthat are very likely to affect Windows folks without seeing their\nsupport first, which they may end up having to revert on their end\nand endlessly carry that revert forward.  That is why I very much\nprefer to see changes get there first and then forwarded in my\ndirection once they are happy with them.\n\n> There has been no activity here on the 'create a visual studio project'\n> aspects in the last few years. Any changes listed in the logs relate to\n> ensuring that the MSVC compiler will run as part of a regular Makefile\n> run (IIUC). The last significant commit was 74cf9bd (engine.pl: Fix a\n> recent breakage of the buildsystem generator, 2010-01-22) Ramsay Jones,\n> so that's five and a half years.\n\nI think Ramsay is still around on the list; I do not know if he\nstill does Windows, though.\n"},{"id":"266575","messageId":"xmqq1tg1uvjk.fsf@gitster.dls.corp.google.com","threadId":"39900","inReplyTo":"xmqqvbdduxd5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-07-21T20:04:31Z","receivedAt":"2015-07-21T20:04:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> \"Philip Oakley\" <philipoakley@iee.org> writes:\n>\n>> ... Ideally, if part of this\n>> mainstream Git, it would get picked up automatically by them\n>> (rather than being local 'fixes' endlessly carried forward).\n>\n> Actually, that is not \"ideal\", but what I want to avoid.\n>\n> As I do not do Windows, it simply is wrong for me to apply changes\n> that are very likely to affect Windows folks without seeing their\n> support first,...\n\nJust to clarify this part.  I do not do RedHat, Solaris or OSX,\neither.  Also MSVC may not be what GfW folks primarily target.\n\nBut the thing is that (1) Windows is so much different, and (2) GfW\nfolks are much more qualified to judge platform-specific issues on\nWindows than I am.\n\nEven though I may still need to have a say in the overall structure\nof the changes to the upstream tree coming from them (e.g. \"Don't\nsprinkle #ifdef all over the generic code; instead add a wrapper or\ntwo in compat/ to keep the generic code generic\" is something I may\ntell them when rejecting a change forwarded to me), I trust them a\nlot more than I trust myself when it comes to what the changes do in\nthe platform-specific part and how they do it.\n\nThanks.\n"},{"id":"266578","messageId":"B947AFE2559B41DDA2078497EB068EAF@PhilipOakley","threadId":"39900","inReplyTo":"xmqq1tg1uvjk.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2015-07-21T20:39:03Z","receivedAt":"2015-07-21T20:39:03Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Junio C Hamano\" <gitster@pobox.com>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> \"Philip Oakley\" <philipoakley@iee.org> writes:\n>>\n>>> ... Ideally, if part of this\n>>> mainstream Git, it would get picked up automatically by them\n>>> (rather than being local 'fixes' endlessly carried forward).\n>>\n>> Actually, that is not \"ideal\", but what I want to avoid.\n>>\n>> As I do not do Windows, it simply is wrong for me to apply changes\n>> that are very likely to affect Windows folks without seeing their\n>> support first,...\n>\n> Just to clarify this part.  I do not do RedHat, Solaris or OSX,\n> either.  Also MSVC may not be what GfW folks primarily target.\n>\n> But the thing is that (1) Windows is so much different, and (2) GfW\n> folks are much more qualified to judge platform-specific issues on\n> Windows than I am.\n>\n> Even though I may still need to have a say in the overall structure\n> of the changes to the upstream tree coming from them (e.g. \"Don't\n> sprinkle #ifdef all over the generic code; instead add a wrapper or\n> two in compat/ to keep the generic code generic\" is something I may\n> tell them when rejecting a change forwarded to me), I trust them a\n> lot more than I trust myself when it comes to what the changes do in\n> the platform-specific part and how they do it.\n>\n> Thanks.\n> --\nThanks for the extra clarification. I'll ask if they can confirm this \nupdate on GfW.\n\nI've also asked Ramsay what his current situation is re- you previous \nemail and the msvc-build.\n\nregards\n\nPhilip \n"},{"id":"266637","messageId":"55B01FDF.7030004@ramsay1.demon.co.uk","threadId":"39900","inReplyTo":"xmqqvbdduxd5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2015-07-22T22:57:35Z","receivedAt":"2015-07-22T22:57:35Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"On 21/07/15 20:25, Junio C Hamano wrote:\n> \"Philip Oakley\" <philipoakley@iee.org> writes:\n> \n>> ... Ideally, if part of this\n>> mainstream Git, it would get picked up automatically by them\n>> (rather than being local 'fixes' endlessly carried forward).\n> \n> Actually, that is not \"ideal\", but what I want to avoid.\n> \n> As I do not do Windows, it simply is wrong for me to apply changes\n> that are very likely to affect Windows folks without seeing their\n> support first, which they may end up having to revert on their end\n> and endlessly carry that revert forward.  That is why I very much\n> prefer to see changes get there first and then forwarded in my\n> direction once they are happy with them.\n> \n>> There has been no activity here on the 'create a visual studio project'\n>> aspects in the last few years. Any changes listed in the logs relate to\n>> ensuring that the MSVC compiler will run as part of a regular Makefile\n>> run (IIUC). The last significant commit was 74cf9bd (engine.pl: Fix a\n>> recent breakage of the buildsystem generator, 2010-01-22) Ramsay Jones,\n>> so that's five and a half years.\n> \n> I think Ramsay is still around on the list; I do not know if he\n> still does Windows, though.\n\n[Sorry for not noticing this sooner, but I'm currently moving home\n(among other things) and, as a result, I have not been able to\ndevote much time to the list ... (or anything else ;-) ]\n\nI don't do much with MinGW or MSVC these days (I do still try to\nkeep cygwin running - it's currently not in good shape). My MSVC\ninstallation is somewhat old (2008 I believe) and confined to my\nold 32-bit laptop (which doesn't get booted up too often now).\n\nI had a quick squint at the patches and, at first glance, they\nlooked quite reasonable to me, but I have not tested them. I can't\npromise to test them anytime soon (and my MSVC may be too old for\nthese patches?). Sorry! :(\n\n[If I find some time soon, I will give them a try and let you know.]\n\nATB,\nRamsay Jones\n"}]}