tuhaihe opened a new issue, #1432: URL: https://github.com/apache/cloudberry/issues/1432
### Apache Cloudberry version main ### What happened Some errors returned. Please see the details as follows. With the help of AI, I successfully installed Cloudberry on Rocky Linux 10. But I don't know if they're the right way to fix these issues. Please help correct me. Thanks! ### What you think should happen instead _No response_ ### How to reproduce ## Test Env OS: ``` [gpadmin@cdw cloudberry]$ cat /etc/os-release NAME="Rocky Linux" VERSION="10.0 (Red Quartz)" ID="rocky" ID_LIKE="rhel centos fedora" VERSION_ID="10.0" PLATFORM_ID="platform:el10" PRETTY_NAME="Rocky Linux 10.0 (Red Quartz)" ANSI_COLOR="0;32" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:rocky:rocky:10::baseos" HOME_URL="https://rockylinux.org/" VENDOR_NAME="RESF" VENDOR_URL="https://resf.org/" BUG_REPORT_URL="https://bugs.rockylinux.org/" SUPPORT_END="2035-05-31" ROCKY_SUPPORT_PRODUCT="Rocky-Linux-10" ROCKY_SUPPORT_PRODUCT_VERSION="10.0" REDHAT_SUPPORT_PRODUCT="Rocky Linux" REDHAT_SUPPORT_PRODUCT_VERSION="10.0" ``` gcc/g++: ``` [gpadmin@cdw cloudberry]$ gcc --version gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7) Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [gpadmin@cdw cloudberry]$ g++ --version g++ (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7) Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` ## List of issues: 1. ``` make -C foreign all make[3]: Entering directory '/home/gpadmin/cloudberry/src/backend/foreign' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/gpadmin/cloudberry/src/backend/foreign' make -C lib all make[3]: Entering directory '/home/gpadmin/cloudberry/src/backend/lib' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/gpadmin/cloudberry/src/backend/lib' make -C libpq all make[3]: Entering directory '/home/gpadmin/cloudberry/src/backend/libpq' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-but-set-variable -Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation -g -O3 -fPIC -DUSE_INTERNAL_FTS=1 -Werror=uninitialized -Werror=implicit-function-declaration -Werror -I../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/local/xerces-c/include -I../../../src/interfaces/libpq -I../../../src/port -c -o fe-secure-openssl.o fe-secure-openssl.c fe-secure-openssl.c: In function ‘initialize_SSL’: fe-secure-openssl.c:800:21: error: unused variable ‘pkey’ [-Werror=unused-variable] 800 | EVP_PKEY *pkey = NULL; | ^~~~ cc1: all warnings being treated as errors make[3]: *** [<builtin>: fe-secure-openssl.o] Error 1 make[3]: Leaving directory '/home/gpadmin/cloudberry/src/backend/libpq' make[2]: *** [common.mk:39: libpq-recursive] Error 2 make[2]: Leaving directory '/home/gpadmin/cloudberry/src/backend' make[1]: *** [Makefile:45: all-backend-recurse] Error 2 make[1]: Leaving directory '/home/gpadmin/cloudberry/src' make: *** [GNUmakefile:11: all-src-recurse] Error 2 ``` ~> ``` diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 5c6b317caa7..eac8b65fb37 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -797,8 +797,9 @@ initialize_SSL(PGconn *conn) bool have_homedir; bool have_cert; bool have_rootcert; +#ifdef USE_SSL_ENGINE EVP_PKEY *pkey = NULL; - +#endif /* * We'll need the home directory if any of the relevant parameters are * defaulted. If pqGetHomeDirectory fails, act as though none of the ``` 2. ``` gcc -Wall -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-but-set-variable -Werror=implicit-fallthrough=3 -Wno-format-truncation -Wno-stringop-truncation -g -O3 -fPIC -DUSE_INTERNAL_FTS=1 -Werror=uninitialized -Werror=implicit-function-declaration -Werror -I. -I. -I../../../../src/interfaces/libpq -I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/local/xerces-c/include -c -o xml.o xml.c xml.c: In function ‘pg_xml_init’: xml.c:1025:52: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] 1025 | xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler); | ^~~~~~~~~~~~~~~~ | | | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} In file included from /usr/include/libxml2/libxml/valid.h:15, from /usr/include/libxml2/libxml/parser.h:19, from xml.c:50: /usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} 898 | xmlStructuredErrorFunc handler); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ xml.c: In function ‘XmlTableFetchRow’: xml.c:4562:62: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] 4562 | xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler); | ^~~~~~~~~~~~~~~~ | | | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} /usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} 898 | xmlStructuredErrorFunc handler); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ xml.c: In function ‘XmlTableGetValue’: xml.c:4616:62: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] 4616 | xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler); | ^~~~~~~~~~~~~~~~ | | | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} /usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} 898 | xmlStructuredErrorFunc handler); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ xml.c: In function ‘XmlTableDestroyOpaque’: xml.c:4759:62: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] 4759 | xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler); | ^~~~~~~~~~~~~~~~ | | | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} /usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} 898 | xmlStructuredErrorFunc handler); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ make[4]: *** [<builtin>: xml.o] Error 1 make[4]: Leaving directory '/home/gpadmin/cloudberry/src/backend/utils/adt' make[3]: *** [../../../src/backend/common.mk:39: adt-recursive] Error 2 make[3]: Leaving directory '/home/gpadmin/cloudberry/src/backend/utils' make[2]: *** [common.mk:39: utils-recursive] Error 2 make[2]: Leaving directory '/home/gpadmin/cloudberry/src/backend' make[1]: *** [Makefile:45: all-backend-recurse] Error 2 make[1]: Leaving directory '/home/gpadmin/cloudberry/src' make: *** [GNUmakefile:11: all-src-recurse] Error 2 ``` ~> ``` diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 6d38a2d0de2..d96695e0dd9 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -121,7 +121,7 @@ struct PgXmlErrorContext static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt); -static void xml_errorHandler(void *data, xmlErrorPtr error); +static void xml_errorHandler(void *data, const xmlError *error); static void xml_ereport_by_code(int level, int sqlcode, const char *msg, int errcode); static void chopStringInfoNewlines(StringInfo str); @@ -1762,7 +1762,7 @@ xml_ereport(PgXmlErrorContext *errcxt, int level, int sqlcode, const char *msg) * Error handler for libxml errors and warnings */ static void -xml_errorHandler(void *data, xmlErrorPtr error) +xml_errorHandler(void *data, const xmlError *error) { PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt; ``` 3. ``` /home/gpadmin/cloudberry/contrib/pax_storage/src/cpp/comm/comm_test.cc: In member function ‘virtual void pax::tests::CommTest_TestNewOperator_Test::TestBody()’: /home/gpadmin/cloudberry/contrib/pax_storage/src/cpp/comm/comm_test.cc:62:24: error: allocation of insufficient size ‘0’ for type ‘bool’ with size ‘1’ [-Werror=alloc-size] 62 | auto obj = new bool[0]; | ^ [ 96%] Building CXX object src/cpp/CMakeFiles/test_main.dir/storage/columns/pax_delta_encoding_test.cc.o cc1plus: all warnings being treated as errors make[4]: *** [src/cpp/CMakeFiles/test_main.dir/build.make:1448: src/cpp/CMakeFiles/test_main.dir/comm/comm_test.cc.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [CMakeFiles/Makefile2:339: src/cpp/CMakeFiles/test_main.dir/all] Error 2 make[2]: *** [Makefile:136: all] Error 2 make[2]: Leaving directory '/home/gpadmin/cloudberry/contrib/pax_storage/build' make[1]: *** [Makefile:69: build] Error 2 make[1]: Leaving directory '/home/gpadmin/cloudberry/contrib/pax_storage' make: *** [GNUmakefile:32: all] Error 2 make: Leaving directory '/home/gpadmin/cloudberry' ``` ~> ``` diff --git a/contrib/pax_storage/src/cpp/comm/comm_test.cc b/contrib/pax_storage/src/cpp/comm/comm_test.cc index 7839e9e1f8d..38bf4bd1510 100644 --- a/contrib/pax_storage/src/cpp/comm/comm_test.cc +++ b/contrib/pax_storage/src/cpp/comm/comm_test.cc @@ -59,7 +59,10 @@ TEST_F(CommTest, TestDeleteOperator) { TEST_F(CommTest, TestNewOperator) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Walloc-size" auto obj = new bool[0]; +#pragma GCC diagnostic pop ASSERT_NE(obj, nullptr); delete[] obj; ``` 4. make install ``` # Install wheel and cython for PyYAML building pip3 install --user wheel "cython<3.0.0" Collecting wheel Downloading wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB) Collecting cython<3.0.0 Downloading Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.metadata (3.1 kB) Downloading wheel-0.45.1-py3-none-any.whl (72 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.5/72.5 kB 977.0 kB/s eta 0:00:00 Downloading Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (2.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 10.8 MB/s eta 0:00:00 Installing collected packages: wheel, cython Successfully installed cython-0.29.37 wheel-0.45.1 --- pyyaml --- psutil --- PyGreSQL cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/ && /usr/bin/tar xzf PyYAML-5.4.1.tar.gz cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/ && /usr/bin/tar xzf psutil-5.7.0.tar.gz cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/ && /usr/bin/tar xzf PyGreSQL-5.2.tar.gz cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/PyGreSQL-5.2/ && PATH=/usr/local/cloudberry-db/bin:$PATH LDFLAGS='-L../../src/port -L../../src/common -L/usr/local/cloudberry-db/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/cloudberry-db/lib',--enable-new-dtags -Werror ' python3 setup.py build cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/psutil-5.7.0/ && env -u CC python3 setup.py build cd /home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/PyYAML-5.4.1/ && env -u CC CFLAGS="-w" python3 setup.py build Traceback (most recent call last): File "/home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/PyGreSQL-5.2/setup.py", line 47, in <module> from setuptools import setup ModuleNotFoundError: No module named 'setuptools' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/PyGreSQL-5.2/setup.py", line 49, in <module> from distutils.core import setup ModuleNotFoundError: No module named 'distutils' make[2]: *** [Makefile:124: pygresql] Error 1 make[2]: *** Waiting for unfinished jobs.... Traceback (most recent call last): File "/home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/PyYAML-5.4.1/setup.py", line 70, in <module> from distutils import log ModuleNotFoundError: No module named 'distutils' make[2]: *** [Makefile:147: pyyaml] Error 1 Traceback (most recent call last): File "/home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/psutil-5.7.0/setup.py", line 24, in <module> import setuptools ModuleNotFoundError: No module named 'setuptools' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/gpadmin/cloudberry/gpMgmt/bin/pythonSrc/ext/psutil-5.7.0/setup.py", line 28, in <module> from distutils.core import setup, Extension ModuleNotFoundError: No module named 'distutils' make[2]: *** [Makefile:134: psutil] Error 1 make[2]: Leaving directory '/home/gpadmin/cloudberry/gpMgmt/bin' make[1]: *** [Makefile:7: install-bin-recurse] Error 2 make[1]: Leaving directory '/home/gpadmin/cloudberry/gpMgmt' make: *** [GNUmakefile:80: install] Error 2 make: Leaving directory '/home/gpadmin/cloudberry' ``` ~> ``` sudo dnf install python3-setuptools sudo dnf install --enablerepo=crb python3-wheel ``` 5. When running ``` source /usr/local/cloudberry-db/cloudberry-env.sh make create-demo-cluster -C ~/cloudberry ``` Then: ``` performing post-bootstrap initialization ... LOG: gp_role forced to 'utility' in single-user mode initdb: error: error while reading cdb_init.d directory: Function not implemented initdb: removing data directory "/home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/qddir/demoDataDir-1" -- 5.43 ROLE_ROUTINE_GRANTS view is based on 5.50 ROUTINE_PRIVILEGES and is defined there instead. -- 5.44 ROLE_TABLE_GRANTS view is based on 5.63 TABLE_PRIVILEGES and is defined there instead. /* * 5.45 * ROLE_TABLE_METHOD_GRANTS view */ -- feature not supported -- 5.46 ROLE_USAGE_GRANTS view is based on 5.75 USAGE_PRIVILEGES and is defined there instead. -- 5.47 ROLE_UDT_GRANTS view is based on 5.74 UDT_PRIVILEGES and is defined there instead. ``` ~> ``` diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 4ed9869a2c9..342be9baf35 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -2023,6 +2023,7 @@ setup_cdb_schema(FILE *cmdfd) /* Collect all files with .sql suffix in array. */ nscripts = 0; + errno = 0; while ((file = readdir(dir)) != NULL) { int namelen = strlen(file->d_name); ``` ### Operating System Rocky Linux 10 ### Anything else _No response_ ### Are you willing to submit PR? - [ ] Yes, I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
