From patchwork Mon Jul 31 21:17:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 795957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="fF5sjJBp"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xLskL2Jcrz9sN7 for ; Tue, 1 Aug 2017 07:18:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 351E087820; Mon, 31 Jul 2017 21:18:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jVplObWHGKYC; Mon, 31 Jul 2017 21:18:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6DCF386E70; Mon, 31 Jul 2017 21:18:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0FCDF1BFD86 for ; Mon, 31 Jul 2017 21:18:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 08CB5876B7 for ; Mon, 31 Jul 2017 21:18:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 84KIkLYy_iN3 for ; Mon, 31 Jul 2017 21:18:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 661DB86E70 for ; Mon, 31 Jul 2017 21:18:07 +0000 (UTC) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3xLsk358Hjzyrx for ; Mon, 31 Jul 2017 23:18:03 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1501535882; x=1502140683; bh=T9xwn27oXH416A8D8DXBMqBzJtmKx0A8IGJBNlpI4JI=; b=fF5sjJBpRoFR ggdqtr8G2JK9prhRIZASigmIlRdd2c0wT0kkH3DOTCX3fOgLZsJy7Xe6vEfHhcHv bG8Bxkwc4xlL/+YdjUaFOKrPGm0gCCA5k69F/QFE22DEjpT0NfeJtowvvlx9aIji 5U6Kt16SEJU7GC3BTL+qJL21OHcRnGXQboHEzObyqzuESiBkXulE7qQGlEjNEraJ geaDG4DJ/mvoLmsOlRlY99hCRiMyBDlE3qisk7dVfCRljhNwMie5LvMOtgtRNsbA gMIYh5NIkdEOT7LiiLQqpOnthWaotiwLVvjrXPcKfoaG+WrHTYeek/IgzKKmMX4j elAHHzYYOw== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Bh2J2Ozt56YN; Mon, 31 Jul 2017 23:18:02 +0200 (CEST) Received: from nzxt.fritz.box (port-92-195-37-105.dynamic.qsc.de [92.195.37.105]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Mon, 31 Jul 2017 23:18:02 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Mon, 31 Jul 2017 23:17:59 +0200 Message-Id: <20170731211800.5888-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.13.3 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] lua: fix pkg-config file 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When Lua is linked with additional libraries, these libraries should go into the pkg-config file as well. Otherwise, linking swupdate with the lua library fails: ``` /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlopen' /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlclose' /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlerror' /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlsym' ``` Signed-off-by: Jörg Krause --- package/lua/5.2.4/0004-lua-pc.patch | 4 +++- package/lua/5.3.4/0004-lua-pc.patch | 4 +++- package/lua/lua.mk | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package/lua/5.2.4/0004-lua-pc.patch b/package/lua/5.2.4/0004-lua-pc.patch index 62acb201f2..31ff61157a 100644 --- a/package/lua/5.2.4/0004-lua-pc.patch +++ b/package/lua/5.2.4/0004-lua-pc.patch @@ -1,6 +1,8 @@ add lua.pc Signed-off-by: Francois Perrad +[Jörg Krause: add @MYLIBS@] +Signed-off-by: Jörg Krause Index: b/etc/lua.pc =================================================================== @@ -34,7 +36,7 @@ Index: b/etc/lua.pc +Description: An Extensible Extension Language +Version: ${R} +Requires: -+Libs: -L${libdir} -llua -lm ++Libs: -L${libdir} -llua -lm @MYLIBS@ +Cflags: -I${includedir} + +# (end of lua.pc) diff --git a/package/lua/5.3.4/0004-lua-pc.patch b/package/lua/5.3.4/0004-lua-pc.patch index 615a7db8fc..11258329d1 100644 --- a/package/lua/5.3.4/0004-lua-pc.patch +++ b/package/lua/5.3.4/0004-lua-pc.patch @@ -1,6 +1,8 @@ add lua.pc Signed-off-by: Francois Perrad +[Jörg Krause: add @MYLIBS@] +Signed-off-by: Jörg Krause Index: b/etc/lua.pc =================================================================== @@ -34,7 +36,7 @@ Index: b/etc/lua.pc +Description: An Extensible Extension Language +Version: ${R} +Requires: -+Libs: -L${libdir} -llua -lm ++Libs: -L${libdir} -llua -lm @MYLIBS@ +Cflags: -I${includedir} + +# (end of lua.pc) diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 93339ad9ce..0692c53764 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -86,8 +86,8 @@ endef define LUA_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) INSTALL_TOP="$(STAGING_DIR)/usr" -C $(@D) install - $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ - $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc + sed -e "s/@MYLIBS@/$(LUA_MYLIBS)/g" $(@D)/etc/lua.pc \ + > $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc endef define LUA_INSTALL_TARGET_CMDS @@ -96,8 +96,8 @@ endef define HOST_LUA_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) INSTALL_TOP="$(HOST_DIR)" -C $(@D) install - $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ - $(HOST_DIR)/lib/pkgconfig/lua.pc + sed -e "s/@MYLIBS@/$(HOST_LUA_MYLIBS)/g" $(@D)/etc/lua.pc \ + > $(HOST_DIR)/lib/pkgconfig/lua.pc endef $(eval $(generic-package))