diff mbox series

[2/4] python3: add libxcrypt-native dependency

Message ID 20230527133252.284132-2-f_l_k@t-online.de
State Accepted, archived
Commit c6198e1b1c3e3a3413b6ff9f014b40114f1850db
Headers show
Series [1/4] ell: upgrade 0.56 -> 0.57 | expand

Commit Message

Markus Volk May 27, 2023, 1:32 p.m. UTC
crypt.h is otherwise taken from the host machine

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-devtools/python/python3_3.11.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Kanavin May 28, 2023, 1:39 p.m. UTC | #1
Can you please show how it looks like? We do have a test for host
contamination via headers, so I'd like to see what happens exactly and
where the test isn't catching it.

Same for patches 3/4, 4/4.

Alex

On Sat, 27 May 2023 at 15:33, Markus Volk <f_l_k@t-online.de> wrote:
>
> crypt.h is otherwise taken from the host machine
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/recipes-devtools/python/python3_3.11.2.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb
> index 421a305e22..1ca4ad35be 100644
> --- a/meta/recipes-devtools/python/python3_3.11.2.bb
> +++ b/meta/recipes-devtools/python/python3_3.11.2.bb
> @@ -72,7 +72,7 @@ ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config
>  ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
>
>
> -DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses"
> +DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses libxcrypt-native"
>  DEPENDS:append:class-target = " python3-native"
>  DEPENDS:append:class-nativesdk = " python3-native"
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181806): https://lists.openembedded.org/g/openembedded-core/message/181806
> Mute This Topic: https://lists.openembedded.org/mt/99167320/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alexander Kanavin May 28, 2023, 1:41 p.m. UTC | #2
Also, how is the native header used in the target build? Isn't that
incorrect in itself?

Alex

On Sun, 28 May 2023 at 15:40, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> Can you please show how it looks like? We do have a test for host
> contamination via headers, so I'd like to see what happens exactly and
> where the test isn't catching it.
>
> Same for patches 3/4, 4/4.
>
> Alex
>
> On Sat, 27 May 2023 at 15:33, Markus Volk <f_l_k@t-online.de> wrote:
> >
> > crypt.h is otherwise taken from the host machine
> >
> > Signed-off-by: Markus Volk <f_l_k@t-online.de>
> > ---
> >  meta/recipes-devtools/python/python3_3.11.2.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb
> > index 421a305e22..1ca4ad35be 100644
> > --- a/meta/recipes-devtools/python/python3_3.11.2.bb
> > +++ b/meta/recipes-devtools/python/python3_3.11.2.bb
> > @@ -72,7 +72,7 @@ ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config
> >  ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
> >
> >
> > -DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses"
> > +DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses libxcrypt-native"
> >  DEPENDS:append:class-target = " python3-native"
> >  DEPENDS:append:class-nativesdk = " python3-native"
> >
> > --
> > 2.34.1
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181824): https://lists.openembedded.org/g/openembedded-core/message/181824
> Mute This Topic: https://lists.openembedded.org/mt/99167320/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Markus Volk May 28, 2023, 1:56 p.m. UTC | #3
I noticed this because I was trying to see if my image could reproduce 
itself. To do this I installed some build tools, perl and python 
modules and tried if a core-image-minimal can be built in this 
environment.

This failed for some packages because crypt() was missing. I did not 
have any dev packages installed, so my guess was that it was because my 
image was missing crypt.h.

To reproduce this on my host machine (Ubuntu 22.04), I ran
sudo mv /usr/include/crypt.h /usr/include/crypt.h.old
sudo rm -r tmp sstate-cache

Now I also had errors on my host system

Am So, 28. Mai 2023 um 15:39:47 +0200 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> Can you please show how it looks like? We do have a test for host
> contamination via headers, so I'd like to see what happens exactly and
> where the test isn't catching it.
> 
> Same for patches 3/4, 4/4.
> 
> Alex
> 
> On Sat, 27 May 2023 at 15:33, Markus Volk <f_l_k@t-online.de 
> <mailto:f_l_k@t-online.de>> wrote:
>> 
>>  crypt.h is otherwise taken from the host machine
>> 
>>  Signed-off-by: Markus Volk <f_l_k@t-online.de 
>> <mailto:f_l_k@t-online.de>>
>>  ---
>>   meta/recipes-devtools/python/python3_3.11.2.bb | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>>  diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb 
>> b/meta/recipes-devtools/python/python3_3.11.2.bb
>>  index 421a305e22..1ca4ad35be 100644
>>  --- a/meta/recipes-devtools/python/python3_3.11.2.bb
>>  +++ b/meta/recipes-devtools/python/python3_3.11.2.bb
>>  @@ -72,7 +72,7 @@ ALTERNATIVE_LINK_NAME[python3-config] = 
>> "${bindir}/python${PYTHON_MAJMIN}-config
>>   ALTERNATIVE_TARGET[python3-config] = 
>> "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
>> 
>> 
>>  -DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl 
>> sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid 
>> libtirpc libnsl2 autoconf-archive-native ncurses"
>>  +DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl 
>> sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid 
>> libtirpc libnsl2 autoconf-archive-native ncurses libxcrypt-native"
>>   DEPENDS:append:class-target = " python3-native"
>>   DEPENDS:append:class-nativesdk = " python3-native"
>> 
>>  --
>>  2.34.1
>> 
>> 
>> 
>> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181824): 
> <https://lists.openembedded.org/g/openembedded-core/message/181824>
> Mute This Topic: <https://lists.openembedded.org/mt/99167320/3618223>
> Group Owner: openembedded-core+owner@lists.openembedded.org 
> <mailto:openembedded-core+owner@lists.openembedded.org>
> Unsubscribe: 
> <https://lists.openembedded.org/g/openembedded-core/unsub> 
> [f_l_k@t-online.de <mailto:f_l_k@t-online.de>]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Markus Volk May 28, 2023, 2:03 p.m. UTC | #4
Am So, 28. Mai 2023 um 15:41:10 +0200 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> Also, how is the native header used in the target build? Isn't that
> incorrect in itself?

I guess its only needed to build the native variants of that packages
Alexander Kanavin May 28, 2023, 2:23 p.m. UTC | #5
But can you show the actual error please? If it’s a native only issue then
a different fix is needed, so that native dependency isn’t added to a
target build.

Alex

On Sun 28. May 2023 at 16.03, Markus Volk <f_l_k@t-online.de> wrote:

> Am So, 28. Mai 2023 um 15:41:10 +0200 schrieb Alexander Kanavin <
> alex.kanavin@gmail.com>:
>
> Also, how is the native header used in the target build? Isn't that
> incorrect in itself?
>
>
> I guess its only needed to build the native variants of that packages
>
Markus Volk May 28, 2023, 2:53 p.m. UTC | #6
Am So, 28. Mai 2023 um 16:23:36 +0200 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> But can you show the actual error please?

python3-native for example fails like this:
ERROR: python3-native-3.11.2-r0 do_install: 
ExecutionError('/home/flk/poky/build/tmp/work/x86_64-linux/python3-native/3.11.2-r0/temp/run.do_install.4082972', 
1, None, None)
ERROR: Logfile of failure stored in: 
/home/flk/poky/build/tmp/work/x86_64-linux/python3-native/3.11.2-r0/temp/log.do_install.4082972
Log data follows:
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 
'bit-64', 'x86_64-linux', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_install
| The necessary bits to build these optional modules were not found:
| _crypt
|
| WARNING: exit code 1 from a shell command.
ERROR: Task 
(virtual:native:/home/flk/poky/meta/recipes-devtools/python/python3_3.11.2.bb:do_install) 
failed with exit code '1'
NOTE: Tasks Summary: Attempted 1089 tasks of which 1078 didn't need to 
be rerun and 1 failed.

Summary: 1 task failed:
  
virtual:native:/home/flk/poky/meta/recipes-devtools/python/python3_3.11.2.bb:do_install
Summary: There was 1 ERROR message, returning a non-zero exit code.


ruby-native fails like this:

compiling ../ruby-3.2.2/vm_trace.c
| In file included from ../ruby-3.2.2/include/ruby/ruby.h:42,
|                  from ../ruby-3.2.2/debug_counter.h:362,
|                  from ../ruby-3.2.2/string.c:24:
| ../ruby-3.2.2/string.c: In function ‘rb_str_crypt’:
| ../ruby-3.2.2/string.c:10169:35: error: invalid application of 
‘sizeof’ to incomplete type ‘struct crypt_data’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |                                   ^~~~~~
| ../ruby-3.2.2/include/ruby/internal/memory.h:299:7: note: in 
definition of macro ‘RB_ALLOCV’
|   299 |     ((n) < RUBY_ALLOCV_LIMIT ? \
|       |       ^
| ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro 
‘ALLOCV’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |            ^~~~~~
| compiling ../ruby-3.2.2/missing/setproctitle.c
| compiling ../ruby-3.2.2/missing/strlcpy.c
| compiling ../ruby-3.2.2/missing/strlcat.c
| In file included from /usr/include/stdlib.h:574,
|                  from ../ruby-3.2.2/include/ruby/defines.h:27,
|                  from ../ruby-3.2.2/include/ruby/ruby.h:25,
|                  from ../ruby-3.2.2/debug_counter.h:362,
|                  from ../ruby-3.2.2/string.c:24:
| ../ruby-3.2.2/string.c:10169:35: error: invalid application of 
‘sizeof’ to incomplete type ‘struct crypt_data’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |                                   ^~~~~~
| ../ruby-3.2.2/include/ruby/internal/memory.h:398:20: note: in 
expansion of macro ‘RB_ALLOCV’
|   398 | #define ALLOCV     RB_ALLOCV     /**< @old{RB_ALLOCV} */
|       |                    ^~~~~~~~~
| ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro 
‘ALLOCV’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |            ^~~~~~
| In file included from ../ruby-3.2.2/include/ruby/ruby.h:42,
|                  from ../ruby-3.2.2/debug_counter.h:362,
|                  from ../ruby-3.2.2/string.c:24:
| ../ruby-3.2.2/string.c:10169:35: error: invalid application of 
‘sizeof’ to incomplete type ‘struct crypt_data’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |                                   ^~~~~~
| ../ruby-3.2.2/include/ruby/internal/memory.h:301:33: note: in 
definition of macro ‘RB_ALLOCV’
|   301 |      rb_alloc_tmp_buffer(&(v), (n)))
|       |                                 ^
| ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro 
‘ALLOCV’
| 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
|       |            ^~~~~~
| ../ruby-3.2.2/string.c:10173:11: warning: implicit declaration of 
function ‘crypt_r’; did you mean ‘crypt’? 
[-Wimplicit-function-declaration]
| 10173 |     res = crypt_r(s, saltp, data);
|       |           ^~~~~~~
|       |           crypt
| ../ruby-3.2.2/string.c:10173:9: warning: assignment to ‘char *’ 
from ‘int’ makes pointer from integer without a cast 
[-Wint-conversion]
| 10173 |     res = crypt_r(s, saltp, data);
|       |         ^
Alexander Kanavin May 28, 2023, 3:01 p.m. UTC | #7
Thanks, then all three recipes should add libxcrypt to DEPENDS (not
libxcrypt-native). For native variants it will be adjusted
automatically.

Alex

On Sun, 28 May 2023 at 16:53, Markus Volk <f_l_k@t-online.de> wrote:
>
> Am So, 28. Mai 2023 um 16:23:36 +0200 schrieb Alexander Kanavin <alex.kanavin@gmail.com>:
>
> But can you show the actual error please?
>
>
> python3-native for example fails like this:
> ERROR: python3-native-3.11.2-r0 do_install: ExecutionError('/home/flk/poky/build/tmp/work/x86_64-linux/python3-native/3.11.2-r0/temp/run.do_install.4082972', 1, None, None)
> ERROR: Logfile of failure stored in: /home/flk/poky/build/tmp/work/x86_64-linux/python3-native/3.11.2-r0/temp/log.do_install.4082972
> Log data follows:
> | DEBUG: Executing python function autotools_aclocals
> | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']
> | DEBUG: Python function autotools_aclocals finished
> | DEBUG: Executing shell function do_install
> | The necessary bits to build these optional modules were not found:
> | _crypt
> |
> | WARNING: exit code 1 from a shell command.
> ERROR: Task (virtual:native:/home/flk/poky/meta/recipes-devtools/python/python3_3.11.2.bb:do_install) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1089 tasks of which 1078 didn't need to be rerun and 1 failed.
>
> Summary: 1 task failed:
>   virtual:native:/home/flk/poky/meta/recipes-devtools/python/python3_3.11.2.bb:do_install
> Summary: There was 1 ERROR message, returning a non-zero exit code.
>
>
> ruby-native fails like this:
>
> compiling ../ruby-3.2.2/vm_trace.c
> | In file included from ../ruby-3.2.2/include/ruby/ruby.h:42,
> |                  from ../ruby-3.2.2/debug_counter.h:362,
> |                  from ../ruby-3.2.2/string.c:24:
> | ../ruby-3.2.2/string.c: In function ‘rb_str_crypt’:
> | ../ruby-3.2.2/string.c:10169:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct crypt_data’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |                                   ^~~~~~
> | ../ruby-3.2.2/include/ruby/internal/memory.h:299:7: note: in definition of macro ‘RB_ALLOCV’
> |   299 |     ((n) < RUBY_ALLOCV_LIMIT ? \
> |       |       ^
> | ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro ‘ALLOCV’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |            ^~~~~~
> | compiling ../ruby-3.2.2/missing/setproctitle.c
> | compiling ../ruby-3.2.2/missing/strlcpy.c
> | compiling ../ruby-3.2.2/missing/strlcat.c
> | In file included from /usr/include/stdlib.h:574,
> |                  from ../ruby-3.2.2/include/ruby/defines.h:27,
> |                  from ../ruby-3.2.2/include/ruby/ruby.h:25,
> |                  from ../ruby-3.2.2/debug_counter.h:362,
> |                  from ../ruby-3.2.2/string.c:24:
> | ../ruby-3.2.2/string.c:10169:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct crypt_data’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |                                   ^~~~~~
> | ../ruby-3.2.2/include/ruby/internal/memory.h:398:20: note: in expansion of macro ‘RB_ALLOCV’
> |   398 | #define ALLOCV     RB_ALLOCV     /**< @old{RB_ALLOCV} */
> |       |                    ^~~~~~~~~
> | ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro ‘ALLOCV’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |            ^~~~~~
> | In file included from ../ruby-3.2.2/include/ruby/ruby.h:42,
> |                  from ../ruby-3.2.2/debug_counter.h:362,
> |                  from ../ruby-3.2.2/string.c:24:
> | ../ruby-3.2.2/string.c:10169:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct crypt_data’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |                                   ^~~~~~
> | ../ruby-3.2.2/include/ruby/internal/memory.h:301:33: note: in definition of macro ‘RB_ALLOCV’
> |   301 |      rb_alloc_tmp_buffer(&(v), (n)))
> |       |                                 ^
> | ../ruby-3.2.2/string.c:10169:12: note: in expansion of macro ‘ALLOCV’
> | 10169 |     data = ALLOCV(databuf, sizeof(struct crypt_data));
> |       |            ^~~~~~
> | ../ruby-3.2.2/string.c:10173:11: warning: implicit declaration of function ‘crypt_r’; did you mean ‘crypt’? [-Wimplicit-function-declaration]
> | 10173 |     res = crypt_r(s, saltp, data);
> |       |           ^~~~~~~
> |       |           crypt
> | ../ruby-3.2.2/string.c:10173:9: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
> | 10173 |     res = crypt_r(s, saltp, data);
> |       |         ^
>
>
Markus Volk May 28, 2023, 3:08 p.m. UTC | #8
Am So, 28. Mai 2023 um 17:01:44 +0200 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> Thanks, then all three recipes should add libxcrypt to DEPENDS

But wouldn't that lead to multiple virtual/crypt providers on musl ?
Alexander Kanavin May 28, 2023, 3:16 p.m. UTC | #9
Adding libxcrypt-native to DEPENDS definitely isn't correct, so you
could check why virtual/crypt dependency isn't working properly for
adding the needed headers into native variant's sysroot. If all fails,
adjust DEPENDS:append:class-native.

Alex

On Sun, 28 May 2023 at 17:08, Markus Volk <f_l_k@t-online.de> wrote:
>
> Am So, 28. Mai 2023 um 17:01:44 +0200 schrieb Alexander Kanavin <alex.kanavin@gmail.com>:
>
> Thanks, then all three recipes should add libxcrypt to DEPENDS
>
>
> But wouldn't that lead to multiple virtual/crypt providers on musl ?
Richard Purdie May 29, 2023, 7:08 a.m. UTC | #10
On Sun, 2023-05-28 at 17:16 +0200, Alexander Kanavin wrote:
> Adding libxcrypt-native to DEPENDS definitely isn't correct, so you
> could check why virtual/crypt dependency isn't working properly for
> adding the needed headers into native variant's sysroot. If all fails,
> adjust DEPENDS:append:class-native.

Alex is right and I should have spotted this, the -native dependency
definitely isn't right. We'll either need to fix things or revert them
and wait for the right fix...

Cheers,

Richard
Richard Purdie May 29, 2023, 12:34 p.m. UTC | #11
On Mon, 2023-05-29 at 14:02 +0200, Markus Volk wrote:
> Am Mo, 29. Mai 2023 um 08:08:09 +0100 schrieb Richard Purdie
> <richard.purdie@linuxfoundation.org>:
> > Alex is right and I should have spotted this, the -native
> > dependency
> > definitely isn't right. We'll either need to fix things or revert
> > them
> > and wait for the right fix...
> 
> 
> Absolutely. I had a quick look at native.bbclass yesterday, but
> haven't found a nice way to deal with this yet.  This week I'm on
> night shift and therefore have rather little time to deal with the
> problem. I can send v2 patches which just add
> 
> DEPENDS:append:class-native = " libxcrypt-native"
> 
> But revert would also be fine for me, as this is more of a niche
> problem

I'm going to revert those changes and then we can work out the correct
fix without any time pressures (and then I won't need to keep this on
my 'need to do something about' mental checklist!).

Cheers,

Richard
Markus Volk June 3, 2023, 5:51 p.m. UTC | #12
Am Mo, 29. Mai 2023 um 13:34:40 +0100 schrieb Richard Purdie 
<richard.purdie@linuxfoundation.org>:
> I'm going to revert those changes and then we can work out the correct
> fix without any time pressures (and then I won't need to keep this on
> my 'need to do something about' mental checklist!).

I had some time to look at this problem. virtual/crypt-native is not 
installed into recipe-sysroot-native because of this entry in 
bitbake.conf:
ASSUME_PROVIDED = "virtual/crypt-native"

Removing the entry solved the issue for me. I could successfully build 
core-image-minimal for musl and glibc without crypt.h from host machine.

But I don't know the reason why this is ASSUME_PROVIDED, so I'm unsure 
if this should even be touched.

In a second step I created a musl-native recipe to be able to install 
musl crypt.h into recipe-sysroot-native, but I'm not sure if this is 
necessary either.

<https://github.com/MarkusVolk/openembedded-core/commits/virtual/crypt-native>
Alexander Kanavin June 3, 2023, 6:20 p.m. UTC | #13
On Sat, 3 Jun 2023 at 19:52, Markus Volk <f_l_k@t-online.de> wrote:
> I had some time to look at this problem. virtual/crypt-native is not installed into recipe-sysroot-native because of this entry in bitbake.conf:
> ASSUME_PROVIDED = "virtual/crypt-native"
>
> Removing the entry solved the issue for me. I could successfully build core-image-minimal for musl and glibc without crypt.h from host machine.
>
> But I don't know the reason why this is ASSUME_PROVIDED, so I'm unsure if this should even be touched.
>
> In a second step I created a musl-native recipe to be able to install musl crypt.h into recipe-sysroot-native, but I'm not sure if this is necessary either.
>
> https://github.com/MarkusVolk/openembedded-core/commits/virtual/crypt-native

I took a look; I believe this is by design, and for native recipes
crypt.h does indeed need to be provided by the host distro, and not
any of the recipes. This is where it was added:
https://git.yoctoproject.org/poky/commit/?id=29f65bda6d2c

Alex
Markus Volk June 4, 2023, 7:53 p.m. UTC | #14
Thanks for the link

Am Sa, 3. Jun 2023 um 20:20:48 +0200 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> On Sat, 3 Jun 2023 at 19:52, Markus Volk <f_l_k@t-online.de 
> <mailto:f_l_k@t-online.de>> wrote:
>>  I had some time to look at this problem. virtual/crypt-native is 
>> not installed into recipe-sysroot-native because of this entry in 
>> bitbake.conf:
>>  ASSUME_PROVIDED = "virtual/crypt-native"
>> 
>>  Removing the entry solved the issue for me. I could successfully 
>> build core-image-minimal for musl and glibc without crypt.h from 
>> host machine.
>> 
>>  But I don't know the reason why this is ASSUME_PROVIDED, so I'm 
>> unsure if this should even be touched.
>> 
>>  In a second step I created a musl-native recipe to be able to 
>> install musl crypt.h into recipe-sysroot-native, but I'm not sure if 
>> this is necessary either.
>> 
>>  
>> <https://github.com/MarkusVolk/openembedded-core/commits/virtual/crypt-native>
> 
> I took a look; I believe this is by design, and for native recipes
> crypt.h does indeed need to be provided by the host distro, and not
> any of the recipes. This is where it was added:
> <https://git.yoctoproject.org/poky/commit/?id=29f65bda6d2c>
> 
> Alex
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb
index 421a305e22..1ca4ad35be 100644
--- a/meta/recipes-devtools/python/python3_3.11.2.bb
+++ b/meta/recipes-devtools/python/python3_3.11.2.bb
@@ -72,7 +72,7 @@  ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config
 ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
 
 
-DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses"
+DEPENDS = "bzip2-replacement-native expat libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux-libuuid libtirpc libnsl2 autoconf-archive-native ncurses libxcrypt-native"
 DEPENDS:append:class-target = " python3-native"
 DEPENDS:append:class-nativesdk = " python3-native"