Re: Visual Studio 2012 RC

From: Noah Misch <noah(at)leadboat(dot)com>
To: Brar Piening <brar(at)gmx(dot)de>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Visual Studio 2012 RC
Date: 2012-10-08 12:11:28
Message-ID: 20121008121128.GA2248@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 07, 2012 at 08:30:22PM +0200, Brar Piening wrote:
> Noah Misch wrote:
>> I'm marking this patch Waiting on Author, but the changes needed to
>> get it Ready for Committer are fairly trivial. Thanks, nm
>
> Thanks for your review and sorry for my delayed response - I've been on
> vacation.
>
> I'll look into adressing your comments and suggestions within the next
> few days.

Thanks. I decided to try a 32-bit build, but Solution::DeterminePlatform
detected it as x64. Its shibboleth is no longer valid; the cl.exe shipping
with VS 2012 Express for Desktop has a /favor option for both architectures:

32clhelp:/favor:<blend|ATOM> select processor to optimize for, one of:
64clhelp:/favor:<blend|AMD64|INTEL64|ATOM> select processor to optimize for, one of:

Overlaying the first attached change fixed detection for this particular
compiler, but I have not checked compatibility with older versions. Do you
have VS 2008 and/or VS 2010 handy? Having worked around that, the build
eventually failed like this:

Creating library Debug\postgres\postgres.lib and object Debug\postgres\postgres.exp
postgres.exp : error LNK2001: unresolved external symbol _xmm(at)41f00000000000000000000000000000 [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj]
postgres.exp : error LNK2001: unresolved external symbol _xmm(at)80000000000000008000000000000000 [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj]
postgres.exp : error LNK2001: unresolved external symbol _xmm(at)80000000800000008000000080000000 [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj]
.\Debug\postgres\postgres.exe : fatal error LNK1120: 3 unresolved externals [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj]
The command exited with code 1120.
Done executing task "Link" -- FAILED.

This compiler emits _xmm symbols automatically, where needed. The second
attached change lets the build complete and pass tests, but I can't readily
explain why it's necessary. In the 64-bit build, the _xmm symbols export
normally (albeit, I presume, needlessly). I hoped to find some rationale for
the preexisting gendef.pl exclusion of _real, which seems to resemble _xmm in
origin and use. Magnus/anyone, can you shed light on our exclusion of "_real"
symbols from .def files?

In any event, if these incremental changes seem sane to you, please merge them
into your next version.

nm

Attachment Content-Type Size
vs2012-detect-32bit.patch text/plain 654 bytes
vs2012-exclude-_xmm.patch text/plain 475 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-10-08 12:17:58 Re: Promoting a standby during base backup (was Re: Switching timeline over streaming replication)
Previous Message Noah Misch 2012-10-08 11:59:45 Re: Libxml2 load error on Windows