# Yocto thud missing libcrypt breaks wpa\_supplicant

**URL:** <https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-3, thud\
**Created:** [September 27, 2019, 8:57am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080 "2019-09-27T08:57:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![elct9620](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/elct9620/32/63_2.png) [@elct9620](https://hub.mender.io/u/elct9620)\
**Post date:** [September 27, 2019, 8:57am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/1 "2019-09-27T08:57:15Z")

</div>

I am trying to upgrade from `sumo` to `thud` but I got something wrong.

After I boot the Raspberry Pi and the wpa\_supplicant status always shows `inactive (dead)`, and I found some message from `/var/log/user.log`

```auto
Jan 1 00:00:48 raspberrypi3 wpa_supplicant: Libgcrypt warning: missing initialization - please fix the application

```

Does anyone have the same problem as me?

* * *

Update:

The errors message is shown after I manual run `systemctl start wpa_supplicant-nl80211@wlan0`

But I cannot auto start correctly when rpi boot.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 27, 2019, 9:12am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/2 "2019-09-27T09:12:35Z")

</div>

I seem to have seen this at some point, but do not actually recall what it was and how I fixed it.

I suspect that it is not a problem with libgcrypt, and you can probably check your filesystem and see that it is present.

It is just a confusing error message, I would check the `wpa_supplication` logs (maybe increase verbosity), and I suspect that that there is something else going wrong before this is shown.

---

<div class="post-metadata">

**Author:** ![elct9620](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/elct9620/32/63_2.png) [@elct9620](https://hub.mender.io/u/elct9620)\
**Post date:** [September 27, 2019, 9:52am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/3 "2019-09-27T09:52:48Z")

</div>

I create a new environment to compile thud and `libcrypt.so` is not found. But in `sumo` it can be found.

And I am not sure is related to this:  
[http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=27dca7d2e955370166042c05aef1524fe1fbc70b](http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=27dca7d2e955370166042c05aef1524fe1fbc70b)

* * *

Update:

The errors message is shown after I manual run `systemctl start wpa_supplicant-nl80211@wlan0`

But I cannot auto start correctly when rpi boot.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 27, 2019, 4:25pm UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/4 "2019-09-27T16:25:31Z")

</div>

I gave it a go on `thud` as well. I could not reproduce your problem unfortunately.

Might be something environment specific.

---

<div class="post-metadata">

**Author:** ![elct9620](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/elct9620/32/63_2.png) [@elct9620](https://hub.mender.io/u/elct9620)\
**Post date:** [September 28, 2019, 6:12am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/5 "2019-09-28T06:12:33Z")

</div>

I follow this post to create a new environment but still missing libcrypt.  
[https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/21](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/21)

I use the CentOS7 to compile this project, will this break anything?

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 28, 2019, 7:57am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/6 "2019-09-28T07:57:30Z")

</div>

> [@elct9620](#):
>
> I follow this post to create a new environment but still missing libcrypt.  
> [Raspberry Pi 3 Model B/B+ - #21](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/21)

This will not install the necessary parts you need for WiFi out-of-the-box, as this is a minimalist environment (offered by Yocto Project).

I would recommend you try adding the following to your `local.conf`:

```auto
DISTRO_FEATURES_append = " wifi"

```

You can also take a look at [meta-mender/meta-mender-raspberrypi-demo at master · mendersoftware/meta-mender · GitHub](https://github.com/mendersoftware/meta-mender/tree/master/meta-mender-raspberrypi-demo), which contains some bits on getting WiFi running on a Raspberry Pi

---

<div class="post-metadata">

**Author:** ![elct9620](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/elct9620/32/63_2.png) [@elct9620](https://hub.mender.io/u/elct9620)\
**Post date:** [September 28, 2019, 11:15am UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/7 "2019-09-28T11:15:40Z")

</div>

The problem is happen when I use `meta-mender-raspberrypi-demo` and my version copy from it are got this error.

I am not sure what is wrong. It is work correctly when I use `sumo`, I didn’t change anything and switch to `thud` branch and it break.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [September 30, 2019, 5:05pm UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/8 "2019-09-30T17:05:37Z")

</div>

I just ran this from scratch using the exact instructions in the hub post. The only change I made was to add the meta-mender-raspberrypi-demo layer.

I don’t have a /var/log/user.log file. I’m not sure what would be creating that. Do you have any extra software installed?

I do see the “dead” status of the wpa\_supplicant service but wpa\_supplicant-nl80211@wlan0 shows as live. And as far as I know this is expected when using systemd-networkd.

```auto
root@raspberrypi3:~# systemctl status wpa_supplicant | cat
● wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
root@raspberrypi3:~# systemctl status wpa_supplicant-nl80211@wlan0 | cat
● wpa_supplicant-nl80211@wlan0.service - WPA supplicant daemon (interface- and nl80211 driver-specific version)
   Loaded: loaded (/lib/systemd/system/wpa_supplicant-nl80211@.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-09-30 17:02:08 UTC; 2min 36s ago
 Main PID: 294 (wpa_supplicant)
   CGroup: /system.slice/system-wpa_supplicant\x2dnl80211.slice/wpa_supplicant-nl80211@wlan0.service
           └─294 /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf -Dnl80211 -iwlan0

Sep 30 17:03:29 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:37 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:45 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:03:53 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:01 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:09 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:16 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:24 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:32 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
Sep 30 17:04:40 raspberrypi3 wpa_supplicant[294]: wlan0: Failed to initiate sched scan
root@raspberrypi3:~# 

```

---

<div class="post-metadata">

**Author:** ![elct9620](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/elct9620/32/63_2.png) [@elct9620](https://hub.mender.io/u/elct9620)\
**Post date:** [September 30, 2019, 5:20pm UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/9 "2019-09-30T17:20:37Z")

</div>

The `/var/log/user.log` will generated when use `core-image-full-cmdline`, but I found the problem seems not related this error message.

My `wpa_supplicant-nl80211@wlan0` is dead and unable to connect the network even I just add `mender-mender-raspberrypi-demo-layer` with their dependencies.

---

<div class="post-metadata">

**Author:** ![rmbedded](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rmbedded](https://hub.mender.io/u/rmbedded)\
**Post date:** [March 29, 2021, 12:55pm UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/11 "2021-03-29T12:55:17Z")

</div>

Hi @mirzak,  
Sorry if I’m wrongly posting in this old topic, but it’s related so I figured I wouldn’t start a new one.  
I encountered similar issue, however not causing a complete wpa\_supplicant fail and for newer yocto brach.

The case specification:

- Yocto release: warrior,
- Layers included:
  - poky: meta, meta-poky, meta-yocto-bsp
  - meta-openembedded: meta-oe, meta-python, meta-networking, meta-multimedia
  - meta-raspberrypi
  - meta-mender: meta-mender-core, meta-mender-raspberrypi

- wpa-supplicant version: 2.7,
- libgcyrpt files in rootfs: `/usr/lib/libgcrypt.so.20` and `/usr/lib/libgcrypt.so.20.2.4`

When I run wpa\_passphrase or wpa\_supplicant (with parameters -i wlan0 - B -Dnl80211 -P /var/run/wpa\_supplicant.wlan0.pid) in syslog I get following warnings:

`user.warn wpa_passphrase: Libgcrypt warning: missing initialization - please fix the application`  
`user.warn wpa_supplicant: Libgcrypt warning: missing initialization - please fix the application`

This also happens when wpa\_supplicant is started with the same parameters by the `/etc/network/if-pre-up.d/wpa_supplicant` script.

Generally the device connects to the access point, receives a network address and further communication is possible (e.g. access to the Internet)  
Running wpa without running in the background and with increased logging - I did not notice any warnings in wpa output.  
Do you know what could be causing this warning to be generated? Could it cause a potential risk for communications security?

Thank you.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 29, 2021, 2:11pm UTC](https://hub.mender.io/t/yocto-thud-missing-libcrypt-breaks-wpa-supplicant/1080/12 "2021-03-29T14:11:08Z")

</div>

I have seen this issue for a long time now on my projects, while not observing any side affects by it. I have used wpa\_supplicant 2.6 thru to 2.9 and the warning still exists. It very much looks like the wpa\_supplicant code is not initializing the libgrcrypt library as per the requirements.

[https://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html](https://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html)

> <https://github.com/latelee/hostapd/blob/master/src/crypto/crypto_gnutls.c>

might be worth filing an issue/pull request with the project, seems a simple fix
