ubuntu22.04 - libuboot.h

13 views
Skip to first unread message

Darko Komljenović

unread,
Jul 1, 2024, 9:50:35 AM (2 days ago) Jul 1
to swupdate
Hi,

I am trying to build the swupdate2024.05.2 for ubuntu 22.04 but i get the error 
```
include/swupdate_vars.h:10:10:
fatal error: libuboot.h: No such file or directory
  10 | #include <libuboot.h>
```
But i don't see an option how to build without that header as it is referenced in swupdate_vars.h and that is referenced in 5 other files

my defconfig is:
```
CONFIG_SW_VERSIONS_FILE="/etc/swu/sw-versions"
CONFIG_SOCKET_CTRL_PATH="/run/swupdate/sockinstctrl"
CONFIG_SOCKET_PROGRESS_PATH="/run/swupdate/swupdateprog"
# CONFIG_MTD is not set
# CONFIG_LUA is not set
CONFIG_WEBSERVER=y
CONFIG_MONGOOSESSL=y
CONFIG_SIGNED_IMAGES=y
CONFIG_ARCHIVE=y
CONFIG_RAW=y
CONFIG_SHELLSCRIPTHANDLER=y
CONFIG_DOCKER=y
```

What am i missing? how to build now swupdate without libubootenv?

Stefano Babic

unread,
Jul 1, 2024, 10:04:06 AM (2 days ago) Jul 1
to Darko Komljenović, swupdate
On 01.07.24 15:46, Darko Komljenović wrote:
> Hi,
>
> I am trying to build the swupdate2024.05.2 for ubuntu 22.04 but i get
> the error
> ```
> include/swupdate_vars.h:10:10:fatal error: libuboot.h: No such file or
> directory
>   10 | #include <libuboot.h>
> ```
> But i don't see an option how to build without that header

libubootenv is now mandatory - you need to install it to build SWUpdate.

Best regards,
Stefano Babic

> as it is
> referenced in swupdate_vars.h and that is referenced in 5 other files
>
> my defconfig is:
> ```
> CONFIG_SW_VERSIONS_FILE="/etc/swu/sw-versions"
> CONFIG_SOCKET_CTRL_PATH="/run/swupdate/sockinstctrl"
> CONFIG_SOCKET_PROGRESS_PATH="/run/swupdate/swupdateprog"
> # CONFIG_MTD is not set
> # CONFIG_LUA is not set
> CONFIG_WEBSERVER=y
> CONFIG_MONGOOSESSL=y
> CONFIG_SIGNED_IMAGES=y
> CONFIG_ARCHIVE=y
> CONFIG_RAW=y
> CONFIG_SHELLSCRIPTHANDLER=y
> CONFIG_DOCKER=y
> ```
>
> What am i missing? how to build now swupdate without libubootenv?
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Darko Komljenović

unread,
Jul 1, 2024, 10:39:25 AM (2 days ago) Jul 1
to swupdate
Hi,

```
apt install libjson-c-dev libcurl4-openssl-dev libubootenv-dev
```
```
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libubootenv0.1 amd64 0.3.2-1build1 [12.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libubootenv-dev amd64 0.3.2-1build1 [11.0 kB]
```

yields linker issues

```
/usr/bin/ld: core/built-in.o: in function `swupdate_vars_initialize':
(.text.swupdate_vars_initialize+0x5a): undefined reference to `libuboot_read_config_ext'
/usr/bin/ld: (.text.swupdate_vars_initialize+0x10c): undefined reference to `libuboot_get_namespace'
collect2: error: ld returned 1 exit status

```

Stefano Babic

unread,
Jul 1, 2024, 10:47:06 AM (2 days ago) Jul 1
to Darko Komljenović, swupdate
Hi Darko,

On 01.07.24 16:39, Darko Komljenović wrote:
> Hi,
>
> ```
> apt install libjson-c-dev libcurl4-openssl-dev libubootenv-dev
> ```
> ```
> Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libubootenv0.1
> amd64 0.3.2-1build1 [12.0 kB]
> Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libubootenv-dev
> amd64 0.3.2-1build1 [11.0 kB]
> ```
>
> yields linker issues
>
> ```
> /usr/bin/ld: core/built-in.o: in function `swupdate_vars_initialize':
> (.text.swupdate_vars_initialize+0x5a): undefined reference to
> `libuboot_read_config_ext'
> /usr/bin/ld: (.text.swupdate_vars_initialize+0x10c): undefined reference
> to `libuboot_get_namespace' > collect2: error: ld returned 1 exit status
>

Well, but this often happens when an official package is mixed with a
last version of another package.....it is not surprising.

Ubuntu 22.04 delivers SWUpdate 2021.11-1.

You can of course build last SWUpdate on Ubuntu 2022.04, but then you
should also download and compile yourself libubootenv.

Best regards,
Stefano Babic

> ```
> https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com> <https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/swupdate/8bcaf066-16c0-4aa9-8e42-ca1f6253e0d6n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/103c0c73-2764-4ea2-a0ce-bddae1e0efa6n%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/103c0c73-2764-4ea2-a0ce-bddae1e0efa6n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Fabio Estevam

unread,
11:08 AM (9 hours ago) 11:08 AM
to Stefano Babic, Darko Komljenović, swupdate
Hi Darko,

On Mon, Jul 1, 2024 at 11:47 AM Stefano Babic
<stefan...@swupdate.org> wrote:

> You can of course build last SWUpdate on Ubuntu 2022.04, but then you
> should also download and compile yourself libubootenv.

To manually build libubootenv:

git clone https://github.com/sbabic/libubootenv.git
cd libubootenv
git checkout v0.3.5
mkdir build
cmake -B build
cmake --build build
sudo cmake --install build

Regards,

Fabio Estevam
Reply all
Reply to author
Forward
0 new messages