* [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled
@ 2024-10-25 18:05 Julien Olivain
2024-10-28 15:43 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Julien Olivain @ 2024-10-25 18:05 UTC (permalink / raw)
To: buildroot; +Cc: Carlo Caione, Julien Olivain
When compiling jailhouse with BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y,
build is failing with error:
Traceback (most recent call last):
File "/buildroot/output/build/jailhouse-e57d1eff6d55aeed5f977fe4e2acfb6ccbdd7560/setup.py", line 18, in <module>
setup(name="pyjailhouse", version=version,
File "/buildroot/output/host/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
File "/buildroot/output/host/lib/python3.12/sysconfig.py", line 549, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Empty module name
This is due to a missing dependency on the target python3 package.
This commit fixes the issue by adding this missing dependency.
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
package/jailhouse/jailhouse.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/jailhouse/jailhouse.mk b/package/jailhouse/jailhouse.mk
index b5a8b40fdd..4dfe37f5ec 100644
--- a/package/jailhouse/jailhouse.mk
+++ b/package/jailhouse/jailhouse.mk
@@ -21,7 +21,8 @@ JAILHOUSE_MAKE_OPTS = \
ifeq ($(BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS),y)
JAILHOUSE_DEPENDENCIES += \
host-python-mako \
- host-python-setuptools
+ host-python-setuptools \
+ python3
JAILHOUSE_MAKE_OPTS += \
HAS_PYTHON_MAKO="yes" \
PYTHON_PIP_USABLE="yes"
--
2.47.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled
2024-10-25 18:05 [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled Julien Olivain
@ 2024-10-28 15:43 ` Thomas Petazzoni via buildroot
2024-10-28 19:22 ` Julien Olivain
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-28 15:43 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Carlo Caione
On Fri, 25 Oct 2024 20:05:23 +0200
Julien Olivain <ju.o@free.fr> wrote:
> When compiling jailhouse with BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y,
> build is failing with error:
>
> Traceback (most recent call last):
> File "/buildroot/output/build/jailhouse-e57d1eff6d55aeed5f977fe4e2acfb6ccbdd7560/setup.py", line 18, in <module>
> setup(name="pyjailhouse", version=version,
> File "/buildroot/output/host/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
> return distutils.core.setup(**attrs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ...
> File "/buildroot/output/host/lib/python3.12/sysconfig.py", line 549, in _init_posix
> _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ValueError: Empty module name
>
> This is due to a missing dependency on the target python3 package.
>
> This commit fixes the issue by adding this missing dependency.
This error message is quite unclear... how is this error message
related to having or not having python3 installed on the target?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled
2024-10-28 15:43 ` Thomas Petazzoni via buildroot
@ 2024-10-28 19:22 ` Julien Olivain
2024-10-28 20:09 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Julien Olivain @ 2024-10-28 19:22 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot, Carlo Caione
Hi Thomas,
On 28/10/2024 16:43, Thomas Petazzoni wrote:
> On Fri, 25 Oct 2024 20:05:23 +0200
> Julien Olivain <ju.o@free.fr> wrote:
>
>> When compiling jailhouse with BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y,
>> build is failing with error:
>>
>> Traceback (most recent call last):
>> File
>> "/buildroot/output/build/jailhouse-e57d1eff6d55aeed5f977fe4e2acfb6ccbdd7560/setup.py",
>> line 18, in <module>
>> setup(name="pyjailhouse", version=version,
>> File
>> "/buildroot/output/host/lib/python3.12/site-packages/setuptools/__init__.py",
>> line 108, in setup
>> return distutils.core.setup(**attrs)
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> ...
>> File "/buildroot/output/host/lib/python3.12/sysconfig.py", line
>> 549, in _init_posix
>> _temp = __import__(name, globals(), locals(),
>> ['build_time_vars'], 0)
>>
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> ValueError: Empty module name
>>
>> This is due to a missing dependency on the target python3 package.
>>
>> This commit fixes the issue by adding this missing dependency.
>
> This error message is quite unclear... how is this error message
> related to having or not having python3 installed on the target?
I agree, the Python error message is somewhat cryptic ;) The hint is
"sysconfig.py". A more detailed explanation of the situation would be:
"""
Jailhouse Python scripts are using setuptools with host-python3 which
reads its sysconfig data from the target-python3. See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2024.08.1/package/pkg-python.mk?ref_type=tags#L33
If the target python3 is not installed, this get expanded as an empty
string, leading to this "ValueError: Empty module name" error.
Pure Python packages which are using the python-package infrastructure
usually get this dependency automatically from:
https://gitlab.com/buildroot.org/buildroot/-/blob/2024.08.1/package/pkg-python.mk?ref_type=tags#L295
Here, the jailhouse package rather uses the generic-package
infrastructure, then installs the Python scripts (if enabled) with
dedicated macros. This is why the target python3 is needed.
"""
Do you want me to send a v2 adding that to the commit log?
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled
2024-10-28 19:22 ` Julien Olivain
@ 2024-10-28 20:09 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-28 20:09 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Carlo Caione
Hello,
On Mon, 28 Oct 2024 20:22:09 +0100
Julien Olivain <ju.o@free.fr> wrote:
> I agree, the Python error message is somewhat cryptic ;) The hint is
> "sysconfig.py". A more detailed explanation of the situation would be:
>
> """
> Jailhouse Python scripts are using setuptools with host-python3 which
> reads its sysconfig data from the target-python3. See:
> https://gitlab.com/buildroot.org/buildroot/-/blob/2024.08.1/package/pkg-python.mk?ref_type=tags#L33
>
> If the target python3 is not installed, this get expanded as an empty
> string, leading to this "ValueError: Empty module name" error.
>
> Pure Python packages which are using the python-package infrastructure
> usually get this dependency automatically from:
> https://gitlab.com/buildroot.org/buildroot/-/blob/2024.08.1/package/pkg-python.mk?ref_type=tags#L295
>
> Here, the jailhouse package rather uses the generic-package
> infrastructure, then installs the Python scripts (if enabled) with
> dedicated macros. This is why the target python3 is needed.
> """
>
> Do you want me to send a v2 adding that to the commit log?
Yes, would be nice, thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-28 20:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 18:05 [Buildroot] [PATCH 1/1] package/jailhouse: fix build when python helper scripts are enabled Julien Olivain
2024-10-28 15:43 ` Thomas Petazzoni via buildroot
2024-10-28 19:22 ` Julien Olivain
2024-10-28 20:09 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox