oracledb stopped from being installed on alpine image due to new cython release · Issue #204 · oracle/python-oracledb (original) (raw)

We have been running python 3.10 with oracledb package for a while on our jenkins agent alpine 3.17 image.
As part of the build the jenkins agent would install the oracledb package, below you can check our build log for installing oracledb 1.3.2 before the new cython package was released

[2023-07-17T07🔞23.180Z] Collecting oracledb==1.3.2 (from -r requirements.txt (line 2))
[2023-07-17T07🔞23.180Z]   Downloading oracledb-1.3.2.tar.gz (481 kB)
[2023-07-17T07🔞23.180Z]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 481.3/481.3 kB 19.3 MB/s eta 0:00:00
[2023-07-17T07🔞23.180Z]   Installing build dependencies: started
[2023-07-17T07🔞25.694Z]   Installing build dependencies: finished with status 'done'
[2023-07-17T07🔞25.694Z]   Getting requirements to build wheel: started
[2023-07-17T07🔞25.694Z]   Getting requirements to build wheel: finished with status 'done'
[2023-07-17T07🔞25.694Z]   Preparing metadata (pyproject.toml): started
[2023-07-17T07🔞25.960Z]   Preparing metadata (pyproject.toml): finished with status 'done'
...
[2023-07-17T07🔞26.216Z] Building wheels for collected packages: oracledb
[2023-07-17T07🔞26.216Z]   Building wheel for oracledb (pyproject.toml): started
[2023-07-17T07:19:47.580Z]   Building wheel for oracledb (pyproject.toml): still running...
[2023-07-17T07:20:05.618Z]   Building wheel for oracledb (pyproject.toml): finished with status 'done'
[2023-07-17T07:20:05.618Z]   Created wheel for oracledb: filename=oracledb-1.3.2-cp310-cp310-linux_x86_64.whl size=6063418 sha256=15b37a36b8dd6963e3671eb4df11f7ad73ad8b4e529de4ac146c6bd0b394afa7
[2023-07-17T07:20:05.618Z]   Stored in directory: /home/jenkins/.cache/pip/wheels/4c/b8/26/e714f48cb09fd1a5c02b69208c9da79cb9d5da92f9e072eaba
[2023-07-17T07:20:05.618Z] Successfully built oracledb

After the release of cython 3.0 yesterday the same agent starting failing to install oracledb:

