Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1609

Fix non-constant initializer error in libuuid.

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Carlos Ramos Carreño requested to merge vnmabus/slapos:fix/libuuid_non_constant_initializer into master Jul 05, 2024
  • Overview 21
  • Commits 1
  • Pipelines 0
  • Changes 1

Compiling libuuid was failing with the following error:

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 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
Edited Jul 09, 2024 by Carlos Ramos Carreño
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/libuuid_non_constant_initializer
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7