Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZXuq-0005hx-7w for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Nov 2020 11:22:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZXup-0002tu-6K for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Nov 2020 11:22:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZXuo-0002tm-Rb for pgsql-bugs@lists.postgresql.org; Mon, 02 Nov 2020 11:22:23 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kZXul-0002Hl-Ui for pgsql-bugs@lists.postgresql.org; Mon, 02 Nov 2020 11:22:22 +0000 Received: by mail-qt1-x829.google.com with SMTP id n63so3397985qte.4 for ; Mon, 02 Nov 2020 03:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pke-hr.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:organization:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Dg70qT0271EfMtQXkQvlVgyn7g0E4GAhZqHGxCtUZw0=; b=OmGtJJpufaY/1pdxaJBMFFBY4lxobEkyCrvozxPV4HrGUMTkeCxyzih4huy/ie7DZ+ 4uZsoqwHq3AK3pcJRH/l/pG8ebbslQmVZgpuJcn5DnXUFC292EPeIS/lSxVUom5Yuk1E qh2U9Sflr9GDzkDFhoqMCmZoBdiRFrDWQBOLZ25KFnfKRljZON2GWF+uQ93h4atynSRo wXkrotz1PjO4WTY+ujEPUsI+nvD0zXUuLHE6MlTK0rfyhA9GFc96cjwYHj+F4CKeFYB2 QHiw7pAkvh29NafU0HN4BAbEfH3N9JaPrNEyQ9f30tbu5kdpMsu+GyxolqhxE6V+ErDA zT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Dg70qT0271EfMtQXkQvlVgyn7g0E4GAhZqHGxCtUZw0=; b=ErlcUTCRVyZ8sBtJDPsjTe3czZaLqpdiRX+Eoyq3tEugclhL4KObza1LvTtrPwJImZ /b3BXOXvFssYMoLBbMlDHOiP5VGCu1RJCw/nkwOMDZ6aqp6uHZZZCSqVoOr2nzseUNFy AAE6WfKN96yQk/Mp5a2/r7FWNulAEGTjAiItH22YkuA28CiGpfzKHOmxzZtq+C4ioED5 +/14/IgSTHd+/TwL3WXEar2X7uo66eA28jidJtyOxNBjt7yDl07afJ+mCEmw5ZlRcS8F FDxO/y4UQmk/ff0J0t0pQ+cZ6nZXE/Ofj7g0SIAch9FeKTqsLR61qZXI7Bf6YAqfwxlc B3pw== X-Gm-Message-State: AOAM5309jHk7qajRjb/ro/gOwrVw3icPI3/kDs27lekunvinA07Osus4 6jeCBUcgdTJbMUcpWhuTPmObVLeOGNACgw== X-Google-Smtp-Source: ABdhPJw95GcQk7TScW66B1luiC74oWkSTzqPrYYk+q34QGXKRHHf9YL2iZ85Xi7Y4ZywjyO+Mxj5og== X-Received: by 2002:ac8:27aa:: with SMTP id w39mr14213070qtw.9.1604316136768; Mon, 02 Nov 2020 03:22:16 -0800 (PST) Received: from [192.168.1.8] (93-139-101-15.adsl.net.t-com.hr. [93.139.101.15]) by smtp.gmail.com with ESMTPSA id l16sm6362249qtr.21.2020.11.02.03.22.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 03:22:16 -0800 (PST) Subject: Re: BUG #16660: 64-bit build fails when run on a subst drive (resend) To: pgsql-bugs@lists.postgresql.org References: <16660-51307e7a02d40b1b@postgresql.org> From: =?UTF-8?Q?Jurko_Gospodneti=c4=87?= Organization: PKE sistemi d.o.o. Message-ID: Disposition-Notification-To: =?UTF-8?Q?Jurko_Gospodneti=c4=87?= Date: Mon, 2 Nov 2020 12:22:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <16660-51307e7a02d40b1b@postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi. I'm not sure what the process is here so just attempting a polite ping. I've posted a message (reattached to the bottom of this e-mail) about this problem, including a fix for it, almost a month about and there has thus far been no response nor can I see the change applied to https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/tools/msvc/Solution.pm;hb=HEAD Please let me know if I should be posting about this somewhere else. Kind regards, Jurko Gospodnetić On 7.10.2020. 18:08, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 16660 > Logged by: Jurko Gospodnetić > Email address: jurko.gospodnetic@pke.hr > PostgreSQL version: 9.6.19 > Operating system: Windows > Description: > > If you run the 64-bit postgres build from a virtual subst drive (see Windows > `help subst` command), it will fail. > > Internally it will fail to detect that the used Visual C++ compiler > executable `cl.exe` has been configured for producing 64-bit targets and > will thus configure the generated Visual Studio projects & solution for > building 32-bit targets even through the used compiler will actually be > producing 64-bit ones. > > Even deeper, the original problem stems from `cl.exe` behaviour, which seems > to produce no compiler option output when invoked as `cl /?` from a subst > drive. On one occasion it was reported that it did show compiler options on > some subst drives but not others, but this could not be reproduced later on > so such behaviour can be at most considered random. > > Invoking the executable as `cl /help` works correctly on all tested drives. > Go figure. > > > Here's a patch fixing the problem based on the code in the 9.6.19 > distribution: > > From a3ccfe68dbe5190f743cd13a4fc90faaf6478370 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= > Date: Wed, 7 Oct 2020 16:17:29 +0200 > Subject: [PATCH] patch compiler architecture detection on virtual subst > drives > > --- > src/tools/msvc/Solution.pm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm > index 7ec7120..29ebab5 100644 > --- a/src/tools/msvc/Solution.pm > +++ b/src/tools/msvc/Solution.pm > @@ -75,8 +75,13 @@ sub DeterminePlatform > { > my $self = shift; > > - # Examine CL help output to determine if we are in 32 or 64-bit mode. > - my $output = `cl /? 2>&1`; > + # examine CL help output to determine if we are in 32 or 64-bit mode > + # > + # we intentionally use `cl /help` as opposed to `cl /?` as the former > works > + # when the current drive is a virtual `subst` drive (see `help subst`) > while > + # the latter does not (noticed at least with compiler executable version > + # `Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27043 for x64`) > + my $output = `cl /help 2>&1`; > $? >> 8 == 0 or die "cl command not found"; > $self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32'; > print "Detected hardware platform: $self->{platform}\n"; >