Bug #561
closed
Install script can't find cmocka
Added by Plaque FCC 2 months ago.
Updated about 2 months ago.
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?
- Assignee set to Anastasia Klimchuk
- Assignee changed from Anastasia Klimchuk to Peter Marheine
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.
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.
- 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
?
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.
$ 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!
- 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.
Also available in: Atom
PDF