Project

General

Profile

Actions

Bug #561

closed

Install script can't find cmocka

Added by Plaque FCC 22 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
09/13/2024
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

I run as instructed:

    meson setup builddir
    meson compile -C builddir
    meson test -C builddir
    meson install -C builddir

On the last command, after everything has been confiugred and built, and tested, it gets here and breaks:

Installing subprojects/cmocka-1.1.5/src/libcmocka.so.0.5.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libcmocka.so.0.5.0 to /usr/local/lib/x86_64-linux-gnu/libcmocka.so.0
Installing symlink pointing to libcmocka.so.0 to /usr/local/lib/x86_64-linux-gnu/libcmocka.so

ERROR: File 'subprojects/cmocka-1.1.5/src/libcmocka.a' could not be found

What should I do about that?

Actions #1

Updated by Anastasia Klimchuk 10 days ago

  • Assignee set to Anastasia Klimchuk
Actions #2

Updated by Anastasia Klimchuk 9 days ago

  • Assignee changed from Anastasia Klimchuk to Peter Marheine
Actions #3

Updated by Peter Marheine 9 days ago

We probably shouldn't be trying to install the tests or related libraries at all, so need to look into how to tell meson not to install chosen things.

Actions #4

Updated by Peter Marheine 9 days ago

It seems like meson doesn't currently provide a good way to explicitly select install behavior for a subproject (which cmocka currently is, since we're using a wrap for it). From https://github.com/mesonbuild/meson/issues/10561, meson install --skip-subprojects is the intended way to do what we want.

Actions #5

Updated by Anastasia Klimchuk 9 days ago

  • Status changed from New to In Progress

I am wondering, would --skip-subprojects also skip what's in util directory, in particular util/ich_descriptors_tool ?

Actions #6

Updated by Peter Marheine 9 days ago

ich_descriptors_tool isn't a subproject (it doesn't use subproject() or a wrap file), so it would be unaffected.

However, I didn't like how --skip-subprojects needs to be specified on the command line (it adds burden to users), so I've opted to hack around the issue in https://review.coreboot.org/c/flashrom/+/84557 by modifying the cmocka wrap.

Actions #7

Updated by Anastasia Klimchuk 8 days ago

Plaque FCC, in case you want to try with the patch, the instructions how to download the patch are here: https://flashrom.org/dev_guide/development_guide.html#downloading-patch-from-gerrit
(you don't need to push it, you can just download)

Actions #8

Updated by Plaque FCC 8 days ago ยท Edited

$ git fetch https://review.coreboot.org/flashrom refs/changes/57/84557/3 && git checkout -b change-84557 FETCH_HEAD
  • branch refs/changes/57/84557/3 -> FETCH_HEAD Switched to a new branch 'change-84557'
$ rm -rf builddir; meson setup builddir && meson compile -C builddir && meson test -C builddir && sudo meson install -C builddir

Actually, after removing some garbage from the directory and rebuilding from scratch, everything is working fine now.

Thank you very much!

Actions #9

Updated by Anastasia Klimchuk 4 days ago

  • Status changed from In Progress to Resolved

Good to know it works now, thank you for reporting!
The patch is submitted, so I am closing the bug now.

Actions

Also available in: Atom PDF