Skip to contentSkip to conversation

package/fluidsynth: fix static build with readline

PATCH New Fabrice Fontaine 3 participants 3 messages Jan 10, 2020 – Apr 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fluidsynth: fix static build with readline

Fixes:
- http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a

---
 ....txt-use-pkg-config-to-find-readline.patch | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch
package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file +49 -0
new file mode 100644
index 0000000000..2b685e4aad
@@ -0,0 +1,49 @@
+From c538c9fa7e392ce16c3354696e7dc7781a78a300 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 10 Jan 2020 08:49:51 +0100
+Subject: [PATCH] CMakeLists.txt: use pkg-config to find readline
+
+Use pkg_check_modules to find readline dependencies such as ncurses and
+fallback on current mechanism.
+
+This will fix the following build failure when building statically:
+
+/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libreadline.a(display.o): in function `cr':
+display.c:(.text+0x1a0): undefined reference to `tputs'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/FluidSynth/fluidsynth/pull/606] 
+---
+ CMakeLists.txt | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4956b1..3747faa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -629,12 +629,15 @@ endif ( enable-oboe )
+ unset ( WITH_READLINE CACHE )
+ unset ( READLINE_LIBS CACHE )
+ if ( enable-readline )
+-  find_package ( Readline )
+-  set ( FOUND_READLINE ${HAVE_READLINE} )
+-  if ( HAVE_READLINE )
++  pkg_check_modules ( READLINE readline )
++  if ( NOT READLINE_FOUND )
++    find_package ( Readline )
++    set ( READLINE_FOUND ${HAVE_READLINE} )
++  endif ( NOT READLINE_FOUND )
++  if ( READLINE_FOUND )
+     set ( WITH_READLINE 1 )
+     set ( READLINE_LIBS ${READLINE_LIBRARIES} )
+-  endif ( HAVE_READLINE )
++  endif ( READLINE_FOUND )
+ endif ( enable-readline )
+ 
+ unset ( ENABLE_MIXER_THREADS CACHE )
+-- 
+2.24.1
+
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 package/fluidsynth: fix static build with readline

Hi Fabrice,

Patch looks good, and fixes static build failures for me. Thanks!

Quoted 60 lines · Fabrice Fontaine

Fixes:
-
http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a

---
 ....txt-use-pkg-config-to-find-readline.patch | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644

package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch

diff --git
a/package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch b/package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file mode 100644
index 0000000000..2b685e4aad
--- /dev/null
+++
b/package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch

package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file +6 -0
@@ -0,0 +1,49 @@
+From c538c9fa7e392ce16c3354696e7dc7781a78a300 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 10 Jan 2020 08:49:51 +0100
+Subject: [PATCH] CMakeLists.txt: use pkg-config to find readline
+
+Use pkg_check_modules to find readline dependencies such as ncurses 

and

package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file +9 -0
+fallback on current mechanism.
+
+This will fix the following build failure when building statically:
+
+/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libreadline.a(display.o): in function `cr':
+display.c:(.text+0x1a0): undefined reference to `tputs'
+
+Fixes:
+ -

http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a

package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file +24 -0
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/FluidSynth/fluidsynth/pull/606]
+---
+ CMakeLists.txt | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4956b1..3747faa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -629,12 +629,15 @@ endif ( enable-oboe )
+ unset ( WITH_READLINE CACHE )
+ unset ( READLINE_LIBS CACHE )
+ if ( enable-readline )
+-  find_package ( Readline )
+-  set ( FOUND_READLINE ${HAVE_READLINE} )
+-  if ( HAVE_READLINE )
++  pkg_check_modules ( READLINE readline )
++  if ( NOT READLINE_FOUND )
++    find_package ( Readline )
++    set ( READLINE_FOUND ${HAVE_READLINE} )
++  endif ( NOT READLINE_FOUND )
++  if ( READLINE_FOUND )

package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch line 49

Quoted 10 lines
package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch new file +10 -0
+     set ( WITH_READLINE 1 )
+     set ( READLINE_LIBS ${READLINE_LIBRARIES} )
+-  endif ( HAVE_READLINE )
++  endif ( READLINE_FOUND )
+ endif ( enable-readline )
+
+ unset ( ENABLE_MIXER_THREADS CACHE )
+--
+2.24.1
+
#2 lore raw

PATCH 1/1 package/fluidsynth: fix static build with readline

In reply to Fabrice Fontaine
Quoted 8 lines · On Fri, 10 Jan 2020 19:26:34 +0100 Fabrice Fontaine…

Fixes:
- http://autobuild.buildroot.org/results/88609eefe55af2ca50d43e17d3424b923528b07a

---
 ....txt-use-pkg-config-to-find-readline.patch | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 package/fluidsynth/0001-CMakeLists.txt-use-pkg-config-to-find-readline.patch

Thanks for your patch. It turns out that your patch was merged in upstream fluidsynth, and in the mean time, we have updated to a newer version of fluidsynth which includes your fix! So I'll mark this particular patch as Not Applicable, but many thanks for having fixed it upstream!

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com