Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?
Date: 2020-02-10 13:53:03
Message-ID: CAMsr+YF9ve=TXOEwAJ6G9Z0AVMFGquEU1uKV8XNAJqCHYN8qHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 10 Feb 2020 at 20:14, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
>
> "adminpack.obj : error LNK2019: sφmbolo externo indefinido _Int64GetDatum referenciado na funτπo _pg_file_write [C:\dll\postgres\adminpack.vcxproj]
> .\Release\adminpack\adminpack.dll : fatal error LNK1120: 1 externo nπo resolvidos [C:\dll\postgres\adminpack.vcxproj]
> Done Building Project "C:\dll\postgres\adminpack.vcxproj" (default targets) -- FAILED."

You are almost certainly trying to build with a mismatched
configuration vs toolchain. See "postgres.h" for the definition of
Int64GetDatum. It's a macro if you're on a 64-bit arch where we can
pass 64-bit fields by-value efficiently; otherwise it's a function.
You're probably trying to link 32-bit extensions against a 64-bit
postgres.

Clean everything. Completely. Set up a totally clean MSVC environment
and ensure you have ONLY the 32-bit toolchain on the PATH, only 32-bit
libraries, etc. Then retry.

Rather than building via MSVC's user interface, use msbuild.exe with
the project files PostgreSQL generates for you.

See if that helps.

I've seen many mangled setups when there are mixes of different MSVC
toolchains versions on a machine. I now maintain isolated VMs with
exactly one MSVC version on each to address the amazing level of
breakage and incompatibility that MS's various toolchains seem to
deliver.

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arseny Sher 2020-02-10 14:01:25 Re: logical copy_replication_slot issues
Previous Message Jeevan Chalke 2020-02-10 13:48:37 Re: WIP/PoC for parallel backup