package/gstreamer1/gstd: fix static build
PATCH 1/1 package/gstreamer1/gstd: fix static build
Fix the following static build failure raised since the addition of the package in commit 02ea01ea22e94ef353a638bf16f62f6e3ed1208e:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
display.c:(.text+0xbb5): undefined reference to `tputs'
Fixes:
- http://autobuild.buildroot.org/results/77c10947ddc749c54c7c233e3143f5cdf1edc73d
--- ...use-dependency-function-for-readline.patch | 51 +++++++++++++++++++ ...-use-library-instead-of-both_librari.patch | 33 ++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch create mode 100644 package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch
package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 80ab24d439594bad4365b0395759a57ab0760c6f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 22 Oct 2021 07:33:04 +0200 +Subject: [PATCH] meson.build: use dependency function for readline + +Use meson dependency function to find readline instead of +cc.find_library. This function will retrieve readline pkg-config file +which is available since version 7 (released 5 years ago) and +https://git.savannah.gnu.org/cgit/readline.git/commit/readline.pc.in?id=d49a9082c0e15bba8cd3d8cc0a994409cf823cac. +readline.pc sets tinfo in Requires.Private which will avoid the +following static build failure: + +/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative': +display.c:(.text+0xbb5): undefined reference to `tputs' + +Fixes: + - http://autobuild.buildroot.org/results/77c10947ddc749c54c7c233e3143f5cdf1edc73d + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/RidgeRun/gstd-1.x/pull/261] +--- + meson.build | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index a0af2e2..8edd7aa 100644 +--- a/meson.build ++++ b/meson.build +@@ -30,8 +30,8 @@ systemd_required = get_option('enable-systemd').enabled() + systemd_dep = dependency('systemd', required : systemd_required, version : '>=232') + + cc = meson.get_compiler('c') +-readline = cc.find_library('readline', required: true) +-if readline.found() ++readline_dep = dependency('readline') ++if readline_dep.found() + add_project_arguments('-DHAVE_LIBREADLINE', language: 'c') + add_project_arguments('-DHAVE_READLINE_HISTORY', language: 'c') + # Add arguments to the compiler command line. +@@ -46,8 +46,6 @@ if readline.found() + else + add_project_arguments('-DHAVE_HISTORY_H', language: 'c') + endif +- +- readline_dep = readline + endif + + ## Dependencies +-- +2.33.0 +
package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b30122ef45516b4fc5ce75a36117ef05aa84d944 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 22 Oct 2021 08:00:44 +0200 +Subject: [PATCH] gstd/meson.build: use library instead of both_libraries + +Use meson library function instead of both_libraries to avoid the +following static build failure which is raised because there is no way +to specify that a static library must be used in declare_dependency: + +/home/fabrice/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: attempted static link of dynamic object `gstd/libgstd-core.so.0.13.0' + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + gstd/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gstd/meson.build b/gstd/meson.build +index b81a686..5c59add 100644 +--- a/gstd/meson.build ++++ b/gstd/meson.build +@@ -116,8 +116,7 @@ libgstd_header_files = [ + 'gstd_unix.h' + ] + +-# Create a static library used to create gstd daemon and also is used for tests +-gstd_lib = both_libraries('gstd-core', ++gstd_lib = library('gstd-core', + libgstd_src_files, + c_args : gst_c_args, + version : gstd_version, +-- +2.33.0 +
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 10 lines · On Wed, 27 Jul 2022 08:40:06 +0200 Fabrice Fontaine…
Fix the following static build failure raised since the addition of the package in commit
02ea01ea22e94ef353a638bf16f62f6e3ed1208e:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
display.c:(.text+0xbb5): undefined reference to `tputs'Fixes:
- http://autobuild.buildroot.org/results/77c10947ddc749c54c7c233e3143f5cdf1edc73dSigned-off-by Fabrice Fontaine <[email protected]>
I am confused, I have already applied c6e99c0bc6cd045cd451a1c186bae0bdd5c4a903, which already fixes this issue.
Could you double check?
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 18 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · On Wed, 27 Jul 2022 08:40:06 +0200 Fabrice Fontaine…
Fix the following static build failure raised since the addition of the package in commit
02ea01ea22e94ef353a638bf16f62f6e3ed1208e:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld:
/home/buildroot/autobuild/instance-1/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib/libreadline.a(display.o):
in function `_rl_move_cursor_relative':Quoted 4 lines
display.c:(.text+0xbb5): undefined reference to `tputs'
Fixes:
-http://autobuild.buildroot.org/results/77c10947ddc749c54c7c233e3143f5cdf1edc73d
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Signed-off-by Fabrice Fontaine <[email protected]>I am confused, I have already applied
c6e99c0bc6cd045cd451a1c186bae0bdd5c4a903, which already fixes this issue.Could you double check?
My bad, indeed this patch is already applied. I'll set it as not applicable.
Quoted 7 lines
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
Best Regards,
Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot