From patchwork Mon Jan 21 07:27:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 156152 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6070535jaa; Sun, 20 Jan 2019 23:28:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ju05J0gPV7yJ0noE82INt2z2T6Bs4Xuo2Z+IiNuy3g0v/nsgRg8L2lcEbfdVMHhNJdFzA X-Received: by 2002:a17:902:bd46:: with SMTP id b6mr28882334plx.231.1548055684816; Sun, 20 Jan 2019 23:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548055684; cv=none; d=google.com; s=arc-20160816; b=h68fIoYPOfhdplYXGLjIQHVQuRQi/ovz6l0vQhMfakWh4TpVvxr0SrKHL33fJkkhKt 4CcCeYvGwAnpVKie4f1yqEi2X+RjP3SMuYyLsrKelftDOvjNPJFp0rpdqK7+Le5yGg8s /Ht7NuYXUJjcoVUvInKvCbvJFRE44UUrVohx84UTZT+o6Jms2aps1fZIKJ/yx6KISmh5 khR5VFtUa1E7n0bvDDPNVyFPCr0YKV0SQqWi3NblzRQ+/dh+mjKtksGVOVuNRIdg5LYr bNEPeNkAPvNsGHqYIwMox7EBZYhCoFc8qBcT+2/80kZxEFHs3bG1J8aWc+NaxtK3wD1/ tC2w== 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=S7VodlpXoiEDYwAfVyAm6MiPTC+vebpukAL5k+1OFwc=; b=R6wVyUOMCoAkfXVE1nGQiiIEp7QudtC4hJHKCUJxPvvPoo7oOf9VPKakeYcXybk448 pD0yNl2VdDyhVw8iVj1mpNh0dImSPfPZRLXdCaSSHTcNp6TblR1PZUCoTDhBGL45m+Im oHaC1cJB6R6PG8S3SSjTTj5/YQz0ozZCiDLCNvheif+9GLyu3payW4eW0+QlhnXxp4l1 PLfktAbnauqfMn0fslzH6sHYOSWX82ckpGu3EpdxaY6ZUJ40/iKL4bvucpw0g2WCnJKF cHw+O9mVnuX3kM0PEOpxIrbKfTxo9HmGE24LvLpaHlT9Ki1kCgqe3UkBRPnLWYqLsnHU XdWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=NcR4lAIq; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-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 34si5431353pgt.455.2019.01.20.23.28.04; Sun, 20 Jan 2019 23:28:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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=NcR4lAIq; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D158C7BF9E; Mon, 21 Jan 2019 07:27:58 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by mail.openembedded.org (Postfix) with ESMTP id 3DA376B7C2 for ; Mon, 21 Jan 2019 07:27:57 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id z23so9400698plo.0 for ; Sun, 20 Jan 2019 23:27:58 -0800 (PST) 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=9xP8Shq+y0ac/zkhi4gWO1OTsTDM3XGyCzWuoshpVDM=; b=NcR4lAIqkanKm0dXf8Aiy7p4pttXVRUl243+ja1rvuQpdtjmOHSklWGxFogljEli6p uKQAN62rkGagsRhbbJH/YNJonhaW4pljQ7mfgs9p/qAUxPvO6sCDkR0w5/mdPfZFWTPi cIxKEDqutsYjx7RBL3hBtz6tT7b15h7buAqumaPGlSYhKxqmrSqutuqtkp5fXnIBBWbv uDYWYGHU1t7KU40KRkYYZLprDX7r+KmnCi17h2y/z+9niUclfrPW549ex2JEdxnAh3qX If/9TBv4S6wpPonHbH65dPnSsIT0BJkDyqxnLc3eKJHfZXkNz5L3J7u6XL0BJB+wzLK2 gDFw== 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=9xP8Shq+y0ac/zkhi4gWO1OTsTDM3XGyCzWuoshpVDM=; b=NSZLafV0LZHOcIs3na6Dw5VQqRkzJb49Sh5O6s0sqA5a7vTKzpuxV5R0UjNYVjZDYy 7rOaL3i0jRLFYMtlITf6b6N/QGrnc28yzYCZScnrtoVTQwSKKnZ6/IAHPz24RW3ZKkft TczDrM03HoLcLtQne6z+J089W/+tURIIdq4YeFThHBY9pD+5Pto91pmnpRhaWR9pPjdJ fM15VkQ/xJqR4X6UjVHbLtU5OAKGXUwmt4Dk3hpFmEZERRQK54zGk7J1bZoactiiqHmb uQMNaufAktZPtxXFA2LnEld5om+1UycxV++fCrnBI21Lg3tA7stCQ2eIxyqcgp3GQiu2 m97g== X-Gm-Message-State: AJcUukeADvsXc7nqwus+pqvZu44a9B4Yo6yN9PwA8oW8eWJKLxUJkkxj +eQTVieB7K9k43ZOJ6c+ZSxjIvNAyiw= X-Received: by 2002:a17:902:3064:: with SMTP id u91mr28555753plb.325.1548055677766; Sun, 20 Jan 2019 23:27:57 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::b601]) by smtp.gmail.com with ESMTPSA id e16sm15239976pfn.46.2019.01.20.23.27.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 23:27:57 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 20 Jan 2019 23:27:48 -0800 Message-Id: <20190121072749.15424-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/2] db5: Fix build issues found with clang/libc++ X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is a genuine error that is discovered when using libc++ runtime Signed-off-by: Khem Raj --- ...tibility-by-renaming-atomic_init-API.patch | 147 ++++++++++++++++++ meta/recipes-support/db/db_5.3.28.bb | 1 + 2 files changed, 148 insertions(+) create mode 100644 meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch b/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch new file mode 100644 index 0000000000..a4ff2ecb0c --- /dev/null +++ b/meta/recipes-support/db/db/0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch @@ -0,0 +1,147 @@ +From a3569f118fd95b7ad41e1a1128e17c0b8928556d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 20 Jan 2019 18:30:23 -0800 +Subject: [PATCH] Fix libc++ compatibility by renaming atomic_init API + +db5 does not build because it is redefining a C++11 standard +library identifier, atomic_init(). Therefore prefix all +its internal defines with '__db_', to avoid collisions. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/dbinc/atomic.h | 4 ++-- + src/mp/mp_fget.c | 4 ++-- + src/mp/mp_mvcc.c | 4 ++-- + src/mp/mp_region.c | 4 ++-- + src/mutex/mut_method.c | 2 +- + src/mutex/mut_tas.c | 4 ++-- + 6 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index 1b49de5..7bf353c 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define __db_atomic_init(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -206,7 +206,7 @@ static inline int __db_atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ __db_atomic_init(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c +index 16de695..5159520 100644 +--- a/src/mp/mp_fget.c ++++ b/src/mp/mp_fget.c +@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ __db_atomic_init(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, DB_STR("3025", +@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ __db_atomic_init(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c +index 770bad8..dbce4f3 100644 +--- a/src/mp/mp_mvcc.c ++++ b/src/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ __db_atomic_init(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ __db_atomic_init(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c +index 4952030..084f499 100644 +--- a/src/mp/mp_region.c ++++ b/src/mp/mp_region.c +@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ __db_atomic_init(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -302,7 +302,7 @@ no_prealloc: + } else + hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount); + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ __db_atomic_init(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c +index 09353b0..3c954b9 100644 +--- a/src/mutex/mut_method.c ++++ b/src/mutex/mut_method.c +@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ __db_atomic_init(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c +index 106b161..5a3b033 100644 +--- a/src/mutex/mut_tas.c ++++ b/src/mutex/mut_tas.c +@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ __db_atomic_init(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ __db_atomic_init(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); +-- +2.20.1 + diff --git a/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb index b7ed2c798c..46536efe86 100644 --- a/meta/recipes-support/db/db_5.3.28.bb +++ b/meta/recipes-support/db/db_5.3.28.bb @@ -25,6 +25,7 @@ SRC_URI += "file://fix-parallel-build.patch \ file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ file://sequence-type.patch \ + file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \ " # We are not interested in official latest 6.x versions; # let's track what debian is using. From patchwork Mon Jan 21 07:27:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 156153 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6070864jaa; Sun, 20 Jan 2019 23:28:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN46oKk0H3MJwxQ95cM+3Mp27bmgWGbPGnJDK/LSJ018ZSsDgqUYEoMjbcOnPg8F2TsyDe54 X-Received: by 2002:a63:3c58:: with SMTP id i24mr27609026pgn.284.1548055709157; Sun, 20 Jan 2019 23:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548055709; cv=none; d=google.com; s=arc-20160816; b=rWC5EmKx0opEFyu94r1AO8V+vAUgJI/jZjWnBYvb7tqa7yj8eQsZpgjmBEAd60Y3m1 Sg4EYdZYy1ZUOIipTz/WjMUghDSWS29fBniwXyMMZLaPl9UNTIL13BGto3UuVVDT+Vb1 X7zZrKfpxr8dtbkJn3uHVj7B7qM2R4TJRqoMKwD/73s+YkA3ycx792XPrIpirwowGJfF bkLKyaUj071UphBRV9ENVJF0HbiItmzRDydvTt7UqGxArUwEywhvDS2Gv9koK9JZDpv3 c7tECBfNqFcxawsNEvLInf3HUaoDlMjVnAE9a5BFQ5+0QP8MZXdhoPiVBFlM8PeIjmbg BLrQ== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=4UNi7CoocxKZjK+gdKEMVpRhAK48hvIS430bGtVGrDM=; b=I77YLRGh2ZPGDKDKDugARMjMe905Q7WyZpLBCpdEVIJfiCMNzhRggLGssRjn1HLFaL xI957kYMerP8SpGsiDD785jNIdYlGCILanKlUZsbJ367wNuci6y6GmyQYjLWKAx14uyZ YYPgJln36EQKIgrYRoesBUO0Gn5m3bzVQOTT86+MV1PEIMfpxpWo14hJnpW6MY8Q0CKo lXvEAeaHFkP3MrqY8+JyVyvLLh2kiutMIFvby5aHjCyw0wjgrX9y05YqQkCwzPNG6IFF q1b8MLH7nmuMlmo7kt3BuiFgMPv7Uptlk59wXDXDCD+NzLJHX+yPCcvZs/3J0gKNo0+N KbFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nSIYDgZu; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-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 3si12091521pla.240.2019.01.20.23.28.28; Sun, 20 Jan 2019 23:28:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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=nSIYDgZu; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 9B63B7BF9D; Mon, 21 Jan 2019 07:28:26 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by mail.openembedded.org (Postfix) with ESMTP id 982086B7C2 for ; Mon, 21 Jan 2019 07:27:57 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id u18so9383726plq.7 for ; Sun, 20 Jan 2019 23:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lwxm7b7CdDLltLaCR4Lgn7KPDEzolyehNbcf7/5Tzvo=; b=nSIYDgZuvjquFKdfCvduvd8hGVYI5paMf4KvXdwizyRegXX0E9YJViSBstJ3ZiAfUk paGkchBOtLQjGknDnxx8Eexe1Vaz8y30iDROvw1KhA6HNCYDPyVqhl1CUV05tzTHCqRJ Rj+yNJoHpD+rPCELU2YIUpRSgLyo12fyfdFm5e+tSR3f6e+FIBConYHOlmts2U+V/Nsh LFcZD7KSohqugdIEPep6ultsgLKv/D9yGlANoucunj8o7gyGDGqfIiUdFKg6uJ8JyQ2Q yNE5EvZMCIyi/ivXgV8HRGEeBTVDxQxgnpJyDZSAX3xjmpJAw0XBMpHbM4GpmL936hHr XVeg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lwxm7b7CdDLltLaCR4Lgn7KPDEzolyehNbcf7/5Tzvo=; b=jqCiyx05FqP/FYzDY0xJW3Ol+c98lI8EMot6RzgjCEiHlZ6buLH46eii9KStwAzCGa Z1CIypuVPgfYbwoE+WqaV8g3dcNreihRMUw7Tz7d6fCbxhaaEbtKY2WrGHXyjT+Lemfg wzvKGj/X72ACdhbYmwDboi6PO7pcgfy2Q3mNPPnNz1rNki3hBpShYEuZu50QTsctDoNQ rUdTlQk4DJCbNzgtdadPRoVG7PsqQw/T42OCyWepnUuet1QAdewnFzZH38MmGmPVDKxE TqwhQ1FOlsXVqnyFFxq/U0pEvVQZRjY8uamKf8z0lR/JM/oDq93X2j0jpcDZi5d/tsFP nu/w== X-Gm-Message-State: AJcUukfkyJg0IKprmxyCFJ+F+tRicsP3esjiLoIl2x1WEDllrwN+FWnd lvvrxIe0LZojvavQnZNyo6+zA7Obz7o= X-Received: by 2002:a17:902:24d:: with SMTP id 71mr28249001plc.225.1548055678435; Sun, 20 Jan 2019 23:27:58 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::b601]) by smtp.gmail.com with ESMTPSA id e16sm15239976pfn.46.2019.01.20.23.27.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jan 2019 23:27:58 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 20 Jan 2019 23:27:49 -0800 Message-Id: <20190121072749.15424-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121072749.15424-1-raj.khem@gmail.com> References: <20190121072749.15424-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/2] apt: Backport a patch to include std::array definition X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This partial backport helps compiling apt with clang/libc++ Signed-off-by: Khem Raj --- meta/recipes-devtools/apt/apt.inc | 1 + .../0001-Include-array.h-for-std-array.patch | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc index bff59e521a..842c30240b 100644 --- a/meta/recipes-devtools/apt/apt.inc +++ b/meta/recipes-devtools/apt/apt.inc @@ -13,6 +13,7 @@ SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/${BPN}/${P file://disable-test.patch \ file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \ file://0001-apt-1.2.12-Fix-musl-build.patch \ + file://0001-Include-array.h-for-std-array.patch \ " SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0" SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598" diff --git a/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch new file mode 100644 index 0000000000..e4a8faa2b4 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-Include-array.h-for-std-array.patch @@ -0,0 +1,35 @@ +From 4d64ec843185bf6fd1b85c3a6a4c4e3c968c8ab1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 20 Jan 2019 18:56:58 -0800 +Subject: [PATCH] Include for std::array + +When compiling using clang/libc++ it fails to build because this header +is not included, with libstdc++ this seems to be pulled in +automatically. + +Fixes below error + +apt-pkg/contrib/strutl.cc:949:38: error: implicit instantiation of undefined template 'std::__1::array' + std::array c_weekdays = {{ "sun", "mon", "tue", "wed", "thu", "fri", "sat" }}; + +Signed-off-by: Khem Raj +Upstream-Status: Backport [https://github.com/Debian/apt/commit/24a59c62efafbdb8387b2d3c5616b04b9fd21306] +--- + apt-pkg/contrib/strutl.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc +index 60d0ca8..c2bfcbc 100644 +--- a/apt-pkg/contrib/strutl.cc ++++ b/apt-pkg/contrib/strutl.cc +@@ -21,6 +21,7 @@ + #include + #include + ++#include + #include + #include + #include +-- +2.20.1 +