Skip to contentSkip to conversation

package/minidlna: More fixes to static compile

PATCH New Bernd Kuhls 3 participants 4 messages Jul 29, 2015 – Aug 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/minidlna: More fixes to static compile

libz is needed by libid3tag, fixes
http://autobuild.buildroot.net/results/85e/85e53f2b30f107f486be08549ce6df08953ea499/

libm is needed by libexif, changes

checking for exif_data_new_from_file in -lexif... no checking for exif_data_new_from_file in -lexif... no

from the forementioned autobuilder config.log to

checking for exif_data_new_from_file in -lexif... yes

The pkgconfig file of libvorbis is called vorbis.pc, fix wrong naming. Also we need to link against libsqlite3, so add that lib to the pkgconf call.

---
 package/minidlna/minidlna.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/minidlna/minidlna.mk +2 -2
index ab93484..2f75993 100644
@@ -17,9 +17,9 @@ MINIDLNA_DEPENDENCIES = \
 ifeq ($(BR2_STATIC_LIBS),y)
 # the configure script / Makefile forgets to link with some of the dependent
 # libraries breaking static linking, so help it along
-MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif libvorbis`
+MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif vorbis sqlite3`
 MINIDLNA_STATIC_LIBS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)
-MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS)"
+MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS) -lm -lz"
 else
 MINIDLNA_CONF_OPTS = \
 	--disable-static
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 package/minidlna: More fixes to static compile

Quoted 11 lines · Bernd Kuhls

libz is needed by libid3tag, fixes
http://autobuild.buildroot.net/results/85e/85e53f2b30f107f486be08549c
e6df08953ea499/

libm is needed by libexif, changes

checking for exif_data_new_from_file in -lexif... no checking for exif_data_new_from_file in -lexif... no

from the forementioned autobuilder config.log to

Quoted 8 lines

checking for exif_data_new_from_file in -lexif... yes

The pkgconfig file of libvorbis is called vorbis.pc, fix wrong naming. Also
we need to link against libsqlite3, so add that lib to the pkgconf call.

minidlna successfully compiles in a static build after applying the patch. Tested with the config file from the autobuilder.

#2 lore raw

PATCH 1/1 package/minidlna: More fixes to static compile

In reply to Bernd Kuhls

Bernd,

package/minidlna/minidlna.mk MINIDLNA_DEPENDENCIES = \ · line 22

Quoted 13 lines · Bernd Kuhls
package/minidlna/minidlna.mk +2 -2
index ab93484..2f75993 100644
@@ -17,9 +17,9 @@ MINIDLNA_DEPENDENCIES = \
 ifeq ($(BR2_STATIC_LIBS),y)
 # the configure script / Makefile forgets to link with some of the dependent
 # libraries breaking static linking, so help it along
-MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif libvorbis`
+MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif vorbis sqlite3`
 MINIDLNA_STATIC_LIBS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)
-MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS)"
+MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS) -lm -lz"

Would it be possible to stop hacking this to death? What about instead taking the saner approach of switching minidlna configure.ac to use PKG_CHECK_MODULES(), which will remove a lot of crap from it, and make it work properly for cross-compilation.

Some libraries, such as libid3tag, would also need to install a .pc file, obviously.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 package/minidlna: More fixes to static compile

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 12 lines · Bernd Kuhls

libz is needed by libid3tag, fixes
http://autobuild.buildroot.net/results/85e/85e53f2b30f107f486be08549ce6df08953ea499/

libm is needed by libexif, changes

checking for exif_data_new_from_file in -lexif... no checking for exif_data_new_from_file in -lexif... no

from the forementioned autobuilder config.log to

checking for exif_data_new_from_file in -lexif... yes

Quoted 7 lines

The pkgconfig file of libvorbis is called vorbis.pc, fix wrong naming. Also we need to link against libsqlite3, so add that lib to the pkgconf call.

---
 package/minidlna/minidlna.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

It's now too late for 2015.08. Therefore, could you engage the process of moving minidlna (and its dependencies to use pkg-config), in order to fix this properly? minidlna Git repository seems to be active, so there is a chance of getting such changes merged.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com