Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNVpu-00076e-KS for pgsql-hackers@postgresql.org; Sun, 14 Oct 2012 21:35:02 +0000 Received: from mailout-de.gmx.net ([213.165.64.22]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TNVpn-00059P-Jj for pgsql-hackers@postgresql.org; Sun, 14 Oct 2012 21:35:02 +0000 Received: (qmail invoked by alias); 14 Oct 2012 21:34:54 -0000 Received: from brln-4dba3bf0.pool.mediaWays.net (EHLO [192.168.178.26]) [77.186.59.240] by mail.gmx.net (mp028) with SMTP; 14 Oct 2012 23:34:54 +0200 X-Authenticated: #875099 X-Provags-ID: V01U2FsdGVkX19h9H8YdZ5hdA1RRtCEF+VPJ0Zi58i41VKibJo2St fzKmZ4OuKhrxQi Message-ID: <507B2FFE.2050905@gmx.de> Date: Sun, 14 Oct 2012 23:34:54 +0200 From: Brar Piening User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121005 Thunderbird/16.0 MIME-Version: 1.0 To: Noah Misch CC: Heikki Linnakangas , Magnus Hagander , pgsql-hackers Subject: Re: Visual Studio 2012 RC References: <4FCA84F6.5090706@gmx.de> <4FD3F553.9060105@gmx.de> <4FEB0D39.6080108@enterprisedb.com> <50526BA6.3030103@gmx.de> <20121002011201.GC30396@tornado.leadboat.com> <5071CA3E.5040509@gmx.de> <20121008121128.GA2248@tornado.leadboat.com> In-Reply-To: <20121008121128.GA2248@tornado.leadboat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/806 X-Sequence-Number: 215042 Noah Misch wrote: > 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: select processor to optimize for, one of: > 64clhelp:/favor: 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? Older compilers work fine but localized ones will probably cause trouble (for -> für in german). I've decided to change the regex to "/^\/favor:<.+AMD64/" in my current version of the patch as this is not very likely to appear in a 32-bit environment and will not be subject ot localization problems. > 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@41f00000000000000000000000000000 [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj] > postgres.exp : error LNK2001: unresolved external symbol _xmm@80000000000000008000000000000000 [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj] > postgres.exp : error LNK2001: unresolved external symbol _xmm@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? I kind of feel like excluding the _xmm symbols is the right thing to do but - like you - I can't explain why they cause problems in a x86 build. Regards, Brar