Re: narwhal and PGDLLIMPORT - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: narwhal and PGDLLIMPORT
Date
Msg-id 52EEEF4B.4060700@2ndquadrant.com
Whole thread Raw
In response to narwhal and PGDLLIMPORT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: narwhal and PGDLLIMPORT  (Ashesh Vashi <ashesh.vashi@enterprisedb.com>)
Re: narwhal and PGDLLIMPORT  (Amit Kapila <amit.kapila16@gmail.com>)
Re: narwhal and PGDLLIMPORT  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 02/02/2014 09:03 AM, Tom Lane wrote:
> According to the buildfarm database, narwhal is running a gcc build on
> Windows 2003.  That hardly seems like a mainstream use case.  I could
> believe that it might be of interest to developers, but clearly no
> developers are actually running such a build.
> 
> I think we should give serious consideration to desupporting this
> combination

I'm not a fan of MinGW (gcc) on Windows, it's a right pain. It's also
the only open source compiler currently supported for PostgreSQL on
Windows - practically the only one available. I don't know about you,
but I'm not too keen on assuming Microsoft will continue to offer free
toolchains that're usable for our purposes. They're crippling their free
build tools more and more with each release, which isn't a good trend.

If you wish to eliminate PGDLLIMPORT from the codebase the correct
approach would be building with --export-all-symbols (a MinGW extension
flag to gcc). That would make the MinGW builds consistent with the MSVC
build, which generates a .def file that exports all symbols.

As for why PGDLLIMPORT appears to be required in some places on the MSVC
build, so far it's looking like we auto-export functions, but not
necessarily variables. I'd need to read the fairly scary MSVC build
genreator scripts in detail to confirm that, to see how they produce
their DEF files; that'll have to wait until after I've got the
row-security work sorted out.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Multiple calls to json_array_elements slow down nonlinearly
Next
From: Tomas Vondra
Date:
Subject: Re: GIN improvements part2: fast scan