Re: forward vs backward slashes in msvc build code

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: forward vs backward slashes in msvc build code
Date: 2015-04-27 06:09:19
Message-ID: CAB7nPqRfw0VwgXsrXLQEh+oVS8nKuA4Ky94w8a+seZ9eZHrM0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 27, 2015 at 9:20 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Mon, Apr 27, 2015 at 8:53 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>>
>> On 04/26/2015 04:08 PM, Noah Misch wrote:
>>>
>>> On Sun, Apr 26, 2015 at 10:23:58AM -0400, Andrew Dunstan wrote:
>>>>
>>>> Setting up a VS2008 environment is hard these days, as MS seems to have
>>>> removed the download :-(
>>>
>>> Visual C++ 2008 Express Edition:
>>> http://go.microsoft.com/?linkid=7729279
>>>
>>
>> Oh, cool. Thanks.
>
> Thanks, I'll try to set up an environment and come up with a real
> patch tested this time.
>
> What I suspect is that we need to correctly replace all the references
> to backslaches like '\\' or $obj =~ s/\\/_/g; to make things work
> correctly.

So, I have set up an environment with VC tools, and have been able to
reproduce the failure. The problems were less trivial than I though
first:
1) - The file tree list was not correctly generated, build script
generating vcproj file missing tree dependencies when listing items in
Filter. For example, for a path like src/backend/access, it missed to
list "src", "backend" and "access", listing only the files in such
paths.
2) I noticed that VC builds do not like *at all* file paths with
forward slashes, perhaps it could be possible to use a Condition like
hasForwardSlashes but it seems safer to simply enforce the file paths
to use backslashes in the vcproj files. That's inconsistent with the
vcxproj files, but it works and Mkvcbuild.pm works as before.
3) I found why chkpass was needed as a dependency with libpgport and
libpgcommon, actually crypt.c needs to be listed as a unique file, so
it needs a fake entry in vcproj and vcxproj files.
All those things are corrected in the patch attached, tested with both
MS and VC. The build is still failing because of cac76582 that
introduced the transforms, but at least it will partially cure
currawong and put it at the same level as the other machines.
Regards,
--
Michael

Attachment Content-Type Size
20150427_vcbuild_fix.patch text/x-diff 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2015-04-27 06:15:38 Missing importing option of postgres_fdw
Previous Message Kouhei Kaigai 2015-04-27 02:00:14 Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)