Commit e06692ca authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Fix non-constant initializer error in libuuid.

Compiling libuuid was failing with the following error:

```c
libuuid/src/gen_uuid.c: In function 'uuid_generate_time_generic':
libuuid/src/gen_uuid.c:536:33: error: initializer element is not constant
  THREAD_LOCAL int  cache_size = cs_min;
```

The error was previously detected, and a fix was provided in
52abdf6a , where the GCC minimum version
was increased to 8 (GCC version 8 supports using const-declared
variables as constant expressions in some cases).

Unfortunately, the solution did not work as the `min_version` field of
the `[gcc]` section was being overwritten by its value in
`component/defaults.cfg`.
This is because `util-linux` (where libuuid config is located) is a
transient dependence of `defaults.cfg` through `python3`.

Luckily, the error is already [patched upstream](https://github.com/util-linux/util-linux/commit/07e5c29d501c19e7af84fecb5915e0f9f94cb49f)
in version 2.40.1, so we can just upgrade the library to the latest
version instead (2.40.2), which we do here.

As part of the upgrade we disable the new tools added to the package, as
we do not use them: liblastlog2, pam-lastlog2 and exch.
Otherwise the compilation would fail with the following message:

```
configure: error: liblastlog2 selected, but required sqlite3 library not available
```

See merge request !1609
parent df0f2f49
...@@ -6,14 +6,11 @@ extends = ...@@ -6,14 +6,11 @@ extends =
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
[gcc]
min_version = 8
[util-linux] [util-linux]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-2.39.2.tar.xz url = https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.2.tar.xz
md5sum = 2feb3e7c306f336a3d22a182dfffc942 md5sum = 88faefc8fefced097e58142077a3d14e
configure-options = configure-options =
--disable-static --disable-static
--enable-libuuid --enable-libuuid
...@@ -21,16 +18,19 @@ configure-options = ...@@ -21,16 +18,19 @@ configure-options =
--disable-bash-completion --disable-bash-completion
--disable-cal --disable-cal
--disable-cramfs --disable-cramfs
--disable-exch
--disable-fallocate --disable-fallocate
--disable-fsck --disable-fsck
--enable-libblkid --enable-libblkid
--disable-libfdisk --disable-libfdisk
--disable-liblastlog2
--enable-libmount --enable-libmount
--disable-makeinstall-chown --disable-makeinstall-chown
--disable-makeinstall-setuid --disable-makeinstall-setuid
--disable-more --disable-more
--enable-mount --enable-mount
--disable-nls --disable-nls
--disable-pam-lastlog2
--disable-pivot_root --disable-pivot_root
--disable-pylibmount --disable-pylibmount
--disable-rename --disable-rename
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment