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

[Bug]: fails to compile: ‘AS_FORMAT_STYLE_COLLECTION’ undeclared #5472

Closed
4 tasks done
Justinzobel opened this issue Jul 8, 2023 · 4 comments · Fixed by #5473
Closed
4 tasks done

[Bug]: fails to compile: ‘AS_FORMAT_STYLE_COLLECTION’ undeclared #5472

Justinzobel opened this issue Jul 8, 2023 · 4 comments · Fixed by #5473
Labels

Comments

@Justinzobel
Copy link

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

git master

What Linux distribution are you using?

Fedora Linux

Linux distribution version

39

What architecture are you using?

x86_64

How to reproduce

Attempt to compile flatpak.

main❯ ninja
[91/281] Compiling C object app/liblibflatpak-app.a.p/flatpak-builtins-utils.c.o
FAILED: app/liblibflatpak-app.a.p/flatpak-builtins-utils.c.o 
ccache cc -Iapp/liblibflatpak-app.a.p -Iapp -I../app -I. -I.. -Icommon -I../common -Isubprojects/libglnx -I../subprojects/libglnx -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/appstream -I/usr/include/json-glib-1.0 -I/usr/include/ostree-1 -I/usr/include/polkit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O0 -g -include config.h -Werror=shadow -Werror=empty-body -Werror=strict-prototypes -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=missing-declarations -Werror=return-type -Werror=overflow -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -Werror=missing-include-dirs -Wno-sign-compare -Wno-error=sign-compare -Wno-cast-function-type -Wno-error=cast-function-type -Wno-missing-field-initializers -Wno-error=missing-field-initializers -Wno-unused-parameter -Wno-error=unused-parameter -fvisibility=hidden -fPIC -pthread -MD -MQ app/liblibflatpak-app.a.p/flatpak-builtins-utils.c.o -MF app/liblibflatpak-app.a.p/flatpak-builtins-utils.c.o.d -o app/liblibflatpak-app.a.p/flatpak-builtins-utils.c.o -c ../app/flatpak-builtins-utils.c
../app/flatpak-builtins-utils.c: In function ‘flatpak_dir_load_appstream_store’:
../app/flatpak-builtins-utils.c:1133:40: error: ‘AS_FORMAT_STYLE_COLLECTION’ undeclared (first use in this function); did you mean ‘AS_FORMAT_STYLE_LAST’?
 1133 |   as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        AS_FORMAT_STYLE_LAST
../app/flatpak-builtins-utils.c:1133:40: note: each undeclared identifier is reported only once for each function it appears in
[104/281] Compiling C object common/libflatpak-common.a.p/flatpak-dir.c.o
ninja: build stopped: subcommand failed.

Expected Behavior

Compile

Actual Behavior

Error

Additional Information

No response

@Justinzobel Justinzobel added the bug label Jul 8, 2023
@smcv smcv changed the title [Bug]: [Bug]: fails to compile: ‘AS_FORMAT_STYLE_COLLECTION’ undeclared Jul 10, 2023
@smcv
Copy link
Collaborator

smcv commented Jul 10, 2023

This appears to have been an intentional backwards-compatibility break in libappstream and we should be using AS_FORMAT_STYLE_CATALOG instead; but that's new in 0.16.0 and we only require 0.12.0, so we'd need a version conditional.

smcv added a commit to smcv/flatpak that referenced this issue Jul 10, 2023
AS_FORMAT_STYLE_COLLECTION is a deprecated alias for ..._CATALOG, and
was removed entirely in appstream git main (presumably version 0.17
or 1.0).

Resolves: flatpak#5472
Signed-off-by: Simon McVittie <[email protected]>
@smcv
Copy link
Collaborator

smcv commented Jul 10, 2023

What version of libappstream are you using? Presumably also git main, since 0.16.2 still has AS_FORMAT_STYLE_COLLECTION, and Fedora seems to be still on 0.16.1?

#5473 should fix this, please test.

git master

This can't be true, we don't have a master branch any more.

@Justinzobel
Copy link
Author

Heh yeah, that's my brain just saying git default branch. I should just say that in future but muscle memory is hard to undo.

@Justinzobel
Copy link
Author

This fixes the build issue, thanks!

smcv added a commit that referenced this issue Jul 11, 2023
AS_FORMAT_STYLE_COLLECTION is a deprecated alias for ..._CATALOG, and
was removed entirely in appstream git main (presumably version 0.17
or 1.0).

Resolves: #5472
Signed-off-by: Simon McVittie <[email protected]>
smcv added a commit to smcv/flatpak that referenced this issue Nov 14, 2023
AS_FORMAT_STYLE_COLLECTION is a deprecated alias for ..._CATALOG, and
was removed entirely in appstream git main (presumably version 0.17
or 1.0).

Resolves: flatpak#5472
Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 7a55b7c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants