All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] live555: fix library installation
@ 2015-04-16 14:50 Luca Ceresoli
  2015-04-19 11:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2015-04-16 14:50 UTC (permalink / raw)
  To: buildroot

The manual target installation commands optionally copies 3 executables
that demonstrate the library usage, but do not the library itself.

This results in the following errors at runtime:

  # openRTSP
  openRTSP: can't load library 'libliveMedia.so.38'
  # live555MediaServer
  live555MediaServer: can't load library 'libliveMedia.so.38'
  # MPEG2TransportStreamIndexer
  MPEG2TransportStreamIndexer: can't load library 'libliveMedia.so.38'
  #

Tested with the following defconfig, which is basically
qemu_arm_versatile_defconfig + C++ + live555:

BR2_arm=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="4.0"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-4.0.config"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_LIVE555=y
BR2_TARGET_ROOTFS_EXT2=y

Fix the whole installation step by using the 'make install' step provided
by the upstream package, similar to what was done in commit
44d15563c706dce48f84 for the staging installation.
After that, we just delete the optional executables that are not selected
in configure.

Note: this change has the effect of installing all the test and demo
executables produced by the live555 compilation process, and that were
previously not copied. This increases the uncompressed target filesystem
size by roughly 300 kB (tested for a 32-bit ARM target).

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Baruch Siach <baruch@tkos.co.il>
---
 package/live555/live555.mk | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/live555/live555.mk b/package/live555/live555.mk
index cbd1e85..f5ff85f 100644
--- a/package/live555/live555.mk
+++ b/package/live555/live555.mk
@@ -44,18 +44,19 @@ define LIVE555_BUILD_CMDS
 	$(MAKE) -C $(@D) all
 endef
 
-LIVE555_FILES_TO_INSTALL-y =
-LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_OPENRTSP) += testProgs/openRTSP
-LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MEDIASERVER) += mediaServer/live555MediaServer
-LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MPEG2_INDEXER) += testProgs/MPEG2TransportStreamIndexer
+LIVE555_FILES_TO_REMOVE += $(if $(BR2_PACKAGE_LIVE555_OPENRTSP),,openRTSP)
+LIVE555_FILES_TO_REMOVE += $(if $(BR2_PACKAGE_LIVE555_MEDIASERVER),,live555MediaServer)
+LIVE555_FILES_TO_REMOVE += $(if $(BR2_PACKAGE_LIVE555_MPEG2_INDEXER),,MPEG2TransportStreamIndexer)
 
 define LIVE555_INSTALL_STAGING_CMDS
 	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install
 endef
 
 define LIVE555_INSTALL_TARGET_CMDS
-	for i in $(LIVE555_FILES_TO_INSTALL-y); do \
-		$(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/bin/`basename $$i` || exit 1; \
+	$(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install
+	for i in $(LIVE555_FILES_TO_REMOVE); do \
+		echo "Removing $$i"; \
+		rm -f $(TARGET_DIR)/usr/bin/`basename $$i`; \
 	done
 endef
 
-- 
1.9.1

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

end of thread, other threads:[~2015-04-20  9:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 14:50 [Buildroot] [PATCH] live555: fix library installation Luca Ceresoli
2015-04-19 11:42 ` Thomas Petazzoni
2015-04-20  8:38   ` Luca Ceresoli
2015-04-20  8:56     ` Thomas Petazzoni
2015-04-20  9:00       ` Luca Ceresoli

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.