Re: narwhal and PGDLLIMPORT

Hiroshi Inoue <inoue@tpf.co.jp>

From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Craig Ringer <craig@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2014-02-14T01:05:14Z
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 →
  1. MinGW: Link with shell32.dll instead of shfolder.dll.

  2. Centralize getopt-related declarations in a new header file pg_getopt.h.

  3. Get rid of use of dlltool in Mingw builds.

  4. Export a few more symbols required for test_shm_mq module.

  5. Export set_latch_on_sigusr1 symbol for Windows.

  6. Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the

(2014/02/13 9:51), Hiroshi Inoue wrote:
> (2014/02/12 12:28), Inoue, Hiroshi wrote:
>> (2014/02/12 8:30), Tom Lane wrote:
>>> I wrote:
>>>> Hiroshi Inoue <inoue@tpf.co.jp> writes:
>>>>> I tried MINGW port with the attached change and successfully built
>>>>> src and contrib and all pararell regression tests were OK.
>>>
>>>> I cleaned this up a bit (the if-nesting in Makefile.shlib was making
>>>> my head hurt, not to mention that it left a bunch of dead code) and
>>>> committed it.
>>>
>>> Hm ... according to buildfarm member narwhal, this doesn't work so well
>>> for plperl:
>>>
>>> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -Wno-comment   -shared -o plperl.dll  plperl.o SPI.o Util.o -L../../../src/port -L../../../src/common -Wl,--allow-multiple-definition -L/mingw/lib  -Wl,--as-needed   -LC:/Perl/lib/CORE -lperl58 -L../../../src/backend -lpostgres -lpgcommon -lpgport -lintl -lxslt -lxml2 -lssleay32 -leay32 -lz -lm  -lws2_32 -lshfolder -Wl,--export-all-symbols -Wl,--out-implib=libplperl.a
>>> Cannot export .idata$4: symbol not found
>>> Cannot export .idata$5: symbol not found
>>> Cannot export .idata$6: symbol not found
>>> Cannot export .text: symbol not found
>>> Cannot export perl58_NULL_THUNK_DATA: symbol not found
>>> Creating library file: libplperl.a
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [plperl.dll] Error 1
>>
>> Oops I forgot to inclule plperl, tcl or python, sorry. I would
>> retry build operations with them. Unfortunately it would take
>> pretty long time because build operations are pretty (or veeery
>>    in an old machine) slow.
>>
>>> Not very clear what's going on there; could this be a problem in
>>> narwhal's admittedly-ancient toolchain?
> 
> As for build, plperl and pltcl are OK on both Windows7+gcc4.6.1
> machine and Windows Vista+gcc3.4.5 machine. plpython is OK on
> gcc4.6.1 machine but causes a *initializer element is not constant*
> error on gcc3.4.5 machine.
> I've not run regression test yet.

Rebuild with --disable-auto-import causes errors in contrib on
both machines. Errors occur in pg_buffercache, pg_stat_statements,
 postgres_fdw and test_shm_mq. --enable-auto-import cures all of them.

regards,
Hiroshi Inoue