spdx/spdx-online-tools

Docker build failing on pip install

goneall opened this issue · 2 comments

Got the following error message when trying to execute the command docker-compose -f docker-compose.dev.yml up --build:

executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
ERROR: Service 'spdx' failed to build : Build failed

Failing on the requirement jpype1 which is failing on gcc compiles executing creating build/temp.linux-x86_64-cpython-311/native/python

Below is a sample of the failure:

#11 55.52       gcc -pthread -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/usr/local/include/python3.11 -c native/common/jp_exception.cpp -o build/temp.linux-x
[docker-compose-error.txt](https://github.com/spdx/spdx-online-tools/files/9905232/docker-compose-error.txt)
86_64-cpython-311/native/common/jp_exception.o -g0 -std=c++11 -O2
#11 55.52       native/common/jp_exception.cpp: In function ‘PyTracebackObject* tb_create(PyTracebackObject*, PyObject*, const char*, const char*, int)’:
#11 55.52       native/common/jp_exception.cpp:518:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
#11 55.52         518 |   state.frame = last_traceback->tb_frame;
#11 55.52             |         ^~~~~
#11 55.52             |         cframe
#11 55.52       native/common/jp_exception.cpp:520:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?

Also attached is the complete output of the pip install -r requirements

This turns out to be an incompatibility between the python version, JPype as well as the gevents package.

Fixed with PR #405