hydradatabase / hydra

Hydra: Column-oriented Postgres. Add scalable analytics to your project in minutes.
https://www.hydra.so
Apache License 2.0
2.84k stars 78 forks source link

[Bug]: error: unknown argument: '-no-opaque-pointers' #271

Open Eric-zch opened 1 week ago

Eric-zch commented 1 week ago

What's wrong?

I got error: unknown argument: '-no-opaque-pointers' when running the make command:

[root@server1 columnar]# make
make -C src/backend/columnar all
make[1]: Entering directory '/tmp/hydra/columnar/src/backend/columnar'
/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2   -I '/tmp/hydra/columnar/src/include' -I'../../../src/include' -I/usr/pgsql-14/include -I/tmp/hydra/columnar/vendor/safestringlib/include -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o columnar.bc columnar.c
error: unknown argument: '-no-opaque-pointers'
make[1]: *** [/usr/pgsql-14/lib/pgxs/src/makefiles/../../src/Makefile.global:1084: columnar.bc] Error 1
make[1]: Leaving directory '/tmp/hydra/columnar/src/backend/columnar'
make: *** [Makefile:18: extension] Error 2

This was executed on redhat ppc64le linux environment, and I have postgreql14.11 installed on this server I followed below steps for the make

export POSTGRES_VERSION=14
export PGROOT="/usr/pgsql-14"
export PATH="${PGROOT}/bin:${PATH}"
dnf -y install libcurl-devel lz4 lz4-devel libzstd-devel autoconf
cd /tmp
git clone https://github.com/hydradatabase/hydra.git -b v1.1.2
cd hydra/columnar
./autogen.sh
./configure
make
make install
Eric-zch commented 4 days ago

clang version is clang-18.1.8, as a workaround, I added export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" to compile it.

clang --version
clang version 18.1.8 (Red Hat 18.1.8-1.module+el8.10.0+22061+3612b2ba)
Target: ppc64le-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/ppc64le-redhat-linux-gnu.cfg
export POSTGRES_VERSION=14
export PGROOT="/usr/pgsql-14"
export PATH="${PGROOT}/bin:${PATH}"
dnf -y install libcurl-devel lz4 lz4-devel libzstd-devel autoconf
cd /tmp
git clone https://github.com/hydradatabase/hydra.git -b v1.1.2
cd hydra/columnar
./autogen.sh
./configure
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
make
make install
Eric-zch commented 3 days ago

got another error while running make command:

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 -std=gnu99 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-clobbered -Wno-declaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wmissing-declarations -Wmissing-prototypes -Wshadow -Werror=vla -Werror=implicit-int -Werror=implicit-function-declaration -Werror=return-type -fstack-clash-protection -I '/hydra/columnar/src/include' -I'../../../src/include' -I/usr/pgsql-14/include -I/hydra/columnar/vendor/safestringlib/include -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o columnar_tableam.o columnar_tableam.c
columnar_tableam.c: In function ‘columnar_vacuum_rel’:
columnar_tableam.c:1687:42: error: implicit declaration of function ‘RelationGetSmgr’; did you mean ‘RelationOpenSmgr’? [-Werror=implicit-function-declaration]
  BlockNumber new_rel_pages = smgrnblocks(RelationGetSmgr(rel), MAIN_FORKNUM);
                                          ^~~~~~~~~~~~~~~
                                          RelationOpenSmgr
columnar_tableam.c:1687:42: warning: passing argument 1 of ‘smgrnblocks’ makes pointer from integer without a cast [-Wint-conversion]
  BlockNumber new_rel_pages = smgrnblocks(RelationGetSmgr(rel), MAIN_FORKNUM);
                                          ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/pgsql-14/include/server/catalog/storage.h:19,
                 from columnar_tableam.c:32:
/usr/pgsql-14/include/server/storage/smgr.h:101:45: note: expected ‘SMgrRelation’ {aka ‘struct SMgrRelationData *’} but argument is of type ‘int’
 extern BlockNumber smgrnblocks(SMgrRelation reln, ForkNumber forknum);
                                ~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
make[1]: *** [<builtin>: columnar_tableam.o] Error 1
make[1]: Leaving directory '/hydra/columnar/src/backend/columnar'
make: *** [Makefile:18: extension] Error