All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library
@ 2020-06-28 14:26 Fabrice Fontaine
  2020-06-28 14:26 ` [Buildroot] [PATCH 2/2] package/mpd: add fluidsynth optional dependency Fabrice Fontaine
  2020-06-29 20:50 ` [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-06-28 14:26 UTC (permalink / raw)
  To: buildroot

applications, such as mpd, fail to build statically with fluidsynth
because fluidsynth does not fill Libs.Private in their pkg-config file

Because fluidsynth is a cmake-package with many dependencies, it is not
easy to fix so just add a dynamic library dependency

Fixes:
 - http://autobuild.buildroot.org/results/ec9dd2903359b9bf6b15c8cb69e732f8cb6c4d39

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/fluidsynth/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/fluidsynth/Config.in b/package/fluidsynth/Config.in
index c1cb923489..4fcbfa7411 100644
--- a/package/fluidsynth/Config.in
+++ b/package/fluidsynth/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_FLUIDSYNTH
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
+	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBGLIB2
 	help
 	  FluidSynth is a real-time software synthesizer based on the
@@ -115,6 +116,7 @@ config BR2_PACKAGE_FLUIDSYNTH_READLINE
 
 endif # BR2_PACKAGE_FLUIDSYNTH
 
-comment "fluidsynth needs a toolchain w/ threads, wchar"
+comment "fluidsynth needs a toolchain w/ threads, wchar, dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS
-- 
2.26.2

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

* [Buildroot] [PATCH 2/2] package/mpd: add fluidsynth optional dependency
  2020-06-28 14:26 [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Fabrice Fontaine
@ 2020-06-28 14:26 ` Fabrice Fontaine
  2020-06-29 20:50 ` [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Yann E. MORIN
  1 sibling, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-06-28 14:26 UTC (permalink / raw)
  To: buildroot

fluidsynth is an optional dependency of mpd since version 0.18.5 and
https://github.com/MusicPlayerDaemon/MPD/commit/727c6226597fb710239b14e7985d97ec6b53f0ee

It is enabled by default

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mpd/Config.in | 10 ++++++++++
 package/mpd/mpd.mk    |  7 +++++++
 2 files changed, 17 insertions(+)

diff --git a/package/mpd/Config.in b/package/mpd/Config.in
index e9e7b83cbd..1b3ab8fa5d 100644
--- a/package/mpd/Config.in
+++ b/package/mpd/Config.in
@@ -114,6 +114,16 @@ config BR2_PACKAGE_MPD_FLAC
 	  Enable flac input/streaming support.
 	  Select this if you want to play back FLAC files.
 
+config BR2_PACKAGE_MPD_FLUIDSYNTH
+	bool "fluidsynth"
+	depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_FLUIDSYNTH
+	help
+	  Enable fluidsynth MIDI decoder support.
+
+comment "fluidsynth support needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
+
 config BR2_PACKAGE_MPD_LIBSNDFILE
 	bool "libsndfile"
 	select BR2_PACKAGE_LIBSNDFILE
diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk
index 474927749a..b4bafbd64c 100644
--- a/package/mpd/mpd.mk
+++ b/package/mpd/mpd.mk
@@ -97,6 +97,13 @@ else
 MPD_CONF_OPTS += -Dflac=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_MPD_FLUIDSYNTH),y)
+MPD_DEPENDENCIES += fluidsynth
+MPD_CONF_OPTS += -Dfluidsynth=enabled
+else
+MPD_CONF_OPTS += -Dfluidsynth=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y)
 MPD_CONF_OPTS += -Dhttpd=true
 else
-- 
2.26.2

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

