NetBSD Problem Report #55977
From www@netbsd.org Fri Feb 5 07:19:51 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2560F1A9217
for <gnats-bugs@gnats.NetBSD.org>; Fri, 5 Feb 2021 07:19:51 +0000 (UTC)
Message-Id: <20210205071949.CB8EE1A9239@mollari.NetBSD.org>
Date: Fri, 5 Feb 2021 07:19:49 +0000 (UTC)
From: aza.sea.agenda@gmail.com
Reply-To: aza.sea.agenda@gmail.com
To: gnats-bugs@NetBSD.org
Subject: net/libcmis fails to build
X-Send-Pr-Version: www-1.0
>Number: 55977
>Category: pkg
>Synopsis: net/libcmis fails to build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 05 07:20:01 +0000 2021
>Originator: Aleksey Arens
>Release: pkgsrc-trunk
>Organization:
>Environment:
NetBSD HOSTNAME_REDACTED 9.99.79 NetBSD 9.99.79 (GENERIC.STAGING.02) #4: Tue Feb 2 22:19:57 UTC 2021 root@HOSTNAME_REDACTED:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
A following error occurs when an attempt to build net/libcmis is made.
---8<---
/usr/include/g++/type_traits:68:3: error: templates must have C++ linkage
template<typename _Tp, _Tp __v>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../inc/libcmis-c/repository.h:32:1: note: extern "C" language linkage specification begins here
extern "C" {
^
In file included from repository.cxx:29:
In file included from ../../inc/libcmis-c/repository.h:35:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/tree.h:1307:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/xmlmemory.h:218:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/threads.h:35:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/globals.h:18:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/parser.h:810:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/libxml2/libxml/encoding.h:31:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/unicode/ucnv.h:53:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/unicode/uenum.h:25:
In file included from /usr/obj/pkgsrc/net/libcmis/work/.buildlink/include/unicode/localpointer.h:45:
In file included from /usr/include/g++/memory:62:
In file included from /usr/include/g++/bits/stl_algobase.h:64:
In file included from /usr/include/g++/bits/stl_pair.h:59:
In file included from /usr/include/g++/bits/move.h:54:
/usr/include/g++/type_traits:84:19: error: no template named 'integral_constant'
constexpr _Tp integral_constant<_Tp, __v>::value;
^
/usr/include/g++/type_traits:87:11: error: no template named 'integral_constant'
typedef integral_constant<bool, true> true_type;
^
/usr/include/g++/type_traits:90:11: error: no template named 'integral_constant'
typedef integral_constant<bool, false> false_type;
^
/usr/include/g++/type_traits:93:29: error: no template named 'integral_constant'
using __bool_constant = integral_constant<bool, __v>;
^
/usr/include/g++/type_traits:103:3: error: templates must have C++ linkage
template<bool, typename, typename>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../inc/libcmis-c/repository.h:32:1: note: extern "C" language linkage specification begins here
extern "C" {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
---8<---
NOTE: The userland is unaltered, and comes from 9.1_STABLE. Only kernel is from -current.
>How-To-Repeat:
cd /usr/pkgsrc/net/libcmis && make
>Fix:
A cursory examination suggests that a header resides in the extern C scope, whereas it
should not. A natural solution is to move header outside of the extern C scope as
follows. With the following patch, a clean compilation obtains.
---8<---
diff --git a/net/libcmis/distinfo b/net/libcmis/distinfo
index 3d3d961e6f7..2a2bd92f6d6 100644
--- a/net/libcmis/distinfo
+++ b/net/libcmis/distinfo
@@ -4,3 +4,4 @@ SHA1 (libcmis-0.5.2.tar.gz) = 26e64cdd9028fa39e76fe7c2cc739ade8a91535f
RMD160 (libcmis-0.5.2.tar.gz) = 647500ebcda8693af90ac92b9a193e41b5e695bc
SHA512 (libcmis-0.5.2.tar.gz) = 3dac0eed31d1dd3ac4670e501e0677196811f7875e6d1c253c8d874d6903691cbe4f1c27c8468af07bfd7f79b0d6ec4f933b28cb3bb37dcbea18bc2dd8f6e374
Size (libcmis-0.5.2.tar.gz) = 808619 bytes
+SHA1 (patch-inc_libcmis-c_repository.h) = 984c637ca22851c92b545c1e4fd17669b3eff816
diff --git a/net/libcmis/patches/patch-inc_libcmis-c_repository.h b/net/libcmis/patches/patch-inc_libcmis-c_repository.h
new file mode 100644
index 00000000000..040c78ef785
--- /dev/null
+++ b/net/libcmis/patches/patch-inc_libcmis-c_repository.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- inc/libcmis-c/repository.h.orig 2021-02-05 06:57:05.353182875 +0000
++++ inc/libcmis-c/repository.h
+@@ -29,10 +29,10 @@
+ #define _REPOSITORY_H_
+
+ #ifdef __cplusplus
++#include <libxml/tree.h>
+ extern "C" {
+ #endif
+
+-#include <libxml/tree.h>
+
+ #include "libcmis-c/libcmis-c-api.h"
+ #include "libcmis-c/types.h"
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.