From patchwork Tue Sep 24 01:33:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 174242 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3524773ill; Mon, 23 Sep 2019 18:33:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2UQ3sxL8AHHRzqBloKd8DZ5tqfAOga+HisqDkBZO40DKh/Bjhm8inNpeaa0GImv28f13e X-Received: by 2002:a62:82c8:: with SMTP id w191mr368043pfd.99.1569288832688; Mon, 23 Sep 2019 18:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569288832; cv=none; d=google.com; s=arc-20160816; b=zh+CQos5V3yH7Tlnb3QbmQhgkRl4JMOzz4Q/+u1NhuxxQeZ1F96urUHBSTsghQrBrQ UeZjN+cUw01GyGOFe8FghfF/T8nF4W3OjwM+/iVrkhTHVeZRQdC/LLQkrG0/FnpSnj/Q i+aocvAjMe+D+ejfBaub1jZn/F+8jThk/wZ4AatakTpGQsMX4QCzXUxpDWPQPn7JKiPn oEalSJ+vYeJDn+jYDWozT5VK5Jvvsu1434BIvgLKALJG+f0QkRZ7LyEcchBCktMojkTv G61xxQZdi4nntd5RFEfL9DLH6Yj0kBCZ/Eq+b8wPAVZhONqML8RxZ/ozevlO/B9EHt54 cxmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=sv+ulvo8U1pPtqpELgFH2MPThH3noDUHrnFJb63+KWU=; b=vod9QZLu5VJlmuentDBviGP3GXebOmLYq5ijf32p5gewGuyuO4iDq9Xx5L3d4d8FBH jQD3/RbPu05/2vvawv4WI6W4gIYSgEcQCOiOS0Zm0/3py8rDiOR1LjlRc8Rgu/6Y0cre kHYCIeBwqauqFz5aHSQNZkHcHSV1cv4dhL8YpnXvoR1+p4Do0o26FFDxn4zdhp8q08dl mDfanK0LJppcM4HtW7qIpdAZXgfc2wHhASh+PAXAcAG4KoPjxNiZ7AJ8f8P6tZqsv1RH i6q/cpN7JLrizrb+wZesMWI55JChmVGy41y0SCYgeZvPtD6czc5l6OARKd66vEN0CXG1 7iRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TCNPNjya; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 31si195302pgo.331.2019.09.23.18.33.51; Mon, 23 Sep 2019 18:33:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TCNPNjya; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 4F4447DE87; Tue, 24 Sep 2019 01:33:44 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by mail.openembedded.org (Postfix) with ESMTP id 5AC836D7C1 for ; Tue, 24 Sep 2019 01:33:42 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id f19so191535plr.3 for ; Mon, 23 Sep 2019 18:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IlZtgga+S6RjMhnTV61i8sIPOwVETf6NGIFE4ExOOTM=; b=TCNPNjyaILFCiwqAwLq6s1N5GbpyN4fe4nXmrjJ+SxkV/YyqsDSLlCxBD7N/3qVWE3 fnE/0oDCB5FoUFQAG3QkAPrRfaJ3TTR5OV/06V9fm3E7ShaL6n+Q3q38QFpH7oGz4U6P JG4n023nlC63og67nMs8nflbCmEt/tdNnPNYLpwOTKBB/1fwuUBxL89Gf1wfprzg3BV2 gVwp4AiaQznAx0S0QuUgrq25HgqA+ab6bxyJaFWaR6BuK+6iCTY/cSl/WRRvvMruhvvc KpS13dnt1DHsRlHdlwXsvQotEGNdaqj82YHsyXxZ9g6DdA3a6GUEmNitbU87CWHHj/2R TjfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IlZtgga+S6RjMhnTV61i8sIPOwVETf6NGIFE4ExOOTM=; b=d9fHS91EihsVtdu4bsUF5cT2FquR732vaDMNa83n4xxjx69kXKhEuew+8tV+AZ+e0t AE+YoyP4AF09ycm0hoc9AmZxNUwczWloyX1M2t4qKy5K+1TQ+1Zn7iHwylc3SrmD0S6f XI9kptXUbR1TicoJWnNzxiJvmSEGdH+IsVQ8tGzqvYwm8LOj5FKql/z8EEBoFJexmX4/ ZbPJhAShZAtLEl878WQ1YvqfqZl/QPnEqGmECPCDAVyNFd+oQuSgRMua71E25Qdgbyuy ijIZk9B0TJXYNuzYduygEpgvT8KtiX863JxJDA8qdRtKu8TOGdBO71iq9+wt2sODFERk 3NIA== X-Gm-Message-State: APjAAAWKnMICrUFooqbd2E5kmfFOq/z/bD3VoNmryyxTTVe1jhSx8/Pt SgDlFkG4AiVI7ZAGBV0fw9na4hfPCaw= X-Received: by 2002:a17:902:bb84:: with SMTP id m4mr463914pls.10.1569288822656; Mon, 23 Sep 2019 18:33:42 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id o9sm49688pfp.67.2019.09.23.18.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 18:33:42 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Mon, 23 Sep 2019 18:33:32 -0700 Message-Id: <20190924013332.2305173-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH] mongodb: Fix build on musl/aarch64 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org one impl of strerror_r is glibc specific, therefore check for __GLIBC__ also before using it Signed-off-by: Khem Raj --- ...rror_r-implementation-glibc-specific.patch | 31 +++++++++++++++++++ .../mongodb/0003-fix-musl-strerror_r.patch | 30 ------------------ meta-oe/recipes-dbs/mongodb/mongodb_git.bb | 2 +- 3 files changed, 32 insertions(+), 31 deletions(-) create mode 100644 meta-oe/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch delete mode 100644 meta-oe/recipes-dbs/mongodb/mongodb/0003-fix-musl-strerror_r.patch -- 2.23.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch new file mode 100644 index 0000000000..5337fcdbfd --- /dev/null +++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch @@ -0,0 +1,31 @@ +From ca004968b8d2149f72d4edcfe029489a8c5e10ca Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 23 Sep 2019 12:31:31 -0700 +Subject: [PATCH] Mark one of strerror_r implementation glibc specific + +glibc has two incompatible strerror_r definitions, one of them is +specific to glibc, mark this one so + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/mongo/util/errno_util.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mongo/util/errno_util.cpp b/src/mongo/util/errno_util.cpp +index 564c0071ea..4f7e1d3a38 100644 +--- a/src/mongo/util/errno_util.cpp ++++ b/src/mongo/util/errno_util.cpp +@@ -61,7 +61,7 @@ std::string errnoWithDescription(int errNumber) { + char buf[kBuflen]; + char* msg{nullptr}; + +-#if defined(__GNUC__) && defined(_GNU_SOURCE) && \ ++#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__) && \ + (!defined(__ANDROID_API__) || !(__ANDROID_API__ <= 22)) && !defined(EMSCRIPTEN) + msg = strerror_r(errNumber, buf, kBuflen); + #elif defined(_WIN32) +-- +2.23.0 + diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0003-fix-musl-strerror_r.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0003-fix-musl-strerror_r.patch deleted file mode 100644 index c6035894ed..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0003-fix-musl-strerror_r.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: git/src/mongo/util/errno_util.cpp -=================================================================== ---- git.orig/src/mongo/util/errno_util.cpp -+++ git/src/mongo/util/errno_util.cpp -@@ -49,6 +49,16 @@ const char kUnknownMsg[] = "Unknown erro - const int kBuflen = 256; // strerror strings in non-English locales can be large. - } // namespace - -+inline char const * strerror_r_helper( char const * r, char const * ) -+{ -+ return r; -+} -+ -+inline char const * strerror_r_helper( int r, char const * buffer ) -+{ -+ return r == 0? buffer: "Unknown error"; -+} -+ - std::string errnoWithDescription(int errNumber) { - #if defined(_WIN32) - if (errNumber == -1) -@@ -63,7 +73,7 @@ std::string errnoWithDescription(int err - - #if defined(__GNUC__) && defined(_GNU_SOURCE) && \ - (!defined(__ANDROID_API__) || !(__ANDROID_API__ <= 22)) && !defined(EMSCRIPTEN) -- msg = strerror_r(errNumber, buf, kBuflen); -+ msg = strerror_r_helper(strerror_r(errNumber, buf, kBuflen)); - #elif defined(_WIN32) - - LPWSTR errorText = nullptr; diff --git a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb index d3c19d6c4c..3e77ac32f3 100644 --- a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb @@ -25,8 +25,8 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \ file://0003-Fix-unknown-prefix-env.patch \ " SRC_URI_append_libc-musl ="\ + file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ file://0002-Fix-default-stack-size-to-256K.patch \ - file://0003-fix-musl-strerror_r.patch \ file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ "