meta-spdxscanner


Martin Leduc
 

Hi Community,

 

I’m facing to an issue with meta-spdxscanner.bbclass.  A Python Warning fail the build.  This is the error:

 

ERROR: python3-patch-native-1.16-r0 do_compile: 'python3 setup.py bdist_wheel ' execution failed.

ERROR: python3-patch-native-1.16-r0 do_compile: ExecutionError('/home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985', 1, None, None)

ERROR: Logfile of failure stored in: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/log.do_compile.3058985

Log data follows:

| DEBUG: Executing shell function do_compile

| /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

|   from distutils.core import setup

| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

|    or: setup.py --help [cmd1 cmd2 ...]

|    or: setup.py --help-commands

|    or: setup.py cmd --help

|

| error: invalid command 'bdist_wheel'

| ERROR: 'python3 setup.py bdist_wheel ' execution failed.

| WARNING: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985:177 exit 1 from 'exit 1'

| WARNING: Backtrace (BB generated script):

|             #1: bbfatal_log, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 177

|             #2: setuptools3_do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 167

|             #3: do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 156

|             #4: main, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 181

ERROR: Task (virtual:native:/home/mleduc/1087/1087-NIM/sources/meta-spdxscanner/recipes-devtools/python/python3-patch_1.16.bb:do_compile) failed with exit code '1'

 

Any patch or approach to fix this?

 

I’m using Yocto Kirkstone

 

Any help will be appreciated

 

Martin Leduc

Superviseur logiciel platforme, Rail

Luminator Technology Group

T : 1 418 856-6896

martin.leduc@...

www.luminator.com

 


leimaohui
 

Hi,

 

I’m sorry for late reply.

 

Is this issue resolved? If not, can you tell me which class you are using? I can’t get enough information from your log.

It will be better if you supply the setting about enable meta-spdxscanner in local.conf.

 

Best regards

Lei

 

 

From: yocto@... <yocto@...> On Behalf Of Martin Leduc via lists.yoctoproject.org
Sent: Thursday, September 8, 2022 10:40 PM
To: yocto@...
Subject: [yocto] meta-spdxscanner

 

Hi Community,

 

I’m facing to an issue with meta-spdxscanner.bbclass.  A Python Warning fail the build.  This is the error:

 

ERROR: python3-patch-native-1.16-r0 do_compile: 'python3 setup.py bdist_wheel ' execution failed.

ERROR: python3-patch-native-1.16-r0 do_compile: ExecutionError('/home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985', 1, None, None)

ERROR: Logfile of failure stored in: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/log.do_compile.3058985

Log data follows:

| DEBUG: Executing shell function do_compile

| /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

|   from distutils.core import setup

| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

|    or: setup.py --help [cmd1 cmd2 ...]

|    or: setup.py --help-commands

|    or: setup.py cmd --help

|

| error: invalid command 'bdist_wheel'

| ERROR: 'python3 setup.py bdist_wheel ' execution failed.

| WARNING: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985:177 exit 1 from 'exit 1'

| WARNING: Backtrace (BB generated script):

|             #1: bbfatal_log, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 177

|             #2: setuptools3_do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 167

|             #3: do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 156

|             #4: main, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 181

ERROR: Task (virtual:native:/home/mleduc/1087/1087-NIM/sources/meta-spdxscanner/recipes-devtools/python/python3-patch_1.16.bb:do_compile) failed with exit code '1'

 

Any patch or approach to fix this?

 

I’m using Yocto Kirkstone

 

Any help will be appreciated

 

Martin Leduc

Superviseur logiciel platforme, Rail

Luminator Technology Group

T : 1 418 856-6896

martin.leduc@...

www.luminator.com

 


Martin Leduc
 

Hi Lei,

 

Yes, the issue is fixed by doing the actions defined into https://stackoverflow.com/questions/69858963/how-can-one-fully-replace-distutils-which-is-deprecated-in-3-10 :

 

Replace

from distutils.core import setup

with

from setuptools import setup

 

into ../tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py

 

The output is not really useful at the moment because it crash after hours of computing for the kernel and some other packages.

 

Actually, I’ve made a workaround to my problems by making a PHP script parsing the Yocto SPDX output but it’s not enough.

INHERIT += "create-spdx"

 

My idea is: I do not use the scancode-tk as expected.

 

I’ve also built one Fossology server but it run hours and hours and hours without finishing the produce the report and the reports are not, for my needs, complete.

 

If you have any input else than it’s defined in the README, it will be really interesting.

 

Thank you for your help.

 

 

Martin Leduc

T : (418) 856-6896

martin.leduc@...

 

 

De : yocto@... <yocto@...> De la part de leimaohui
Envoyé : 26 septembre 2022 04:45
À : Martin Leduc <martin.leduc@...>; yocto@...
Objet : [EXTERNAL] Re: [yocto] meta-spdxscanner

 

Hi,

 

Im sorry for late reply.

 

Is this issue resolved? If not, can you tell me which class you are using? I cant get enough information from your log.

It will be better if you supply the setting about enable meta-spdxscanner in local.conf.

 

Best regards

Lei

 

 

From: yocto@... <yocto@...> On Behalf Of Martin Leduc via lists.yoctoproject.org
Sent: Thursday, September 8, 2022 10:40 PM
To: yocto@...
Subject: [yocto] meta-spdxscanner

 

Hi Community,

 

I’m facing to an issue with meta-spdxscanner.bbclass.  A Python Warning fail the build.  This is the error:

 

ERROR: python3-patch-native-1.16-r0 do_compile: 'python3 setup.py bdist_wheel ' execution failed.

ERROR: python3-patch-native-1.16-r0 do_compile: ExecutionError('/home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985', 1, None, None)

ERROR: Logfile of failure stored in: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/log.do_compile.3058985

Log data follows:

| DEBUG: Executing shell function do_compile

| /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

|   from distutils.core import setup

| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

|    or: setup.py --help [cmd1 cmd2 ...]

|    or: setup.py --help-commands

|    or: setup.py cmd --help

|

| error: invalid command 'bdist_wheel'

| ERROR: 'python3 setup.py bdist_wheel ' execution failed.

| WARNING: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985:177 exit 1 from 'exit 1'

| WARNING: Backtrace (BB generated script):

|             #1: bbfatal_log, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 177

|             #2: setuptools3_do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 167

|             #3: do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 156

|             #4: main, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 181

ERROR: Task (virtual:native:/home/mleduc/1087/1087-NIM/sources/meta-spdxscanner/recipes-devtools/python/python3-patch_1.16.bb:do_compile) failed with exit code '1'

 

Any patch or approach to fix this?

 

I’m using Yocto Kirkstone

 

Any help will be appreciated

 

Martin Leduc

Superviseur logiciel platforme, Rail

Luminator Technology Group

T : 1 418 856-6896

martin.leduc@...

www.luminator.com

 


leimaohui
 

Hi, Martin

INHERIT += "create-spdx"
create-spdx.bbclass is not from meta-spdxscanner. It comes from poky. If you has any questions about create-spdx.bbclass, I think you can send a mail to the ML of oe-core with a title of " create-spdx ".

Meta-spdxscanner is a layer out of poky. If you want to use meta-spdxscanner, please reference to https://git.yoctoproject.org/meta-spdxscanner/tree/README.
I suggest fossology-python.bbclass, it works best.

I’ve also built one Fossology server but it run hours and hours and hours without finishing the produce the report and the reports are not, for my needs, complete.
Yes, fossology server is not very fast because it has a lot work (unpack tarball, scan source code one by one...)to do, especially for recipes that have huge source code(such as gcc, binutils...).
If you want to get one spdx file for one recipe, such as "bitbake busybox -f -c spdx", you can try to reduce the "WAIT_TIME" set for fossology-python.bbclass in your conf/local.conf.
But if you wan to get all spdx files by "bitbake --runall=spdx $IMAGE_FILE", "WAIT_TIME" is better to be set a lager value. Because fossology server has to handle multi tasks at the same time.
And there are times you have to reboot fossology server if it stops working. It depends on your machine performance.


Best regards
Lei


From: Martin Leduc <martin.leduc@...>
Sent: Monday, September 26, 2022 9:39 PM
To: Lei, Maohui <leimaohui@...>; yocto@...
Subject: RE: [EXTERNAL] Re: [yocto] meta-spdxscanner

Hi Lei,

Yes, the issue is fixed by doing the actions defined into https://stackoverflow.com/questions/69858963/how-can-one-fully-replace-distutils-which-is-deprecated-in-3-10 :

Replace
from distutils.core import setup
with
from setuptools import setup

into ../tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py

The output is not really useful at the moment because it crash after hours of computing for the kernel and some other packages.

Actually, I’ve made a workaround to my problems by making a PHP script parsing the Yocto SPDX output but it’s not enough.
INHERIT += "create-spdx"

My idea is: I do not use the scancode-tk as expected.

I’ve also built one Fossology server but it run hours and hours and hours without finishing the produce the report and the reports are not, for my needs, complete.

If you have any input else than it’s defined in the README, it will be really interesting.

Thank you for your help.


Martin Leduc
T : (418) 856-6896
mailto:martin.leduc@...


De : mailto:yocto@... <mailto:yocto@...> De la part de leimaohui
Envoyé : 26 septembre 2022 04:45
À : Martin Leduc <mailto:martin.leduc@...>; mailto:yocto@...
Objet : [EXTERNAL] Re: [yocto] meta-spdxscanner

CAUTION: This email originated from outside of Luminator Technology Group. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,

I’m sorry for late reply.

Is this issue resolved? If not, can you tell me which class you are using? I can’t get enough information from your log.
It will be better if you supply the setting about enable meta-spdxscanner in local.conf.

Best regards
Lei


From: mailto:yocto@... <mailto:yocto@...> On Behalf Of Martin Leduc via lists.yoctoproject.org
Sent: Thursday, September 8, 2022 10:40 PM
To: mailto:yocto@...
Subject: [yocto] meta-spdxscanner

Hi Community,

I’m facing to an issue with meta-spdxscanner.bbclass.  A Python Warning fail the build.  This is the error:

ERROR: python3-patch-native-1.16-r0 do_compile: 'python3 setup.py bdist_wheel ' execution failed.
ERROR: python3-patch-native-1.16-r0 do_compile: ExecutionError('/home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985', 1, None, None)
ERROR: Logfile of failure stored in: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/log.do_compile.3058985
Log data follows:
| DEBUG: Executing shell function do_compile
| /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/patch-1.16/setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
|   from distutils.core import setup
| usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
|    or: setup.py --help [cmd1 cmd2 ...]
|    or: setup.py --help-commands
|    or: setup.py cmd --help
|
| error: invalid command 'bdist_wheel'
| ERROR: 'python3 setup.py bdist_wheel ' execution failed.
| WARNING: /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985:177 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|             #1: bbfatal_log, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 177
|             #2: setuptools3_do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 167
|             #3: do_compile, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 156
|             #4: main, /home/mleduc/1087/1087-NIM/build-sdk/tmp/work/x86_64-linux/python3-patch-native/1.16-r0/temp/run.do_compile.3058985, line 181
ERROR: Task (virtual:native:/home/mleduc/1087/1087-NIM/sources/meta-spdxscanner/recipes-devtools/python/python3-patch_1.16.bb:do_compile) failed with exit code '1'

Any patch or approach to fix this?

I’m using Yocto Kirkstone

Any help will be appreciated

Martin Leduc
Superviseur logiciel platforme, Rail
Luminator Technology Group
T : 1 418 856-6896
mailto:martin.leduc@...
http://www.luminator.com/