* [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library
  2020-06-28 14:26 [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Fabrice Fontaine
  2020-06-28 14:26 ` [Buildroot] [PATCH 2/2] package/mpd: add fluidsynth optional dependency Fabrice Fontaine
@ 2020-06-29 20:50 ` Yann E. MORIN
  2020-06-29 21:22   ` Fabrice Fontaine
  1 sibling, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2020-06-29 20:50 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-06-28 16:26 +0200, Fabrice Fontaine spake thusly:
> applications, such as mpd, fail to build statically with fluidsynth
> because fluidsynth does not fill Libs.Private in their pkg-config file
> 
> Because fluidsynth is a cmake-package with many dependencies, it is not
> easy to fix so just add a dynamic library dependency
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/ec9dd2903359b9bf6b15c8cb69e732f8cb6c4d39
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/fluidsynth/Config.in | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/fluidsynth/Config.in b/package/fluidsynth/Config.in
> index c1cb923489..4fcbfa7411 100644
> --- a/package/fluidsynth/Config.in
> +++ b/package/fluidsynth/Config.in
> @@ -3,6 +3,7 @@ config BR2_PACKAGE_FLUIDSYNTH
>  	depends on BR2_USE_WCHAR # libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
>  	depends on BR2_USE_MMU # libglib2
> +	depends on !BR2_STATIC_LIBS

You forgot to propagate to BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FLUIDSYNTH

However, I am not too fond of the i!static addition.

Looking at the failed build log, it seems that the bulk is missing link
to some libglib2 library, because it can't resolve a few g_-prefixed
symbols:

    g_rec_mutex_lock
    g_rec_mutex_unlock
    g_get_monotonic_time
    g_usleep
    g_thread_try_new
    g_return_if_fail_warning
    g_thread_unref
    g_clear_error

Could you at least give a try to see if linking to libglib2 would be
solve it?

Regards,
Yann E. MORIN.

>  	select BR2_PACKAGE_LIBGLIB2
>  	help
>  	  FluidSynth is a real-time software synthesizer based on the
> @@ -115,6 +116,7 @@ config BR2_PACKAGE_FLUIDSYNTH_READLINE
>  
>  endif # BR2_PACKAGE_FLUIDSYNTH
>  
> -comment "fluidsynth needs a toolchain w/ threads, wchar"
> +comment "fluidsynth needs a toolchain w/ threads, wchar, dynamic library"
>  	depends on BR2_USE_MMU
> -	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		BR2_STATIC_LIBS
> -- 
> 2.26.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library
  2020-06-29 20:50 ` [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Yann E. MORIN
@ 2020-06-29 21:22   ` Fabrice Fontaine
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-06-29 21:22 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le lun. 29 juin 2020 ? 22:50, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> Fabrice, All,
>
> On 2020-06-28 16:26 +0200, Fabrice Fontaine spake thusly:
> > applications, such as mpd, fail to build statically with fluidsynth
> > because fluidsynth does not fill Libs.Private in their pkg-config file
> >
> > Because fluidsynth is a cmake-package with many dependencies, it is not
> > easy to fix so just add a dynamic library dependency
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/ec9dd2903359b9bf6b15c8cb69e732f8cb6c4d39
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/fluidsynth/Config.in | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/fluidsynth/Config.in b/package/fluidsynth/Config.in
> > index c1cb923489..4fcbfa7411 100644
> > --- a/package/fluidsynth/Config.in
> > +++ b/package/fluidsynth/Config.in
> > @@ -3,6 +3,7 @@ config BR2_PACKAGE_FLUIDSYNTH
> >       depends on BR2_USE_WCHAR # libglib2
> >       depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> >       depends on BR2_USE_MMU # libglib2
> > +     depends on !BR2_STATIC_LIBS
>
> You forgot to propagate to BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FLUIDSYNTH
>
> However, I am not too fond of the i!static addition.
>
> Looking at the failed build log, it seems that the bulk is missing link
> to some libglib2 library, because it can't resolve a few g_-prefixed
> symbols:
>
>     g_rec_mutex_lock
>     g_rec_mutex_unlock
>     g_get_monotonic_time
>     g_usleep
>     g_thread_try_new
>     g_return_if_fail_warning
>     g_thread_unref
>     g_clear_error
>
> Could you at least give a try to see if linking to libglib2 would be
> solve it?
I already tried that before sending this patch and I got a build
failure on readline.
Here is the full list of libraries that fluidsynth can link with (from
https://github.com/FluidSynth/fluidsynth/blob/master/src/CMakeLists.txt):

target_link_libraries ( libfluidsynth
${GLIB_LIBRARIES}
${GMODULE_LIBRARIES}
${LASH_LIBRARIES}
${JACK_LIBRARIES}
${ALSA_LIBRARIES}
${PULSE_LIBRARIES}
${PORTAUDIO_LIBRARIES}
${LIBSNDFILE_LIBRARIES}
${SDL2_LIBRARIES}
${DBUS_LIBRARIES}
${READLINE_LIBS}
${DART_LIBS}
${COREAUDIO_LIBS}
${COREMIDI_LIBS}
${WINDOWS_LIBS}
${MidiShare_LIBS}
${OpenSLES_LIBS}
${OBOE_LIBS}
${LIBFLUID_LIBS}
${LIBINSTPATCH_LIBRARIES}
)

>
> Regards,
> Yann E. MORIN.
>
> >       select BR2_PACKAGE_LIBGLIB2
> >       help
> >         FluidSynth is a real-time software synthesizer based on the
> > @@ -115,6 +116,7 @@ config BR2_PACKAGE_FLUIDSYNTH_READLINE
> >
> >  endif # BR2_PACKAGE_FLUIDSYNTH
> >
> > -comment "fluidsynth needs a toolchain w/ threads, wchar"
> > +comment "fluidsynth needs a toolchain w/ threads, wchar, dynamic library"
> >       depends on BR2_USE_MMU
> > -     depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> > +     depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> > +             BR2_STATIC_LIBS
> > --
> > 2.26.2
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

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

end of thread, other threads:[~2020-06-29 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 14:26 [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Fabrice Fontaine
2020-06-28 14:26 ` [Buildroot] [PATCH 2/2] package/mpd: add fluidsynth optional dependency Fabrice Fontaine
2020-06-29 20:50 ` [Buildroot] [PATCH 1/2] package/fluidsynth: needs dynamic library Yann E. MORIN
2020-06-29 21:22   ` Fabrice Fontaine

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.