appstream icon indicating copy to clipboard operation
appstream copied to clipboard

Build fails with incompatible system appstream

Open aleixpol opened this issue 1 year ago • 10 comments

When executing the tooling internally during a build, it's not preferring to use the libraries we created and it gets all confused.

Can reproduce on a system with Kubuntu 22.04

$ ninja
[1/86] Generating data/gen-output with a custom command
FAILED: data/nol10n_withrelinfo_org.freedesktop.appstream.cli.metainfo.xml 
/lhome/apolgon/kde/build/appstream/tools/appstreamcli news-to-metainfo --limit=6 ../../src/appstream/data/../NEWS ../../src/appstream/data/org.freedesktop.appstream.cli.metainfo.xml data/nol10n_withrelinfo_org.freedesktop.appstream.cli.metainfo.xml
/lhome/apolgon/kde/build/appstream/tools/appstreamcli: symbol lookup error: /lhome/apolgon/kde/build/appstream/tools/appstreamcli: undefined symbol: as_system_info_new_template_for_chassis
[8/86] Generating 'qt/libAppStreamQt.so.1.0.0.p/moc_appstreamqt_export.cpp'.
../../src/appstream/qt/appstreamqt_export.h: note: No relevant classes found. No output generated.
[14/86] Compiling C object tests/as-test_misc.p/test-misc.c.o
ninja: build stopped: subcommand failed.
apolgon@cmtcleu74970763:~/kde/build/appstream$ LD_LIBRARY_PATH=$(pwd)/src:$LD_LIBRARY_PATH ninja
[17/73] Generating 'qt/libAppStreamQt.so.1.0.0.p/moc_spdx.cpp'.
../../src/appstream/qt/spdx.h: note: No relevant classes found. No output generated.
[18/73] Generating 'qt/libAppStreamQt.so.1.0.0.p/moc_utils.cpp'.
../../src/appstream/qt/utils.h: note: No relevant classes found. No output generated.
[19/73] Generating 'qt/libAppStreamQt.so.1.0.0.p/moc_chelpers.cpp'.
../../src/appstream/qt/chelpers.h: note: No relevant classes found. No output generated.
[73/73] Linking target qt/tests/as-test_qt

aleixpol avatar Sep 26 '23 10:09 aleixpol

This is odd, I do not have the new version installed system-wide either (using the old libappstream), and I do not experience this bug. Is this on a pristine meson build directory? Did you try running meson setup --wipe first and check if that fixes the issue?

ximion avatar Sep 26 '23 11:09 ximion

Oh, and: This is not a crossbuild. right? (doesn't look like it, but asking just in case)

ximion avatar Sep 26 '23 11:09 ximion

Not a crossbuild. I'll wait for the error to happen again...

aleixpol avatar Sep 26 '23 12:09 aleixpol

Knowing the meson version would also be useful, as this might be a meson bug (there's nothing special that AppStream does here).

ximion avatar Sep 26 '23 14:09 ximion

meson 1.1.0

aleixpol avatar Sep 26 '23 14:09 aleixpol

I could now reproduce this issue in an archlinux-based system with meson 1.2.1.

aleixpol avatar Sep 27 '23 17:09 aleixpol

Can you check whether this works now with the recent Meson changes?

ximion avatar Oct 03 '23 18:10 ximion

Seems to be working now.

aleixpol avatar Oct 08 '23 02:10 aleixpol

I've hit that today again, I fear it's not entirely working...

aleixpol avatar Oct 18 '23 01:10 aleixpol

The only possible way this could happen is if your environment is unclean. Meson tries to guard against that by setting LD_LIBRARY_PATH, but that doesn't seem to be enough. So please check if you have a spurious libappstream5 anywhere where it doesn't belong and remove/reinstall it!

ximion avatar Oct 18 '23 02:10 ximion