[2023-07-18T07🔞21.689Z] Collecting oracledb==1.3.2 (from -r requirements.txt (line 2))
[2023-07-18T07🔞21.689Z]   Downloading oracledb-1.3.2.tar.gz (481 kB)
[2023-07-18T07🔞21.689Z]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 481.3/481.3 kB 24.2 MB/s eta 0:00:00
[2023-07-18T07🔞21.689Z]   Installing build dependencies: started
[2023-07-18T07🔞24.204Z]   Installing build dependencies: finished with status 'done'
[2023-07-18T07🔞24.204Z]   Getting requirements to build wheel: started
[2023-07-18T07🔞24.204Z]   Getting requirements to build wheel: finished with status 'done'
[2023-07-18T07🔞24.204Z]   Preparing metadata (pyproject.toml): started
[2023-07-18T07🔞24.459Z]   Preparing metadata (pyproject.toml): finished with status 'done'
...
[2023-07-18T07🔞24.716Z] Building wheels for collected packages: oracledb
[2023-07-18T07🔞24.716Z]   Building wheel for oracledb (pyproject.toml): started
[2023-07-18T07:19:32.329Z]   Building wheel for oracledb (pyproject.toml): still running...
[2023-07-18T07:20:39.940Z]   Building wheel for oracledb (pyproject.toml): still running...
[2023-07-18T07:20:39.940Z]   Building wheel for oracledb (pyproject.toml): finished with status 'error'
[2023-07-18T07:20:39.940Z]   error: subprocess-exited-with-error
[2023-07-18T07:20:39.940Z]   
[2023-07-18T07:20:39.940Z]   × Building wheel for oracledb (pyproject.toml) did not run successfully.
[2023-07-18T07:20:39.940Z]   │ exit code: 1
[2023-07-18T07:20:39.940Z]   ╰─> [763 lines of output]
[2023-07-18T07:20:39.940Z]       /tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/config/expand.py:132: SetuptoolsWarning: File '/tmp/pip-install-bj0da_0q/oracledb_d56a3f6d8ab0498aacfe0845abfdb3ee/README.md' cannot be found
[2023-07-18T07:20:39.940Z]         return '\n'.join(
[2023-07-18T07:20:39.940Z]       running bdist_wheel
[2023-07-18T07:20:39.940Z]       running build
[2023-07-18T07:20:39.940Z]       running build_py
[2023-07-18T07:20:39.940Z]       creating build
[2023-07-18T07:20:39.940Z]       creating build/lib.linux-x86_64-cpython-310
[2023-07-18T07:20:39.940Z]       creating build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.940Z]       copying src/oracledb/__init__.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.940Z]       copying src/oracledb/aq.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.940Z]       copying src/oracledb/connect_params.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/connection.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/constants.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/constructors.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/cursor.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/dbobject.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/defaults.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/driver_mode.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/dsn.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/errors.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/exceptions.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/lob.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/pool.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/pool_params.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/soda.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/subscr.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/utils.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/var.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/version.py -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       copying src/oracledb/py.typed -> build/lib.linux-x86_64-cpython-310/oracledb
[2023-07-18T07:20:39.941Z]       running build_ext
[2023-07-18T07:20:39.941Z]       Compiling src/oracledb/base_impl.pyx because it changed.
[2023-07-18T07:20:39.941Z]       [1/1] Cythonizing src/oracledb/base_impl.pyx
[2023-07-18T07:20:39.941Z]       building 'oracledb.base_impl' extension
[2023-07-18T07:20:39.941Z]       creating build/temp.linux-x86_64-cpython-310
[2023-07-18T07:20:39.941Z]       creating build/temp.linux-x86_64-cpython-310/src
[2023-07-18T07:20:39.941Z]       creating build/temp.linux-x86_64-cpython-310/src/oracledb
[2023-07-18T07:20:39.941Z]       gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -O2 -Os -fomit-frame-pointer -g -O2 -Os -fomit-frame-pointer -g -O2 -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/home/jenkins/home/workspace/vodcast/csp-vodcast-catchup-api/vodcast-catchup-api/SkyGlobal/vodcast-catchup-api-extended-test/csp-vodcast-catchup-api/vodcast-catchup-integration/venv/include -I/usr/include/python3.10 -c src/oracledb/base_impl.c -o build/temp.linux-x86_64-cpython-310/src/oracledb/base_impl.o
[2023-07-18T07:20:39.941Z]       gcc -shared -Wl,--as-needed,-O1,--sort-common -Wl,--as-needed,-O1,--sort-common build/temp.linux-x86_64-cpython-310/src/oracledb/base_impl.o -L/usr/lib -o build/lib.linux-x86_64-cpython-310/oracledb/base_impl.cpython-310-x86_64-linux-gnu.so
[2023-07-18T07:20:39.941Z]       warning: src/oracledb/impl/thin/constants.pxi:33:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
[2023-07-18T07:20:39.941Z]       warning: src/oracledb/impl/thin/constants.pxi:34:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
...
(lots of these DEF warnings)
...
[2023-07-18T07:20:39.966Z]       warning: src/oracledb/impl/thin/packet.pyx:34:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
[2023-07-18T07:20:39.966Z]       Compiling src/oracledb/thin_impl.pyx because it changed.
[2023-07-18T07:20:39.966Z]       [1/1] Cythonizing src/oracledb/thin_impl.pyx
[2023-07-18T07:20:39.966Z]       building 'oracledb.thin_impl' extension
[2023-07-18T07:20:39.966Z]       gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -O2 -Os -fomit-frame-pointer -g -O2 -Os -fomit-frame-pointer -g -O2 -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/home/jenkins/home/workspace/vodcast/csp-vodcast-catchup-api/vodcast-catchup-api/SkyGlobal/vodcast-catchup-api-extended-test/csp-vodcast-catchup-api/vodcast-catchup-integration/venv/include -I/usr/include/python3.10 -c src/oracledb/thin_impl.c -o build/temp.linux-x86_64-cpython-310/src/oracledb/thin_impl.o
[2023-07-18T07:20:39.966Z]       gcc -shared -Wl,--as-needed,-O1,--sort-common -Wl,--as-needed,-O1,--sort-common build/temp.linux-x86_64-cpython-310/src/oracledb/thin_impl.o -L/usr/lib -o build/lib.linux-x86_64-cpython-310/oracledb/thin_impl.cpython-310-x86_64-linux-gnu.so
[2023-07-18T07:20:39.966Z]       
[2023-07-18T07:20:39.966Z]       Error compiling Cython file:
[2023-07-18T07:20:39.966Z]       ------------------------------------------------------------
[2023-07-18T07:20:39.966Z]       ...
[2023-07-18T07:20:39.966Z]                   session_callback_bytes = params.session_callback.encode()
[2023-07-18T07:20:39.967Z]                   create_params.plsqlFixupCallback = session_callback_bytes
[2023-07-18T07:20:39.967Z]                   create_params.plsqlFixupCallbackLength = \
[2023-07-18T07:20:39.967Z]                           <uint32_t> len(session_callback_bytes)
[2023-07-18T07:20:39.967Z]               if params.access_token_callback is not None:
[2023-07-18T07:20:39.967Z]                   create_params.accessTokenCallback = _token_callback_handler
[2023-07-18T07:20:39.967Z]                                                       ^
[2023-07-18T07:20:39.967Z]       ------------------------------------------------------------
[2023-07-18T07:20:39.967Z]       
[2023-07-18T07:20:39.967Z]       src/oracledb/impl/thick/pool.pyx:116:48: Cannot assign type 'int (void *, dpiAccessToken *) except? -1 nogil' to 'dpiAccessTokenCallback'
[2023-07-18T07:20:39.967Z]       
[2023-07-18T07:20:39.967Z]       Error compiling Cython file:
[2023-07-18T07:20:39.967Z]       ------------------------------------------------------------
[2023-07-18T07:20:39.967Z]       ...
[2023-07-18T07:20:39.967Z]               params.portNumber = self.port
[2023-07-18T07:20:39.967Z]               params.timeout = self.timeout
[2023-07-18T07:20:39.967Z]               params.name = name_buf.ptr
[2023-07-18T07:20:39.967Z]               params.nameLength = name_buf.length
[2023-07-18T07:20:39.967Z]               if self.callback is not None:
[2023-07-18T07:20:39.967Z]                   params.callback = _callback_handler
[2023-07-18T07:20:39.967Z]                                     ^
[2023-07-18T07:20:39.967Z]       ------------------------------------------------------------
[2023-07-18T07:20:39.967Z]       
[2023-07-18T07:20:39.967Z]       src/oracledb/impl/thick/subscr.pyx:159:30: Cannot assign type 'void (void *, dpiSubscrMessage *) except * nogil' to 'dpiSubscrCallback'
[2023-07-18T07:20:39.967Z]       Compiling src/oracledb/thick_impl.pyx because it changed.
[2023-07-18T07:20:39.967Z]       [1/1] Cythonizing src/oracledb/thick_impl.pyx
[2023-07-18T07:20:39.967Z]       Traceback (most recent call last):
[2023-07-18T07:20:39.967Z]         File "/home/jenkins/home/workspace/vodcast/csp-vodcast-catchup-api/vodcast-catchup-api/SkyGlobal/vodcast-catchup-api-extended-test/csp-vodcast-catchup-api/vodcast-catchup-integration/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
[2023-07-18T07:20:39.967Z]           main()
[2023-07-18T07:20:39.967Z]         File "/home/jenkins/home/workspace/vodcast/csp-vodcast-catchup-api/vodcast-catchup-api/SkyGlobal/vodcast-catchup-api-extended-test/csp-vodcast-catchup-api/vodcast-catchup-integration/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
[2023-07-18T07:20:39.967Z]           json_out['return_val'] = hook(**hook_input['kwargs'])
[2023-07-18T07:20:39.967Z]         File "/home/jenkins/home/workspace/vodcast/csp-vodcast-catchup-api/vodcast-catchup-api/SkyGlobal/vodcast-catchup-api-extended-test/csp-vodcast-catchup-api/vodcast-catchup-integration/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
[2023-07-18T07:20:39.967Z]           return _build_backend().build_wheel(wheel_directory, config_settings,
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
[2023-07-18T07:20:39.967Z]           return self._build_with_temp_dir(['bdist_wheel'], '.whl',
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
[2023-07-18T07:20:39.967Z]           self.run_setup()
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
[2023-07-18T07:20:39.967Z]           exec(code, locals())
[2023-07-18T07:20:39.967Z]         File "<string>", line 81, in <module>
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
[2023-07-18T07:20:39.967Z]           return distutils.core.setup(**attrs)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
[2023-07-18T07:20:39.967Z]           return run_commands(dist)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
[2023-07-18T07:20:39.967Z]           dist.run_commands()
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
[2023-07-18T07:20:39.967Z]           self.run_command(cmd)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
[2023-07-18T07:20:39.967Z]           super().run_command(command)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
[2023-07-18T07:20:39.967Z]           cmd_obj.run()
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
[2023-07-18T07:20:39.967Z]           self.run_command("build")
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
[2023-07-18T07:20:39.967Z]           self.distribution.run_command(command)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
[2023-07-18T07:20:39.967Z]           super().run_command(command)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
[2023-07-18T07:20:39.967Z]           cmd_obj.run()
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
[2023-07-18T07:20:39.967Z]           self.run_command(cmd_name)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
[2023-07-18T07:20:39.967Z]           self.distribution.run_command(command)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
[2023-07-18T07:20:39.967Z]           super().run_command(command)
[2023-07-18T07:20:39.967Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
[2023-07-18T07:20:39.968Z]           cmd_obj.run()
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
[2023-07-18T07:20:39.968Z]           _build_ext.run(self)
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
[2023-07-18T07:20:39.968Z]           self.build_extensions()
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
[2023-07-18T07:20:39.968Z]           self._build_extensions_serial()
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
[2023-07-18T07:20:39.968Z]           self.build_extension(ext)
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
[2023-07-18T07:20:39.968Z]           _build_ext.build_extension(self, ext)
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
[2023-07-18T07:20:39.968Z]           new_ext = cythonize(
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
[2023-07-18T07:20:39.968Z]           cythonize_one(*args)
[2023-07-18T07:20:39.968Z]         File "/tmp/pip-build-env-nm67t2s3/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
[2023-07-18T07:20:39.968Z]           raise CompileError(None, pyx_file)
[2023-07-18T07:20:39.968Z]       Cython.Compiler.Errors.CompileError: src/oracledb/thick_impl.pyx
[2023-07-18T07:20:39.968Z]       [end of output]
[2023-07-18T07:20:39.968Z]   
[2023-07-18T07:20:39.968Z]   note: This error originates from a subprocess, and is likely not a problem with pip.
[2023-07-18T07:20:39.968Z]   ERROR: Failed building wheel for oracledb
[2023-07-18T07:20:39.968Z] Failed to build oracledb
[2023-07-18T07:20:39.968Z] ERROR: Could not build wheels for oracledb, which is required to install pyproject.toml-based projects

I assume this because the version of cython is not locked. Is my assumption correct?