Subject: ODBC driver on Windows 11 ARM64

From: Evan Cornell <[email-masked]>
Date: Tue, 31 Oct 2023 21:06:11 +0000

Is it possible to install postgresql ODBC driver on Windows 11 ARM64?

If required to manually compile, this is fine, if so, what are the steps?

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

[email-masked]<mailto:[email-masked]>
www.savant.com<http://www.savant.com>

Statement of Confidentiality

The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any.

CONFIDENTIALITY NOTICE:
This message may contain confidential and/or privileged material. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. If you are the intended recipient but do not wish to receive communications through this medium, please so advise the sender immediately.

---

From: Dave Cramer <[email-masked]>
Date: Wed, 1 Nov 2023 08:32:05 -0400

Hi Evan,

Yes, it would require manually compiling.  Looks like you will have to
first compile PostgreSQL on your machine.
PostgreSQL: Documentation: 16: 18.1. Building with Visual C++ or the
Microsoft Windows SDK
<https://www.postgresql.org/docs/current/install-windows-full.html>

And then use that to compile ODBC.

Directions for compiling ODBC Compiling psqlODBC on Windows (postgresql.org)
<https://odbc.postgresql.org/docs/win32-compilation.html>
Dave Cramer
www.postgres.rocks

On Wed, 1 Nov 2023 at 05:29, Evan Cornell <[email-masked]> wrote:

> *Evan Cornell*
> [email-masked]
> www.savant.com
> The contents of this e-mail message and any attachments are confidential
> and are intended solely for the addressee. The information may also be
> legally privileged. This transmission is sent in trust, and the sole
> purpose of delivery to the intended recipient. If you have received this
> transmission in error, any use, reproduction or dissemination of this
> transmission is strictly prohibited. If you are not the intended recipient,
> please immediately notify the sender by reply e-mail or at 508.683.2500 and
> delete this message and its attachments, if any.
>
>
>
> CONFIDENTIALITY NOTICE:
> This message may contain confidential and/or privileged material. Any
> unauthorized review, use, disclosure or distribution is prohibited. If you
> are not the intended recipient, please contact the sender by reply e-mail
> and destroy all copies of the original message. If you are the intended
> recipient but do not wish to receive communications through this medium,
> please so advise the sender immediately.
>

---

From: Evan Cornell <[email-masked]>
Date: Mon, 20 Nov 2023 14:17:53 +0000

Is there anyone who could help out with this? I’ve been having much difficulty attempting to compile Postgresql ODBC drivers for win11 ARM successfully.

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

On Nov 1, 2023, at 8:32 AM, Dave Cramer <[email-masked]> wrote:

Hi Evan,

Yes, it would require manually compiling.  Looks like you will have to first compile PostgreSQL on your machine.
PostgreSQL: Documentation: 16: 18.1. Building with Visual C++ or the Microsoft Windows SDK<https://www.postgresql.org/docs/current/install-windows-full.html>

Directions for compiling ODBC Compiling psqlODBC on Windows (postgresql.org)<https://odbc.postgresql.org/docs/win32-compilation.html>
Dave Cramer
www.postgres.rocks

On Wed, 1 Nov 2023 at 05:29, Evan Cornell <[email-masked]<mailto:[email-masked]>> wrote:
Is it possible to install postgresql ODBC driver on Windows 11 ARM64?

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

[email-masked]<mailto:[email-masked]>
www.savant.com<http://www.savant.com/>

CONFIDENTIALITY NOTICE:

---

From: Dave Cramer <[email-masked]>
Date: Mon, 20 Nov 2023 09:25:53 -0500

What issues are you running into?

Can you post the errors ?

Dave Cramer
www.postgres.rocks

On Mon, 20 Nov 2023 at 09:18, Evan Cornell <[email-masked]> wrote:

> Is there anyone who could help out with this? I’ve been having much
> difficulty attempting to compile Postgresql ODBC drivers for win11 ARM
> successfully.
>
>
>
> *Evan Cornell*
> Hardware Engineering
> C. 419.706.8315
> 45 Perseverance Way
> Hyannis, MA 02601
>
> [email-masked]
> www.savant.com
>
>
>
> Directions for compiling ODBC Compiling psqlODBC on Windows
> (postgresql.org) <https://odbc.postgresql.org/docs/win32-compilation.html>
> Dave Cramer
> www.postgres.rocks
>
>

---

From: Evan Cornell <[email-masked]>
Date: Mon, 20 Nov 2023 16:36:47 +0000

Dave,

Here’s my steps so far:

  1.  Create windows 11 virtual machine (Parallels Desktop 19 for Mac - running on Mac Studio M1 Max)
  2.  Referencing https://www.postgresql.org/docs/13/install-windows-full.html for all build system requirements
  3.  Install Windows Visual Studio Community 2022
     *   check "Desktop development with C++" during Visual Studio Community 2022 installation
  4.  Install ActiveState Perl 5.36.1
     *   state checkout evan-cornell-savant/Perl-5.36.1-Windows . (from Powershell)
     *   state use Perl-5.36.1-Windows (from Powershell)
  5.  Install ActiveState TCL
     *   ActiveTcl-8.6.13.0000-MSWin32-x64-559160e0.msi
  6.  Install MSYS2 for Bison and Flex
     *   https://www.msys2.org/
     *   msys2-x86_64-20231026.exe
  7.  Install GnuWin32 for Diff, Gettext
     *   https://sourceforge.net/projects/getgnuwin32/files/
     *   GetGnuWin32-0.6.3.exe
        *   change install path to C:\gnuwin32
        *   add C:\gnuwin32\bin to system PATH environment variable
  8.  Install MIT Kerberos
     *   https://web.mit.edu/Kerberos/dist/index.html
     *   kfw-4.1-amd64.msi
  9.  Install libxml2 & libxslt
     *   https://zlatkovic.com/pub/libxml/
     *   iconv-1.9.2.win32.zip
     *   libxml2-2.7.8.win32.zip
     *   libxslt-1.1.26.win32.zip
     *   unzip all 3 to C:\ and add the xxxx\bin subfolders to system PATH environment variable
  10. Install OpenSSL
     *   https://slproweb.com/products/Win32OpenSSL.html
     *   Win64ARMOpenSSL-3_1_4.msi
  11. Install Python
     *   https://www.python.org/ftp/python/3.12.0/python-3.12.0-arm64.exe
     *   python-3.12.0-arm64.exe
        *   use admin privileges when installing; add python.exe to PATH
        *   Disable path length limit
  12. Download source for Postgresql v13.10 (This is the version that is running on the database that the ODBC driver is ultimately needed to access)
        *   https://ftp.postgresql.org/pub/source/v13.10/postgresql-13.10.tar.bz2
        *   copy postgresql-13.10 folder to C:\
        *   start ARM64 Native Tools Command Prompt for VS 2022
        *   cd C:\postgresql-13.10\src\tools\msvc
        *   build
           *
errorProject "C:\postgresql-13.10\pgsql.sln" on node 1 (default targets).
C:\postgresql-13.10\pgsql.sln.metaproj : error MSB4126: The specified solution configuration "Release|arm64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [C:\postgresql-13.10\pgsql.sln]

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

On Nov 20, 2023, at 9:25 AM, Dave Cramer <[email-masked]> wrote:

Dave Cramer
www.postgres.rocks

On Mon, 20 Nov 2023 at 09:18, Evan Cornell <[email-masked]<mailto:[email-masked]>> wrote:
Is there anyone who could help out with this? I’ve been having much difficulty attempting to compile Postgresql ODBC drivers for win11 ARM successfully.

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Hi Evan,

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

CONFIDENTIALITY NOTICE:

---

From: Dave Cramer <[email-masked]>
Date: Mon, 20 Nov 2023 11:54:19 -0500

+Andres Freund <[email-masked]>

On Mon, 20 Nov 2023 at 11:36, Evan Cornell <[email-masked]> wrote:

>    2. Referencing
>    https://www.postgresql.org/docs/13/install-windows-full.html for all
>    build system requirements
>       - check "Desktop development with C++" during Visual Studio
>       Community 2022 installation
>       - *state checkout evan-cornell-savant/Perl-5.36.1-Windows . *(from
>       Powershell)
>       - *state use Perl-5.36.1-Windows *(from Powershell)
>       - ActiveTcl-8.6.13.0000-MSWin32-x64-559160e0.msi
>       - https://www.msys2.org/
>       - msys2-x86_64-20231026.exe
>       - https://sourceforge.net/projects/getgnuwin32/files/
>       - GetGnuWin32-0.6.3.exe
>          - change install path to C:\gnuwin32
>          - add C:\gnuwin32\bin to system PATH environment variable
>       8. Install MIT Kerberos
>       - https://web.mit.edu/Kerberos/dist/index.html
>       - kfw-4.1-amd64.msi
>       - https://zlatkovic.com/pub/libxml/
>       - iconv-1.9.2.win32.zip
>       - libxml2-2.7.8.win32.zip
>       - libxslt-1.1.26.win32.zip
>       - unzip all 3 to C:\ and add the xxxx\bin subfolders to system PATH
>       environment variable
>    10. Install OpenSSL
>       - https://slproweb.com/products/Win32OpenSSL.html
>       - Win64ARMOpenSSL-3_1_4.msi
>    11. Install Python
>       - https://www.python.org/ftp/python/3.12.0/python-3.12.0-arm64.exe
>       - python-3.12.0-arm64.exe
>          - use admin privileges when installing; add python.exe to PATH
>          - Disable path length limit
>       12. Download source for Postgresql v13.10 (This is the version that
>    is running on the database that the ODBC driver is ultimately needed to
>    access)
>       -
>          https://ftp.postgresql.org/pub/source/v13.10/postgresql-13.10.tar.bz2
>          - copy *postgresql-13.10 *folder to C:\
>          - start* ARM64 Native Tools Command Prompt for VS 2022*
>          - *cd C:\postgresql-13.10\src\tools\msvc*
>          - *build*
>             - *errorProject "C:\postgresql-13.10\pgsql.sln" on node 1
>             (default targets). *
>             *C:\postgresql-13.10\pgsql.sln.metaproj : error MSB4126: The
>             specified solution configuration "Release|arm64" is invalid. Please specify
>             a valid solution configuration using the Configuration and Platform
>             properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug
>             /p:Platform="Any CPU") or leave those properties blank to use the default
>             solution configuration. [C:\postgresql-13.10\pgsql.sln]*
>
>
That would certainly be a blocker!
I would try building it with Meson. PostgreSQL: Documentation: 16:
17.4. Building and Installation with Meson
<https://www.postgresql.org/docs/current/install-meson.html>

Andres may be able to help with that. I've added him to the thread

Dave

>> (postgresql.org)

---

From: Evan Cornell <[email-masked]>
Date: Tue, 21 Nov 2023 14:32:57 +0000

Can meson build be done from Windows 11 VM?

Also, if the database I need to access is running Postgresql v13.10, do I need to build that version of postgresql and postgresql odbc drivers, or ought I to just use the latest versions?

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

On Nov 20, 2023, at 11:54 AM, Dave Cramer <[email-masked]> wrote:

+Andres Freund<mailto:[email-masked]>

On Mon, 20 Nov 2023 at 11:36, Evan Cornell <[email-masked]<mailto:[email-masked]>> wrote:
Dave,

Here’s my steps so far:

That would certainly be a blocker!
I would try building it with Meson. PostgreSQL: Documentation: 16: 17.4. Building and Installation with Meson<https://www.postgresql.org/docs/current/install-meson.html>

Dave

Dave Cramer
www.postgres.rocks

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Hi Evan,

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

CONFIDENTIALITY NOTICE:

---

From: Dave Cramer <[email-masked]>
Date: Tue, 21 Nov 2023 09:34:48 -0500

> Can meson build be done from Windows 11 VM?

I think you are in uncharted territory here. Hence my adding Andres to the
discussion.

>
> Also, if the database I need to access is running Postgresql v13.10, do I
> need to build that version of postgresql and postgresql odbc drivers, or
> ought I to just use the latest versions?
>

The latest should work fine.

Dave

>>       - unzip all 3 to C:\ and add the xxxx\bin subfolders to system
>>       PATH environment variable
>>    10. Install OpenSSL
>>       12. Download source for Postgresql v13.10 (This is the version
>>    that is running on the database that the ODBC driver is ultimately needed
>>    to access)
>>       -
>>>> The contents of this e-mail message and any attachments are
>>>> confidential and are intended solely for the addressee. The information may
>>>> also be legally privileged. This transmission is sent in trust, and the
>>>> sole purpose of delivery to the intended recipient. If you have received
>>>> this transmission in error, any use, reproduction or dissemination of this

---

From: Evan Cornell <[email-masked]>
Date: Tue, 21 Nov 2023 14:36:48 +0000

Dave,

Very good. I’ll spend a little time trying out Meson build on latest versions of everything. I’ll document my steps as I go.

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

On Nov 21, 2023, at 9:34 AM, Dave Cramer <[email-masked]> wrote:

On Tue, 21 Nov 2023 at 09:33, Evan Cornell <[email-masked]<mailto:[email-masked]>> wrote:
Can meson build be done from Windows 11 VM?

I think you are in uncharted territory here. Hence my adding Andres to the discussion.

Dave

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Here’s my steps so far:

Dave

Dave Cramer
www.postgres.rocks

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Hi Evan,

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

CONFIDENTIALITY NOTICE:

---

From: Dave Cramer <[email-masked]>
Date: Wed, 24 Jan 2024 15:29:58 -0500

On Tue, 21 Nov 2023 at 09:36, Evan Cornell <[email-masked]> wrote:

> Dave,
>
> Very good. I’ll spend a little time trying out Meson build on latest
> versions of everything. I’ll document my steps as I go.
>
> Thanks,
>
> *Evan Cornell*
> Hardware Engineering
> C. 419.706.8315
> 45 Perseverance Way
> Hyannis, MA 02601
>
> [email-masked]
> www.savant.com
>
>
>
>>>             *C:\postgresql-13.10\pgsql.sln.metaproj : error MSB4126:
>>>             The specified solution configuration "Release|arm64" is invalid. Please
>>>             specify a valid solution configuration using the Configuration and Platform
Hi Evan,

I've been able to build psqlodbc on windows 11 pro ARM.

Now getting the installer to build. Wix has to be upgraded to v4 and then
wix used instead of candle.

Any progress on your end ?

Dave

---

From: Evan Cornell <[email-masked]>
Date: Wed, 24 Jan 2024 20:35:21 +0000

Dave,

Wow great progress! I gave up and moved back to an intel-based computer, but I'm cc'ing Mike Botelho from Savant IT, who will be interested in this, because eventually we'll have to get this working..

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

________________________________
From: Dave Cramer <[email-masked]>
Sent: Wednesday, January 24, 2024 3:29 PM
To: Evan Cornell <[email-masked]>
Cc: Andres Freund <[email-masked]>; [email-masked] <[email-masked]>
Subject: Re: [EXT] ODBC driver on Windows 11 ARM64

On Tue, 21 Nov 2023 at 09:36, Evan Cornell <[email-masked]<mailto:[email-masked]>> wrote:
Dave,

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Dave

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Here’s my steps so far:

Dave

Dave Cramer
www.postgres.rocks

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

Hi Evan,

Thanks,

Evan Cornell
Hardware Engineering
C. 419.706.8315
45 Perseverance Way
Hyannis, MA 02601

CONFIDENTIALITY NOTICE:

Hi Evan,

Now getting the installer to build. Wix has to be upgraded to v4 and then wix used instead of candle.

Dave

---

From: Dave Cramer <[email-masked]>
Date: Wed, 24 Jan 2024 16:43:32 -0500

On Wed, 24 Jan 2024 at 15:35, Evan Cornell <[email-masked]> wrote:

> Dave,
>
> Wow great progress! I gave up and moved back to an intel-based computer,
> but I'm cc'ing Mike Botelho from Savant IT, who will be interested in this,
> because eventually we'll have to get this working..
>
> Thanks,
>
>

see win build works by davecramer · Pull Request #2 ·
postgresql-interfaces/psqlodbc (github.com)
<https://github.com/postgresql-interfaces/psqlodbc/pull/2>

Dave Cramer
www.postgres.rocks

---

From: Dave Cramer <[email-masked]>
Date: Fri, 26 Jan 2024 09:57:04 -0500

> <https://github.com/postgresql-interfaces/psqlodbc/pull/2>
Well I wish I could say I was successful, but so far all I can create is an
x64 build, not an arm64 build