0001-meson.build-fix-linking-with-libmetadata.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From 731256d7517f0d9cf0b999bb22f864080d5e8690 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 18 Jul 2020 10:00:50 +0200
  4. Subject: [PATCH] meson.build: fix linking with libmetadata
  5. libmetadata is built as a static library and depends on libgvfscommon so
  6. change the dependencies order to put libgvfscommon_dep after
  7. libmetadata_dep or gvfsd-metadata will fail to link on:
  8. FAILED: metadata/gvfsd-metadata
  9. /home/naourr/work/instance-3/output-1/host/bin/arm-none-linux-gnueabi-gcc -o metadata/gvfsd-metadata 'metadata/45447b7@@gvfsd-metadata@exe/meta-daemon.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group common/libgvfscommon.so metadata/libmetadata.a /home/naourr/work/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libgio-2.0.so /home/naourr/work/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libgobject-2.0.so /home/naourr/work/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libglib-2.0.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../common:$ORIGIN/' -Wl,-rpath-link,/home/naourr/work/instance-3/output-1/build/gvfs-1.44.1/build/common -Wl,-rpath-link,/home/naourr/work/instance-3/output-1/build/gvfs-1.44.1/build/metadata
  10. metadata/libmetadata.a(metatree.c.o): In function `safe_open':
  11. metatree.c:(.text+0x9c8): undefined reference to `gvfs_randomize_string'
  12. collect2: error: ld returned 1 exit status
  13. Apply this change in the whole source code and not only for
  14. gvfsd-metadata to avoid any other build failures.
  15. Fixes:
  16. - http://autobuild.buildroot.org/results//fa892c41b6b9285839a0164b000e37fb04dcc194
  17. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  18. [Upstream status:
  19. https://gitlab.gnome.org/GNOME/gvfs/-/merge_requests/92]
  20. ---
  21. client/meson.build | 2 +-
  22. metadata/meson.build | 5 +++--
  23. 2 files changed, 4 insertions(+), 3 deletions(-)
  24. diff --git a/client/meson.build b/client/meson.build
  25. index 8f57d0d3..1d251481 100644
  26. --- a/client/meson.build
  27. +++ b/client/meson.build
  28. @@ -33,8 +33,8 @@ sources = uri_parser_sources + uri_utils + files(
  29. deps = [
  30. gio_unix_dep,
  31. - libgvfscommon_dep,
  32. libmetadata_dep,
  33. + libgvfscommon_dep,
  34. ]
  35. cflags = [
  36. diff --git a/metadata/meson.build b/metadata/meson.build
  37. index 4e120d18..5699e6f2 100644
  38. --- a/metadata/meson.build
  39. +++ b/metadata/meson.build
  40. @@ -72,8 +72,8 @@ libmetadata_dep = declare_dependency(
  41. )
  42. deps = [
  43. - libgvfscommon_dep,
  44. libmetadata_dep,
  45. + libgvfscommon_dep,
  46. ]
  47. if enable_gudev
  48. @@ -105,8 +105,8 @@ if enable_devel_utils
  49. app + '.c',
  50. include_directories: top_inc,
  51. dependencies: [
  52. - libgvfscommon_dep,
  53. libmetadata_dep,
  54. + libgvfscommon_dep,
  55. ],
  56. c_args: cflags,
  57. )
  58. @@ -119,6 +119,7 @@ if enable_devel_utils
  59. include_directories: top_inc,
  60. dependencies: [
  61. libmetadata_dep,
  62. + libgvfscommon_dep,
  63. libxml_dep,
  64. ],
  65. c_args: cflags,
  66. --
  67. 2.27.0