From patchwork Fri Dec 14 06:36:07 2018 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: 1013360 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (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; dmarc=none (p=none dis=none) header.from=embedded.rocks Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43GLRV1374z9sB5 for ; Fri, 14 Dec 2018 17:36:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3A293850E0; Fri, 14 Dec 2018 06:36:19 +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 0644Vq_1vSLg; Fri, 14 Dec 2018 06:36:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 742538511F; Fri, 14 Dec 2018 06:36:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2BFE41C1FDB for ; Fri, 14 Dec 2018 06:36:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2712F85B4A for ; Fri, 14 Dec 2018 06:36:17 +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 SOSNZW0CCVgm for ; Fri, 14 Dec 2018 06:36:16 +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 whitealder.osuosl.org (Postfix) with ESMTPS id BB02385B48 for ; Fri, 14 Dec 2018 06:36:15 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 04D4C2400E6 for ; Fri, 14 Dec 2018 07:36:12 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 43GLRJ0gHLz9rxQ for ; Fri, 14 Dec 2018 07:36:11 +0100 (CET) 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 UWKWBOZXaXeg; Fri, 14 Dec 2018 07:36:10 +0100 (CET) Received: from nzxt.fritz.box (port-92-195-50-179.dynamic.qsc.de [92.195.50.179]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Fri, 14 Dec 2018 07:36:10 +0100 (CET) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Fri, 14 Dec 2018 07:36:07 +0100 Message-Id: <20181214063607.8372-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+ X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 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" luvi fails to run when it was build with CMake 3.12+: ``` [string "return require('init')(...)"]:1: module 'init' not found: no field package.preload['init'] no file './init.lua' no file '/usr/share/luajit-2.0.5/init.lua' no file '/usr/local/share/lua/5.1/init.lua' no file '/usr/local/share/lua/5.1/init/init.lua' no file '/usr/share/lua/5.1/init.lua' no file '/usr/share/lua/5.1/init/init.lua' no file './init.so' no file '/usr/local/lib/lua/5.1/init.so' no file '/usr/lib/lua/5.1/init.so' no file '/usr/local/lib/lua/5.1/loadall.so' ``` Looking at link.txt for the luvi executable shows that `-rdynamic` is not set anymore in CMake 3.12. This has the effect, that symbols are missing in the `.dynsym` section in the binary. The patch, sets `ENABLE_EXPORTS` to true in CMakeLists.txt to force setting `-rdynamic` explicitly. Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe Signed-off-by: Jörg Krause --- ...i-executable-needs-to-export-symbols.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 package/luvi/0002-luvi-executable-needs-to-export-symbols.patch diff --git a/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch b/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch new file mode 100644 index 0000000000..74b6537f9b --- /dev/null +++ b/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch @@ -0,0 +1,53 @@ +From 1ea2c1e372ab59b9a633a51f0dcefc24328528f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 10 Sep 2018 08:18:38 +0200 +Subject: [PATCH] luvi executable needs to export symbols +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Using CMake 3.12 running luvi fails with: + +``` +[string "return require('init')(...)"]:1: module 'init' not found: + no field package.preload['init'] + no file './init.lua' + no file '/usr/share/luajit-2.0.5/init.lua' + no file '/usr/local/share/lua/5.1/init.lua' + no file '/usr/local/share/lua/5.1/init/init.lua' + no file '/usr/share/lua/5.1/init.lua' + no file '/usr/share/lua/5.1/init/init.lua' + no file './init.so' + no file '/usr/local/lib/lua/5.1/init.so' + no file '/usr/lib/lua/5.1/init.so' + no file '/usr/local/lib/lua/5.1/loadall.so' +``` + +Looking at link.txt for the luvi executable shows that `-rdynamic` is +not set anymore in CMake 3.12. This has the effect, that symbols are +missing in the `.dynsym` section. + +Therefore, set `ENABLE_EXPORTS` to true which set `-rdynamic` explicitly. + +Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe + +Signed-off-by: Jörg Krause +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e141f8e..8219d0b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -158,6 +158,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + endif() + + target_link_libraries(luvi ${LUVI_LIBRARIES} ${EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT}) ++set_target_properties(luvi PROPERTIES ENABLE_EXPORTS ON) + + ############################################################################### + ## Installation Targets +-- +2.19.1 +