From patchwork Thu Apr 16 14:50:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 461791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 0F1831402D6 for ; Fri, 17 Apr 2015 00:51:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 68BEF9280A; Thu, 16 Apr 2015 14:51:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KdAy0IzE8EPX; Thu, 16 Apr 2015 14:51:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id F17CC92803; Thu, 16 Apr 2015 14:51:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3BBA81C1EF7 for ; Thu, 16 Apr 2015 14:51:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 09DCF33BF7 for ; Thu, 16 Apr 2015 14:51:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SqWzhALghZZv for ; Thu, 16 Apr 2015 14:51:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from srv-hp10.netsons.net (unknown [94.141.22.72]) by silver.osuosl.org (Postfix) with ESMTPS id C91B131E01 for ; Thu, 16 Apr 2015 14:51:09 +0000 (UTC) Received: from host178-184-static.31-195-b.business.telecomitalia.it ([195.31.184.178]:37802 helo=wallace.comelit.it) by srv-hp10.netsons.net with esmtpa (Exim 4.85) (envelope-from ) id 1Yil8D-003dX5-M0; Thu, 16 Apr 2015 16:51:05 +0200 From: Luca Ceresoli To: buildroot@uclibc.org Date: Thu, 16 Apr 2015 16:50:50 +0200 Message-Id: <1429195850-4884-1-git-send-email-luca@lucaceresoli.net> X-Mailer: git-send-email 1.9.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - srv-hp10.netsons.net X-AntiAbuse: Original Domain - uclibc.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: srv-hp10.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: Cc: Luca Ceresoli Subject: [Buildroot] [PATCH] live555: fix library installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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 Cc: Baruch Siach --- 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