pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: rand48 replacement
Date: Thu, 30 Sep 2021 10:23:00 +0200 (CEST)
Message-ID: <alpine.DEB.2.22.394.2109301015090.1807498@pseudo> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2109251929180.3216312@pseudo>
References: <alpine.DEB.2.22.394.2105241211230.165418@pseudo>
	<CAEZATCXcmccPQismOioD5kr2NMyMoeLpDaesizzoKh8M-BK5Dw@mail.gmail.com>
	<alpine.DEB.2.22.394.2107041718570.2359988@pseudo>
	<CAEZATCWnrVACs2FM219dSkh1ivic8KiGkPEVPtu-MO3nCOYm7A@mail.gmail.com>
	<alpine.DEB.2.22.394.2107042204240.2359988@pseudo>
	<3136e2672d5ab395521bae05a80df469@postgrespro.ru>
	<alpine.DEB.2.22.394.2107060805140.3858351@pseudo>
	<3b12e2dea4c3c33665c33b40c95349ef@postgrespro.ru>
	<alpine.DEB.2.22.394.2107060956180.3858351@pseudo>
	<8904daa4a916b4990b11d7140e0ff81f@postgrespro.ru>
	<alpine.DEB.2.22.394.2107072036140.4160419@pseudo>
	<CAJ7c6TOjfmtyBFZUzGLTSvSGydxUTjY67kn-FFrSUBgEpy7zrw@mail.gmail.com>
	<alpine.DEB.2.22.394.2109250938560.3216312@pseudo>
	<alpine.DEB.2.22.394.2109251643350.3216312@pseudo>
	<alpine.DEB.2.22.394.2109251824550.3216312@pseudo>
	<alpine.DEB.2.22.394.2109251901340.3216312! @pseudo>
	<2520097.1632590602@sss.pgh.pa.us>
	<alpine.DEB.2.22.394.2109251929180.3216312@pseudo>


> Attached v15 also does call srandom if it is there, and fixes yet another 
> remaining random call.

I think that I have now removed all references to "random" from pg source. 
However, the test still fails on windows, because the linker does not find 
a global variable when compiling extensions, but it seems to find the 
functions defined in the very same file...

Link:
  4130  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:".\Release\tablefunc\tablefunc.dll" /INCREMENTAL:NO /NOLOGO Release/postgres/postgres.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB:libc /DEF:"./Release/tablefunc/tablefunc.def" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:".\Release\tablefunc\tablefunc.pdb" /SUBSYSTEM:CONSOLE /STACK:"4194304" /TLBID:1 /DYNAMICBASE:NO /NXCOMPAT /IMPLIB:"Release/tablefunc/tablefunc.lib" /MACHINE:X64 /ignore:4197 /DLL .\Release\tablefunc\win32ver.res
  4131  .\Release\tablefunc\tablefunc.obj
  4132     Creating library Release/tablefunc/tablefunc.lib and object Release/tablefunc/tablefunc.exp
  4133 tablefunc.obj : error LNK2001: unresolved external symbol pg_global_prng_state [C:\projects\postgresql\tablefunc.vcxproj]
  4134 .\Release\tablefunc\tablefunc.dll : fatal error LNK1120: 1 unresolved externals [C:\projects\postgresql\tablefunc.vcxproj]
  4135 Done Building Project "C:\projects\postgresql\tablefunc.vcxproj" (default targets) -- FAILED.

The missing symbol is really defined in common/pg_prng.c which AFAICT is 
linked with postgres.

If someone experienced with the windows compilation chain could give a 
hint of what is needed, I'd appreciate it!

-- 
Fabien.





view thread (59+ messages)  latest in thread

Message-ID: <alpine.DEB.2.22.394.2109301015090.1807498@pseudo>
Permalink:  ../alpine.DEB.2.22.394.2109301015090.1807498@pseudo/
Also on:    postgresql.org/message-id/alpine.DEB.2.22.394.2109301015090.1807498@pseudo

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: coelho@cri.ensmp.fr, tgl@sss.pgh.pa.us, aleksander@timescale.com
  Subject: Re: rand48 replacement
  In-Reply-To: <alpine.DEB.2.22.394.2109301015090.1807498@pseudo>
  References: <alpine.DEB.2.22.394.2105241211230.165418@pseudo> <CAEZATCXcmccPQismOioD5kr2NMyMoeLpDaesizzoKh8M-BK5Dw@mail.gmail.com> <alpine.DEB.2.22.394.2107041718570.2359988@pseudo> <CAEZATCWnrVACs2FM219dSkh1ivic8KiGkPEVPtu-MO3nCOYm7A@mail.gmail.com> <alpine.DEB.2.22.394.2107042204240.2359988@pseudo> <3136e2672d5ab395521bae05a80df469@postgrespro.ru> <alpine.DEB.2.22.394.2107060805140.3858351@pseudo> <3b12e2dea4c3c33665c33b40c95349ef@postgrespro.ru> <alpine.DEB.2.22.394.2107060956180.3858351@pseudo> <8904daa4a916b4990b11d7140e0ff81f@postgrespro.ru> <alpine.DEB.2.22.394.2107072036140.4160419@pseudo> <CAJ7c6TOjfmtyBFZUzGLTSvSGydxUTjY67kn-FFrSUBgEpy7zrw@mail.gmail.com> <alpine.DEB.2.22.394.2109250938560.3216312@pseudo> <alpine.DEB.2.22.394.2109251643350.3216312@pseudo> <alpine.DEB.2.22.394.2109251824550.3216312@pseudo> <2520097.1632590602@sss.pgh.pa.us> <alpine.DEB.2.22.394.2109251929180.3216312@pseudo> <alpine.DEB.2.22.394.2109301015090.1807498@pseudo>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox