From patchwork Thu Nov 15 19:28:45 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: 998521 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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wryf6GK1z9s9h for ; Fri, 16 Nov 2018 06:29:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DDC38882F6; Thu, 15 Nov 2018 19:29:11 +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 mZCc-3wLqlYO; Thu, 15 Nov 2018 19:29:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 3C808882D1; Thu, 15 Nov 2018 19:29:10 +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 188981C2320 for ; Thu, 15 Nov 2018 19:29:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 12FEA87B65 for ; Thu, 15 Nov 2018 19:29:08 +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 J7ALLbmNxkCY for ; Thu, 15 Nov 2018 19:29: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 whitealder.osuosl.org (Postfix) with ESMTPS id 6D6458831A for ; Thu, 15 Nov 2018 19:29:06 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 3257B2400E6 for ; Thu, 15 Nov 2018 20:29:03 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42wryP5mYzz9rxN for ; Thu, 15 Nov 2018 20:29:01 +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 O-SbE1-Jns75; Thu, 15 Nov 2018 20:29:00 +0100 (CET) Received: from nzxt.fritz.box (port-92-195-14-125.dynamic.qsc.de [92.195.14.125]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 15 Nov 2018 20:29:00 +0100 (CET) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Thu, 15 Nov 2018 20:28:45 +0100 Message-Id: <20181115192846.18380-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/luv: add patch to fix build issue with luvi 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" Add a patch to fix a build issue with luvi after bumping luv from version 1.9.1 to 1.22.0. The problem is that luv now uses lua-compat-5.3 instead of defining the Lua 5.3 API itself. Unfortunately, luv.h now includes compat-5.3.h in the header file, which causes the build issue with luvi, as luvi does not find this local header file. Note, that luv ships lua-compat-5.3 as a dependency. Therefore, the patch includes compat-5.3.h in the source file luv.c, so it isn't exposed to external programs. Fixes: http://autobuild.buildroot.net/results/2244cd30986aff29b763fb7183f6fc27a82bd7fa http://autobuild.buildroot.net/results/01938f7f018dc69d564c22489933647b1daf62f3 http://autobuild.buildroot.net/results/8217e863c2776d299cb90b90f1a2ed8233ec82ba .. and many more Note, that fixing this issue reveals another issue in luvi, which is fixed by the follow up patch. Signed-off-by: Jörg Krause --- ...lude-compat-5.3.h-in-luv-header-file.patch | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/luv/0001-Do-not-include-compat-5.3.h-in-luv-header-file.patch diff --git a/package/luv/0001-Do-not-include-compat-5.3.h-in-luv-header-file.patch b/package/luv/0001-Do-not-include-compat-5.3.h-in-luv-header-file.patch new file mode 100644 index 0000000000..22428c98f7 --- /dev/null +++ b/package/luv/0001-Do-not-include-compat-5.3.h-in-luv-header-file.patch @@ -0,0 +1,62 @@ +From 0b541b828142dab6c23b0f4415dd2fd052d69ff1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Wed, 31 Oct 2018 18:14:18 +0100 +Subject: [PATCH] Do not include compat-5.3.h in luv header file +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Do not include compat-5.3.h in luv header file + +Exposing the compat-5.3.h header file directly in the luv.h header file +is not a good idea, because it causes redefinition errors when building, +for example latest luvi version 2.8.0, with a shared luv library and +LuaJIT 2.0.5. + +Therefore, include the compat header file in the luv.c source file. + +Note, that luvi version 2.8.0 (and 2.7.6) still fails to build against the +shared luv library using LuaJIT 2.0.5, as it does use `luaL_newlib` which is +not available in Lua 5.1. However, this is unrelated to the luv library as +luvi itself should define the macro for Lua 5.1. + +Upstream status: https://github.com/luvit/luv/pull/310 + +Signed-off-by: Jörg Krause +--- + src/luv.c | 3 +++ + src/luv.h | 4 ---- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/luv.c b/src/luv.c +index c4c7cb7..4af7582 100644 +--- a/src/luv.c ++++ b/src/luv.c +@@ -15,6 +15,9 @@ + * + */ + ++#if (LUA_VERSION_NUM != 503) ++#include "c-api/compat-5.3.h" ++#endif + #include "luv.h" + #include "util.c" + #include "lhandle.c" +diff --git a/src/luv.h b/src/luv.h +index 27c8c94..4fedd3f 100644 +--- a/src/luv.h ++++ b/src/luv.h +@@ -50,10 +50,6 @@ + #define MAX_TITLE_LENGTH (8192) + #endif + +-#if (LUA_VERSION_NUM != 503) +-#include "c-api/compat-5.3.h" +-#endif +- + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-function" +-- +2.19.1 + From patchwork Thu Nov 15 19:28:46 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: 998522 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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wryf6GHKz9s9G for ; Fri, 16 Nov 2018 06:29:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E452E88739; Thu, 15 Nov 2018 19:29:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HIByJXxPZQOd; Thu, 15 Nov 2018 19:29:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BC158871F; Thu, 15 Nov 2018 19:29:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 764BC1C2320 for ; Thu, 15 Nov 2018 19:29:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 739212376E for ; Thu, 15 Nov 2018 19:29:07 +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 d3XKeN9wn3te for ; Thu, 15 Nov 2018 19:29:06 +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 silver.osuosl.org (Postfix) with ESMTPS id 5F16323771 for ; Thu, 15 Nov 2018 19:29:06 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 3235B2400E5 for ; Thu, 15 Nov 2018 20:29:03 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42wryP5mYWz9rxM for ; Thu, 15 Nov 2018 20:29:01 +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 uoZZU1BWtEn4; Thu, 15 Nov 2018 20:29:00 +0100 (CET) Received: from nzxt.fritz.box (port-92-195-14-125.dynamic.qsc.de [92.195.14.125]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 15 Nov 2018 20:29:00 +0100 (CET) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Thu, 15 Nov 2018 20:28:46 +0100 Message-Id: <20181115192846.18380-2-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115192846.18380-1-joerg.krause@embedded.rocks> References: <20181115192846.18380-1-joerg.krause@embedded.rocks> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/luvi: add patch to fix build issue 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" Since bumping luv from version 1.9.1 to 1.22.0, building luvi fails, as "luv.h" now includes "compat-5.3.h", which is locally shipped as a dependency to lua-compat-5.3. Fixing the issue reveals, that luvi is using `luaL_newlib` which is not available in the Lua 5.1 API. Building luvi with luv 1.9.1 was not an issue before, because luv 1.9.1 defined `luaL_newlib` in luv.h, which was removed in 1.22.0 in favour of using lua-compat-5.3. Therefore, add a patch which defines `luaL_newlib` in luvi.h. Signed-off-by: Jörg Krause --- ...g-define-for-luaL_newlib-for-Lua-5.1.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/luvi/0001-Add-missing-define-for-luaL_newlib-for-Lua-5.1.patch diff --git a/package/luvi/0001-Add-missing-define-for-luaL_newlib-for-Lua-5.1.patch b/package/luvi/0001-Add-missing-define-for-luaL_newlib-for-Lua-5.1.patch new file mode 100644 index 0000000000..903b9d6a69 --- /dev/null +++ b/package/luvi/0001-Add-missing-define-for-luaL_newlib-for-Lua-5.1.patch @@ -0,0 +1,61 @@ +From 7f9fcbd827295df72b15466fd3c47589d52117b9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Wed, 31 Oct 2018 18:22:31 +0100 +Subject: [PATCH] Add missing define for luaL_newlib for Lua 5.1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Since commit c286f3b741d0968fd1c49c28da83bc723468ecba, which bumped the +library luv to version 1.22.0-1, building luvi fails. + +The reason for this error is, that instead of defining Lua 5.3 API itself, +luv now [1] uses lua-compat-5.3 [1,2] for providing a Lua 5.3 API. + +Unfortunately, upstreams "luv.h" now exposes "compat-5.3.h" directly, causing +redefinition errors when building luvi 2.7.6 (as well as latest release 2.8.0) +with luv 1.22.0-1. Instead, "compat-5.3.h" should only be included in "luv.c", +which is addressed in patching luv (Patch: "Do not include compat-5.3.h in luv +header file"). + +Patching luv reveals an issue in luvi itself, as it is using the Lua 5.3 API, +without defining the Lua 5.3 itself, nor using lua-compat-5.3. Instead, it was +using the definition provided by the "luv.h" file in luv versions before 1.22.0. + +Correctly, luvi should define the necessary Lua 5.3 itself, which is done by +this patch, by providing a definition for `luaL_newlib`. + +Note, that this patch is not upstreamable, as upstream already switched to +using lua-compat-5.3 [3,4]. However, backporting this patch set is to much of a +burden, so we keep it simple, by just defining `luaL_newlib`. + +[1] https://github.com/luvit/luv/commit/34ada3e1d75796d2295ec54f3f20b3e2abf93406 +[2] https://github.com/keplerproject/lua-compat-5.3 +[3] https://github.com/luvit/luvi/commit/3a444d183d2fde91b6c2f3798b37881cdaa29691 +[4] https://github.com/luvit/luvi/commit/0376894bae7c1c3bee42ddad65e824da9cccdada + +Signed-off-by: Jörg Krause +--- + src/luvi.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/luvi.h b/src/luvi.h +index e7558b3..ceca2b9 100644 +--- a/src/luvi.h ++++ b/src/luvi.h +@@ -52,6 +52,12 @@ int luaopen_lpeg(lua_State* L); + #endif + #endif + ++#if LUA_VERSION_NUM < 502 ++#ifndef luaL_newlib ++# define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l)) ++#endif ++#endif ++ + #if (LUA_VERSION_NUM >= 502) + # undef luaL_register + # define luaL_register(L,n,f) \ +-- +2.19.1 +