heterodb / pg-strom

PG-Strom - Master development repository
http://heterodb.github.io/pg-strom/
Other
1.29k stars 162 forks source link

(VTJ-JP) Build error against PostgreSQL 15. #571

Closed ytooyama closed 1 year ago

ytooyama commented 1 year ago

I am using a tarball of pg-strom v3.3-2 downloaded from swdc. pg_strom fails to build against v15. Can you please take a look?

英語が下手なので日本語でも。 pg-strom v3.3-2のtarballを使ってビルドしたところIssueのようなエラーでmakeが通りませんでした。どのブランチ、タグを指定してチェックすると良いでしょうか?ちなみにPostgreSQL 14.5ではPG_CONFIG のPathを/usr/pgsql-14に書き換えるくらいで同じ方法でmake,buildは通っています。

# dnf install -y postgresql15-devel postgresql15-server

# rm -rf  pg_strom-3.3-2/ && rm -rf /usr/pgsql-14
# tar zvxf pg_strom-3.3-2.tar.gz && cd pg_strom-3.3-2/
# make PG_CONFIG=/usr/pgsql-15/bin/pg_config
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC  -D__PGSTROM_MODULE__=1 "-DPGSTROM_VERSION=\"3.3\"" -DCPU_ARCH=\"x86_64\" -DPGSHAREDIR=\"/usr/pgsql-15/share\" -DPGSERV_INCLUDEDIR=\"/usr/pgsql-15/include/server\" -DCUDA_INCLUDE_PATH=\"/usr/local/cuda/include\" -DCUDA_BINARY_PATH=\"/usr/local/cuda/bin\" -DCUDA_LIBRARY_PATH=\"/usr/local/cuda/lib64\" -DCUDA_MAXREGCOUNT=128 -DCMD_GPUINFO_PATH=\"/usr/pgsql-15/bin/gpuinfo\" -DPGSTROM_GITHASH=\"v3.3-2\" -I /usr/local/cuda/include -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o src/main.o src/main.c
In file included from src/main.c:12:
src/pg_strom.h:185:10: fatal error: utils/int8.h: No such file or directory
 #include "utils/int8.h"
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/main.o] Error 1
ytooyama commented 1 year ago

Software versions are as follows:

//MLNX_OFED Driver:
MLNX_OFED_LINUX-5.4-3.5.8.0-rhel8.6-x86_64

# rpm -q cuda
cuda-11.8.0-1.x86_64

# uname -srv
Linux 4.18.0-372.26.1.el8_6.x86_64 #1 SMP Sat Aug 27 02:44:20 EDT 2022

# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 (Ootpa)
kaigai commented 1 year ago

fac8972c3146d61620d60161df028bb9ae78dd1e makes PG-Strom compilable to PG15, but not tested yet.

ytooyama commented 1 year ago

fac8972...Build Success. but didn't work postgresql-15.service. 441ae38c...Build Success. but didn't work postgresql-15.service.

-- Unit postgresql-15.service has begun starting up.
Oct 25 04:02:18 ml110gen9.maas postmaster[332717]: 2022-10-25 04:02:18.695 UTC [332717] LOG:  NVRTC 11.8 is successfully loaded.
Oct 25 04:02:18 ml110gen9.maas postmaster[332717]: 2022-10-25 04:02:18.695 UTC [332717] LOG:  HeteroDB Extra module is not available
Oct 25 04:02:18 ml110gen9.maas postmaster[332717]: 2022-10-25 04:02:18.695 UTC [332717] LOG:  PG-Strom version 3.3 built for PostgreSQL 15 (git: 441ae38c31d6b93f9bc57a26a170d8e12e43b588)
Oct 25 04:02:18 ml110gen9.maas postmaster[332717]: 2022-10-25 04:02:18.695 UTC [332717] FATAL:  cannot request additional shared memory outside shmem_request_hook
Oct 25 04:02:18 ml110gen9.maas postmaster[332717]: 2022-10-25 04:02:18.695 UTC [332717] LOG:  database system is shut down
Oct 25 04:02:18 ml110gen9.maas systemd[1]: postgresql-15.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 04:02:18 ml110gen9.maas systemd[1]: postgresql-15.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- The unit postgresql-15.service has entered the 'failed' state with result 'exit-code'.
Oct 25 04:02:18 ml110gen9.maas systemd[1]: Failed to start PostgreSQL 15 database server.
-- Subject: Unit postgresql-15.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- Unit postgresql-15.service has failed.
-- 
-- The result is failed.
devrimgunduz commented 1 year ago

@kaigai any updates? PG 15 is already out.

kaigai commented 1 year ago

263e2236da2ceef96a05f47164e72c5da1e9c701 should fix the problem.

Indeed, PG15 changed API around RequestAddinShmemSpace

devrimgunduz commented 1 year ago

@kaigai thanks, but I need a release to build the RPMs. Any chance you can release a new version? Thanks!

kaigai commented 1 year ago

After some more checks. Please wait for the next week.

devrimgunduz commented 1 year ago

Thanks!

ytooyama commented 1 year ago
# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 (Ootpa)
# uname -srv
Linux 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022

# dnf install postgresql15-devel postgresql15-server

# git clone -b v3.4 https://github.com/heterodb/pg-strom.git
# cd pg-strom
# git switch -c v3.4
# make PG_CONFIG=/usr/pgsql-15/bin/pg_config
# make install PG_CONFIG=/usr/pgsql-15/bin/pg_config

# systemctl start postgresql-15.service 

I'm tried make install of PG-Strom 3.4. It worked fine.