Re: PostgreSQL 9.4 InterlockedCompareExchange appearing in mingw64-w32 causing issue with PostGIS win32 load

Поиск
Список
Период
Сортировка
От Paragon Corporation
Тема Re: PostgreSQL 9.4 InterlockedCompareExchange appearing in mingw64-w32 causing issue with PostGIS win32 load
Дата
Msg-id 9AFCC7DC636740E294BB693C2E5D4FA0@O
обсуждение исходный текст
Ответ на Re: PostgreSQL 9.4 InterlockedCompareExchange appearing in mingw64-w32 causing issue with PostGIS win32 load  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Hm.  s_lock.h does define TAS() in terms of InterlockedCompareExchange()
if WIN32_ONLY_COMPILER is defined ... but that code hasn't changed in quite
a long time.  It 
> seems like the combination of an extension built with WIN32_ONLY_COMPILER
and a core built without that flag should never have worked, if the core is
what has to link 
> in InterlockedCompareExchange.

> I wonder if there is something you're doing that results in inlining a
spinlock call given the 9.4 headers, but did not previously.  Can you narrow
down what part of 
> your code is giving rise to the undefined reference?

>            regards, tom lane

Tom,

Does it with all extensions, not just PostGIS (before I could swap between
say for example hstore mingw compiled and VC compiled and had no issue).
The Load function as you guessed shows in the extension .dll postgres.exe
reference but not clear where to tell where that is coming thru.  

I'm compiling PostgreSQL the same way in both 9.3 and 9.4:

With something that looks like this:
export MINGHOST=i686-w64-mingw32
PG_VER=9.4

./configure --prefix=${PROJECTS}/postgresql/rel/pg${PG_VER}\ --build=${MINGHOST} \ --with-pgport=8443
--disable-float8-byval--enable-cassert
 
--enable-debug \ --enable-integer-datetimes --without-zlib


With just the PG_VER being different.

What I did notice is that in 9.3, the config.log shows this for 

9.4:
LDFLAGS=-Wl,--allow-multiple-definition -Wl,--disable-auto-import
-Wl,--as-needed


and
9.3:
LDFLAGS=-Wl,--allow-multiple-definition  -Wl,--as-needed

You know what would cause those to change between versions?


I thought maybe the --disable-auto-import was doing something.

I'm trying to override the flag now to see if it makes a difference, but
having difficulty changing what I am seeing in the config.log

When I do any of the below:
export LDFLAGS=-Wl,--allow-multiple-definition -Wl,--enable-auto-import
-Wl,--as-needed
export LDFLAGS="-Wl,--allow-multiple-definition -Wl,--enable-auto-import
-Wl,--as-needed"
export LDFLAGS=-Wl,--allow-multiple-definition  -Wl,--as-needed

Thanks,
Regina





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Ross
Дата:
Сообщение: Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Следующее
От: Matteo Beccati
Дата:
Сообщение: Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready)