Error building Timescale "From Source" on Windows

In brief:
C2146, C2065, C2040 errors when building Timescale 2.9.3 from source on Windows machine

TimescaleDB version:
2.9.3

PostgreSQL version:
13

Other software:
OS:
Windows

Platform:
Install method: [Source|Docker|Deb/Apt|RPM|Homebrew|Other|Not relevant]
Source

Environment: [Production, Test, Development]
Development

I have an existing Postgres 13 database installed on my localhost. I would like to add Timescale to a couple tables within that database without needing to migrate the entire database to Timescale. I am following the “Self-Hosted From Source” instructions, but receive errors when I build the extension. Here are some of the errors I receive:

$ cmake --build ./build --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

timescaledb.vcxproj → C:\sites\timescaledb\build\src\Release\timescaledb-2.9.3.dll
timescaledb-loader.vcxproj → C:\sites\timescaledb\build\src\loader\Release\timescaledb.dll
dist_copy.c
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1106): error C2146: syntax error: missing ‘;’ before identifier ‘fields’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1106): error C2065: ‘fields’: undeclared identifier [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1106): warning C4047: ‘=’: ‘int’ differs in levels of indirection from ‘char **’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1107): error C2040: ‘restrict’: ‘char *’ differs in levels of indirection from ‘char **’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1107): error C2146: syntax error: missing ‘;’ before identifier ‘output’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1107): error C2065: ‘output’: undeclared identifier [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1107): warning C4047: ‘=’: ‘int’ differs in levels of indirection from ‘char *’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]
C:\sites\timescaledb\tsl\src\remote\dist_copy.c(1111): error C2146: syntax error: missing ‘;’ before identifier ‘src’ [C:\sites\timescaledb\build\tsl\src\timescaledb-tsl.vcxproj]

I have then tried to continue with the installation process and install TimescaleDB, but that results in similar errors

Hi @Polyester1065, I see your pain and sorry for the delay. For some reason the anti spam system flagged your message.

I’m not very familiar with windows development with C and if you are not familiar too, try another method, like Timescale cloud or docker. Building C code with several extensions and dependencies on windows need some advanced knowledge of development environment. I’m not sure if people develop too much on windows.

Can you use Timescale cloud or docker to add Timescale to existing databases? I didn’t think so.

Suddenly you need to restore the backup. We’re releasing a migration tool that will make it very easy to migrate much faster than regular tools. Take a look on hypershift and let us know if it helps you!