Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with incompatible system appstream #531

Open
aleixpol opened this issue Sep 26, 2023 · 10 comments
Open

Build fails with incompatible system appstream #531

aleixpol opened this issue Sep 26, 2023 · 10 comments

Comments

@aleixpol
Copy link
Collaborator

aleixpol commented Sep 26, 2023

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
@ximion
Copy link
Owner

ximion commented Sep 26, 2023

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
Copy link
Owner

ximion commented Sep 26, 2023

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

@aleixpol
Copy link
Collaborator Author

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

@ximion
Copy link
Owner

ximion commented Sep 26, 2023

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

@aleixpol
Copy link
Collaborator Author

meson 1.1.0

@aleixpol
Copy link
Collaborator Author

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

@ximion
Copy link
Owner

ximion commented Oct 3, 2023

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

@aleixpol
Copy link
Collaborator Author

aleixpol commented Oct 8, 2023

Seems to be working now.

@aleixpol
Copy link
Collaborator Author

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

@aleixpol aleixpol reopened this Oct 18, 2023
@ximion
Copy link
Owner

ximion commented Oct 18, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants