Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: NISHIYAMA Tomoaki <tomoakin@staff.kanazawa-u.ac.jp>
Cc: pgsql-hackers@postgresql.org, Magnus Hagander <magnus@hagander.net>
Date: 2011-12-08T17:46:19Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove troublesome Asserts in cost_mergejoin().
- ff68b256a533 9.2.0 cited
-
Enable building with the Mingw64 compiler.
- 91812df4ed0f 9.1.0 cited
Attachments
- mingw-w64-32.patch (text/x-patch) patch
On 12/05/2011 06:27 PM, Andrew Dunstan wrote: > > > $ cat regression.diffs > *** > > C:/MinGW/msys/1.0/home/pgrunner/bf/root32/HEAD/pgsql/src/test/regress/expected/float8-exp-three-digits-win32.out > Fri Nov 25 14:24:49 2011 > --- > > C:/MinGW/msys/1.0/home/pgrunner/bf/root32/HEAD/pgsql/src/test/regress/results/float8.out > Mon Dec 5 18:17:36 2011 > *************** > *** 382,388 **** > SET f1 = FLOAT8_TBL.f1 * '-1' > WHERE FLOAT8_TBL.f1 > '0.0'; > SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; > ! ERROR: value out of range: overflow > SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; > ERROR: value out of range: overflow > SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; > --- 382,396 ---- > SET f1 = FLOAT8_TBL.f1 * '-1' > WHERE FLOAT8_TBL.f1 > '0.0'; > SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; > ! bad | ?column? > ! -----+------------------ > ! | 0 > ! | -3.484e+201 > ! | -1.0043e+203 > ! | -Infinity > ! | -1.2345678901234 > ! (5 rows) > ! > SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; > ERROR: value out of range: overflow > SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; > > ====================================================================== > > > This is apparently an optimization bug in the compiler. If I turn optimization off (CFLAGS=-O0) it goes away. Ick. So at the moment I'm a bit blocked. I can't really file a bug because the compiler can't currently be used to build postgres, I don't have time to construct a self-contained test case, and I don't want to commit changes to enable the compiler until the issue is solved. FYI I've been testing with the attached patch. We'll need to construct a configure test for HAVE_CRTDEFS_H. cheers andrew