timescale / homebrew-tap

TimescaleDB Homebrew tap, containing formulas for the database, tools, etc.
16 stars 16 forks source link

Error "Unsupported PostgreSQL version" with timescaleDB 2.2 and postgresql 13.1 #19

Open mozhou-tech opened 3 years ago

mozhou-tech commented 3 years ago

My OS is macos big sur.

here is my log, please help,

==> Installing timescale/tap/timescaledb ==> ./bootstrap -DREGRESS_CHECKS=OFF -DPROJECT_INSTALL_METHOD="brew" ==> cd ./build && make Last 15 lines from /Users/jerrylau/Library/Logs/Homebrew/timescaledb/02.build: make[2]: *** [tsl/src/CMakeFiles/timescaledb-tsl.dir/deparse.c.o] Error 1 In file included from /tmp/timescaledb-20210521-47798-12gv2y3/timescaledb/tsl/src/dist_backup.c:20: In file included from /tmp/timescaledb-20210521-47798-12gv2y3/timescaledb/src/catalog.h:17: In file included from /tmp/timescaledb-20210521-47798-12gv2y3/timescaledb/src/scanner.h:15: In file included from /tmp/timescaledb-20210521-47798-12gv2y3/timescaledb/src/utils.h:15: /tmp/timescaledb-20210521-47798-12gv2y3/timescaledb/src/compat.h:43:2: error: "Unsupported PostgreSQL version"

error "Unsupported PostgreSQL version"

^ 1 error generated. make[2]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/dist_util.c.o] Error 1 make[2]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/data_node.c.o] Error 1 1 error generated. make[2]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/dist_backup.c.o] Error 1 make[1]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/all] Error 2 make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/timescale/homebrew-tap/issues

These open issues may also help: Unable to install Timescaledb, mac Catalina https://github.com/timescale/homebrew-tap/issues/15 yates:~ jerrylau$ brew install timescaledb Updating Homebrew... ==> Installing timescaledb from timescale/tap ==> Downloading https://timescalereleases.blob.core.windows.net/homebrew/timescaledb-2.2.1.tar.lzma Already downloaded: /Users/jerrylau/Library/Caches/Homebrew/downloads/a91ce2903bc996c73f7023ec347562f29b67b260d834cffbe866282357054a2d--timescaledb-2.2.1.tar.lzma ==> ./bootstrap -DREGRESS_CHECKS=OFF -DPROJECT_INSTALL_METHOD="brew" ==> cd ./build && make Last 15 lines from /Users/jerrylau/Library/Logs/Homebrew/timescaledb/02.build: In file included from /tmp/timescaledb-20210521-49462-9glyjh/timescaledb/src/scanner.h:15: In file included from /tmp/timescaledb-20210521-49462-9glyjh/timescaledb/src/utils.h:15: /tmp/timescaledb-20210521-49462-9glyjh/timescaledb/src/compat.h:43:2: error: "Unsupported PostgreSQL version"

error "Unsupported PostgreSQL version"

^ make[2]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/deparse.c.o] Error 1 make[2]: [tsl/src/CMakeFiles/timescaledb-tsl.dir/chunk_api.c.o] Error 1

JuanitoFatas commented 3 years ago

@tenstone The latest formula 2.3.0 should help you, could you try:

brew reinstall timescaledb
volvo007 commented 3 years ago

Got the same issue when tried to install timescaledb through brew install timescaledb. The main reason I guess is due this not matching versions that the timescaledb provided (timescaledb 2.2.x only supports up to postgresql@13.1, but brew will install postgresql@13.3 now).

You may like to run brew install postgresql@13.1 to install the latest compatible version, but not recommend because when other extensions come (like postgis), you'll get similar issue as well. Or you may like to wait for days till the team solved this issue, but you can still compile and install a 2.3.x version to start your work now. The steps I tried listed here:

  1. download the timescaledb git repo as the official site mentioned.
  2. Notice that in this case, we need to run git checkout 2.3.x. We'll change to 2.3.x branch then we can run the orders next.
  3. You may encounter compiling error while running ./bootstrap. Then try ./bootstrap -DREGRESS_CHECKS=OFF -DUSE_OPENSSL=0 -DLINTER=OFF instead. When run this loose command if it shows openssl errors, then you may need to provide openssl environment to Xcode as I mentioned here
  4. After all these commands, you should install timescaledb successfully. You can now run initdb -D <database_path> -U postgres to initial your first database. You need to remember the path of postgresql.conf this configure file. Meanwhile, recommend to assign the postgresql path into the running environment.
  5. Then still recommend to run brew install timescaledb-tools to get other convenience from this goLang based toolkit. Such as automatic timescaledb settings by using timescale-tune --conf-path <your postgres config path>
  6. Don't forget to check if shared_preload_libraries = 'timescaledb' is set correctly in the configure file. Then restart the postgres service by using pg_ctl commands.
  7. You can create timescaledb extension successfully, which I confirmed all steps above on Big Sur.
emmanuelvr commented 3 years ago

Hey @volvo007 thanks for your help here, with all the instructions you gave I was able to get TimescaleDB up and running on Postgres 13.3 on my M1 Mac Mini

PD: As as side note, I had to run brew link --force openssl to make it work