You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bigtop.apache.org by "chenqiang (Jira)" <ji...@apache.org> on 2022/10/28 01:00:00 UTC

[jira] [Created] (BIGTOP-3860) gpdb5.28.5 needs to support python3 version in OpenEuler

chenqiang created BIGTOP-3860:
---------------------------------

             Summary: gpdb5.28.5 needs to support python3 version in OpenEuler
                 Key: BIGTOP-3860
                 URL: https://issues.apache.org/jira/browse/BIGTOP-3860
             Project: Bigtop
          Issue Type: Bug
         Environment: bigtop master

openEuler 22.03

aarch64
            Reporter: chenqiang


Failed to compile the gpdb 5.28.5 in openEuler (python3).

1、Using the command is:  *./gradlew gpdb-rpm, the error log is:*

mkdir ./testtablespace

./checkinc.py

/usr/bin/env: 'python2': No such file or directory

make[2]: *** [GNUmakefile:164: includecheck] Error 127

make[2]: Leaving directory '/home/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/src/test/regress'

make[1]: *** [Makefile:27: all] Error 2

make[1]: Leaving directory '/home/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/src'

make: *** [GNUmakefile:14: all] Error 2

error: Bad exit status from /var/tmp/rpm-tmp.1oORxJ (%build)

2、modify the code from ‘/usr/bin/python‘ to ’/usr/bin/pytho3’, *the error log* is:

mkdir ./testtablespace

./checkinc.py

File "/home/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/src/test/regress/./checkinc.py", line 14

print "Greenplum INCLUDEDIR:    %s" % inc          ^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Greenplum INCLUDEDIR:    %s" % inc)?

3、Using python 2to3 modify all python file,make command is ok,but failed to exe the make install. *the error log* is: (PyGreSQL need 5.0+ version support python3)

--- PyGreSQL

PATH=/var/tmp/usr/lib/gpdb/bin:$PATH && \

if [ `uname -s` = 'HP-UX' ]; then \

    cd /home/wulei/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/gpMgmt/bin/pythonSrc/PyGreSQL-4.0 && DESTDIR="/var/tmp" CC="gcc" LDFLAGS="-L../../../../gpAux/ext/hpux_ia64/python-2.5.6/lib" python3 setup.py build; \

elif [ "" = 'aix7_ppc_64' ]; then \

    cd /home/wulei/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/gpMgmt/bin/pythonSrc/PyGreSQL-4.0 && DESTDIR="/var/tmp" CC="gcc" python_64 setup.py build; \

else \

    cd /home/wulei/bigtop/build/gpdb/rpm/BUILD/gpdb-5.28.5/gpMgmt/bin/pythonSrc/PyGreSQL-4.0 && DESTDIR="/var/tmp" CC="gcc" LDFLAGS='-L../../src/port -L../../src/port -Wl,--as-needed -Wl,-rpath,'/var/tmp/usr/lib/gpdb/lib',--enable-new-dtags ' python3 setup.py build; \

fi

running build

running build_py

creating build

creating build/lib.linux-x86_64-3.9

copying pg.py -> build/lib.linux-x86_64-3.9

copying pgdb.py -> build/lib.linux-x86_64-3.9

running build_ext

building '_pg' extension

creating build/temp.linux-x86_64-3.9

gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -D_GNU_SOURCE -fPIC -fwrapv -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -D_GNU_SOURCE -fPIC -fwrapv -fstack-protector-strong -fPIC -Iinclude -I/var/tmp/usr/lib/gpdb/include -I/var/tmp/usr/lib/gpdb/include/postgresql/server -I/usr/include/python3.9 -c pgmodule.c -o build/temp.linux-x86_64-3.9/pgmodule.o -O2

pgmodule.c:138:1: warning: return type defaults to ‘int’ [-Wimplicit-int]

  138 | DL_EXPORT(void) init_pg(void);

      | ^~~~~~~~~

pgmodule.c: In function ‘DL_EXPORT’:

pgmodule.c:138:17: error: expected declaration specifiers before ‘init_pg’

  138 | DL_EXPORT(void) init_pg(void);

      |                 ^~~~~~~

pgmodule.c:141:18: error: storage class specified for parameter ‘decimal’

  141 | static PyObject *decimal = NULL; /* decimal type */

      |                  ^~~~~~~

pgmodule.c:141:1: error: parameter ‘decimal’ is initialized

  141 | static PyObject *decimal = NULL; /* decimal type */

      | ^~~~~~

pgmodule.c:159:3: error: storage class specified for parameter ‘pgobject’

  159 | } pgobject;

      |   ^~~~~~~~

pgmodule.c:161:1: error: unknown type name ‘staticforward’

  161 | staticforward PyTypeObject PgType;

      | ^~~~~~~~~~~~~

pgmodule.c:161:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PgType’

  161 | staticforward PyTypeObject PgType;

      |                            ^~~~~~

pgmodule.c:167:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token

  167 | {

      | ^

pgmodule.c:191:3: error: storage class specified for parameter ‘pgqueryobject’

  191 | } pgqueryobject;

      |   ^~~~~~~~~~~~~

pgmodule.c:193:1: error: unknown type name ‘staticforward’

  193 | staticforward PyTypeObject PgQueryType;



--
This message was sent by Atlassian Jira
(v8.20.10#820010)