All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/gstreamer1/gstd: fix static build
@ 2022-07-27  6:40 Fabrice Fontaine
  2022-07-27  7:23 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2022-07-27  6:40 UTC (permalink / raw)
  To: buildroot; +Cc: 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/77c10947ddc749c54c7c233e3143f5cdf1edc73d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...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

diff --git a/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch b/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch
new file mode 100644
index 0000000000..60ffc6a90a
--- /dev/null
+++ b/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch
@@ -0,0 +1,51 @@
+From 80ab24d439594bad4365b0395759a57ab0760c6f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
diff --git a/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch b/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch
new file mode 100644
index 0000000000..258c53fd46
--- /dev/null
+++ b/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch
@@ -0,0 +1,33 @@
+From b30122ef45516b4fc5ce75a36117ef05aa84d944 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+---
+ 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
+
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/gstreamer1/gstd: fix static build
@ 2021-10-22  6:13 Fabrice Fontaine
  2022-07-25  7:59 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-10-22  6:13 UTC (permalink / raw)
  To: buildroot; +Cc: 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/77c/77c10947ddc749c54c7c233e3143f5cdf1edc73d/build-end.log

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...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

diff --git a/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch b/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch
new file mode 100644
index 0000000000..60ffc6a90a
--- /dev/null
+++ b/package/gstreamer1/gstd/0006-meson.build-use-dependency-function-for-readline.patch
@@ -0,0 +1,51 @@
+From 80ab24d439594bad4365b0395759a57ab0760c6f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
diff --git a/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch b/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch
new file mode 100644
index 0000000000..258c53fd46
--- /dev/null
+++ b/package/gstreamer1/gstd/0007-gstd-meson.build-use-library-instead-of-both_librari.patch
@@ -0,0 +1,33 @@
+From b30122ef45516b4fc5ce75a36117ef05aa84d944 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+---
+ 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
+
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-27  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27  6:40 [Buildroot] [PATCH 1/1] package/gstreamer1/gstd: fix static build Fabrice Fontaine
2022-07-27  7:23 ` Thomas Petazzoni via buildroot
2022-07-27  7:27   ` Fabrice Fontaine
  -- strict thread matches above, loose matches on Subject: below --
2021-10-22  6:13 Fabrice Fontaine
2022-07-25  7:59 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.