NetBSD Problem Report #53168

From tsutsui@ceres.dti.ne.jp  Sun Apr  8 06:02:35 2018
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 E42F77A1B6
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  8 Apr 2018 06:02:35 +0000 (UTC)
Message-Id: <201804080602.w3862THt016328@ceres.dti.ne.jp>
Date: Sun, 8 Apr 2018 15:02:29 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: libreoffice 6.0.2.1 build fails on NetBSD/i386 7.1.2
X-Send-Pr-Version: 3.95

>Number:         53168
>Category:       pkg
>Synopsis:       libreoffice 6.0.2.1 build fails on NetBSD/i386 7.1.2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ryoon
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 08 06:05:00 +0000 2018
>Last-Modified:  Fri Jun 22 16:25:00 +0000 2018
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.1.2 + pkgsrc-2018Q1
>Organization:
>Environment:
System: NetBSD 7.1.2
Architecture: i386
Machine: i386
>Description:
On NetBSD/i386 pkgsrc/misc/libreoffice build using pkgsrc-2018Q1 fails:

---
 :

[build C  ] UnpackedTarball/mariadb-connector-c/libmariadb/ma_secure.c
[build DEP] LNK:StaticLibrary/libmariadb-connector-c.a
[build LNK] StaticLibrary/libmariadb-connector-c.a
[build BIN] mariadb-connector-c
[build MOD] mariadb-connector-c
[build OXS] misc_extensions
[build BIN] misc_extensions
[build MOD] misc_extensions
[build UPK] alef-1.001.tar.gz
[build PAT] font_alef
[build PKG] fonts_alef
[build EPK] fonts_alef
[build UPK] amiri-0.109.zip
[build PAT] font_amiri
[build PKG] fonts_amiri
[build EPK] fonts_amiri
[build UPK] 368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
[build PAT] font_caladea
[build PKG] fonts_caladea
[build EPK] fonts_caladea
[build UPK] c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
[build PAT] font_carlito
[build PKG] fonts_carlito
[build EPK] fonts_carlito
[build UPK] culmus-0.131.tar.gz
[build PAT] font_culmus
[build PKG] fonts_culmus
[build EPK] fonts_culmus
[build UPK] 33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip
[build PAT] font_dejavu
[build PKG] fonts_dejavu
[build EPK] fonts_dejavu
[build UPK] 1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip
[build PAT] font_gentium
[build PKG] fonts_gentium
[build EPK] fonts_gentium
[build UPK] ttf-kacst_2.01+mry.tar.gz
[build PAT] font_kacst
[build PKG] fonts_kacst
[build EPK] fonts_kacst
[build UPK] 5c781723a0d9ed6188960defba8e91cf-liberation-fonts-ttf-2.00.1.tar.gz
[build PAT] font_liberation
[build PKG] fonts_liberation
[build EPK] fonts_liberation
[build UPK] 134d8262145fc793c6af494dcace3e71-liberation-fonts-ttf-1.07.4.tar.gz
[build PAT] font_liberation_narrow
[build PKG] fonts_liberation_narrow
[build EPK] fonts_liberation_narrow
[build UPK] e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
[build PAT] font_libertineg
[build PKG] fonts_libertineg
[build EPK] fonts_libertineg
[build UPK] libre-hebrew-1.0.tar.gz
[build PAT] font_libre_hebrew
[build PKG] fonts_libre_hebrew
[build EPK] fonts_libre_hebrew
[build UPK] 907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz
[build PAT] font_sourcecode
[build PKG] fonts_sourcecode
[build EPK] fonts_sourcecode
[build UPK] edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz
[build PAT] font_sourcesans
[build PKG] fonts_sourcesans
[build EPK] fonts_sourcesans
[build UPK] noto-fonts-20171024.tar.gz
[build PAT] font_noto
[build PKG] fonts_noto
[build EPK] fonts_noto
[build UPK] ReemKufi-0.6.tar.gz
[build PAT] font_reem
[build PKG] fonts_reem
[build EPK] fonts_reem
[build UPK] Scheherazade-2.100.zip
[build PAT] font_scheherazade
[build PKG] fonts_scheherazade
[build EPK] fonts_scheherazade
[build UPK] EmojiOneColor-SVGinOT-1.3.tar.gz
[build PAT] font_emojione_color
[build PKG] fonts_emojione_color
[build EPK] fonts_emojione_color
[build BIN] more_fonts
[build MOD] more_fonts
[build UPK] 7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
[build PAT] mysql-connector-cpp
[build CXX] workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp
In file included from /usr/include/g++/cstdint:41:0,
                 from /usr/include/g++/bits/char_traits.h:376,
                 from /usr/include/g++/ios:40,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/config.h:30:21: error: conflicting declaration 'typedef sal_Int32 __int32_t'
 typedef sal_Int32   int32_t;
                     ^
In file included from /usr/include/i386/int_types.h:38:0,
                 from /usr/include/i386/ansi.h:39,
                 from /usr/include/sys/ansi.h:35,
                 from /usr/include/wchar.h:64,
                 from /usr/include/g++/cwchar:44,
                 from /usr/include/g++/bits/postypes.h:40,
                 from /usr/include/g++/iosfwd:40,
                 from /usr/include/g++/ios:38,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/usr/include/sys/common_int_types.h:49:27: error: '__int32_t' has a previous declaration as 'typedef int __int32_t'
 typedef __INT32_TYPE__    __int32_t;
                           ^
In file included from /usr/include/g++/cstdint:41:0,
                 from /usr/include/g++/bits/char_traits.h:376,
                 from /usr/include/g++/ios:40,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/config.h:34:21: error: conflicting declaration 'typedef sal_uInt32 __uint32_t'
 typedef sal_uInt32  uint32_t;
                     ^
In file included from /usr/include/i386/int_types.h:38:0,
                 from /usr/include/i386/ansi.h:39,
                 from /usr/include/sys/ansi.h:35,
                 from /usr/include/wchar.h:64,
                 from /usr/include/g++/cwchar:44,
                 from /usr/include/g++/bits/postypes.h:40,
                 from /usr/include/g++/iosfwd:40,
                 from /usr/include/g++/ios:38,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/usr/include/sys/common_int_types.h:50:27: error: '__uint32_t' has a previous declaration as 'typedef unsigned int __uint32_t'
 typedef __UINT32_TYPE__   __uint32_t;
                           ^
In file included from /usr/include/g++/cstdint:41:0,
                 from /usr/include/g++/bits/char_traits.h:376,
                 from /usr/include/g++/ios:40,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/config.h:30:21: error: conflicting declaration 'typedef sal_Int32 __int32_t'
 typedef sal_Int32   int32_t;
                     ^
In file included from /usr/include/i386/int_types.h:38:0,
                 from /usr/include/i386/ansi.h:39,
                 from /usr/include/sys/ansi.h:35,
                 from /usr/include/wchar.h:64,
                 from /usr/include/g++/cwchar:44,
                 from /usr/include/g++/bits/postypes.h:40,
                 from /usr/include/g++/iosfwd:40,
                 from /usr/include/g++/ios:38,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/usr/include/sys/common_int_types.h:49:27: error: '__int32_t' has a previous declaration as 'typedef int __int32_t'
 typedef __INT32_TYPE__    __int32_t;
                           ^
In file included from /usr/include/g++/cstdint:41:0,
                 from /usr/include/g++/bits/char_traits.h:376,
                 from /usr/include/g++/ios:40,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/config.h:34:21: error: conflicting declaration 'typedef sal_uInt32 __uint32_t'
 typedef sal_uInt32  uint32_t;
                     ^
In file included from /usr/include/i386/int_types.h:38:0,
                 from /usr/include/i386/ansi.h:39,
                 from /usr/include/sys/ansi.h:35,
                 from /usr/include/wchar.h:64,
                 from /usr/include/g++/cwchar:44,
                 from /usr/include/g++/bits/postypes.h:40,
                 from /usr/include/g++/iosfwd:40,
                 from /usr/include/g++/ios:38,
                 from /usr/include/g++/istream:38,
                 from /usr/include/g++/sstream:38,
                 from /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.cpp:27:
/usr/include/sys/common_int_types.h:50:27: error: '__uint32_t' has a previous declaration as 'typedef unsigned int __uint32_t'
 typedef __UINT32_TYPE__   __uint32_t;
                           ^
/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/solenv/gbuild/LinkTarget.mk:337: recipe for target '/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/GenCxxObject/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.o' failed
gmake[1]: *** [/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-6.0.2.1/workdir/GenCxxObject/UnpackedTarball/mysql-connector-cpp/driver/mysql_art_resultset.o] Error 1
Makefile:268: recipe for target 'build' failed
gmake: *** [build] Error 2
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/misc/libreoffice
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/misc/libreoffice

---

Full build failure log (with no MAKE_JOBS) is here:
 https://gist.githubusercontent.com/tsutsui/a076fae7c6329edc7ef25481c9eba90f/raw/5b6ac0c649c57176b9fe0cf52828dff9f8e533a7/pkgsrc_misc_libreoffice.log

libreoffice-6.0.2.1/workdir/UnpackedTarball/mysql-connector-cpp/cppconn/config.h
has the following lines:

---
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <sal/types.h>

#define HAVE_FUNCTION_STRTOL 1
#define HAVE_FUNCTION_STRTOUL 1
#define HAVE_FUNCTION_STRTOL 1
#define HAVE_FUNCTION_STRTOULL 1

#if defined(MACOSX) || defined(__sun) || defined(LINUX) || defined (_MSC_VER)
    #define HAVE_STDINT_H
#ifndef _MSC_VER
    #define HAVE_INTTYPES_H
#endif
#endif

#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif

#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

---

so adding "|| defined (__NetBSD__)" around "HAVE_STDINT_H" works around.
However files under libreoffice-6.0.2.1/workdir/UnpackedTarball are
not extracted before the "do-patch" stage so no idea how to fix it.

Note there is no problem on NetBSD/amd64 7.1.2.

>How-To-Repeat:
cd pkgsrc/misc/libreoffice
make package

>Fix:
Fix upstream tarball, or pull config.h result properly?

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Sun, 08 Apr 2018 09:12:04 +0000
Responsible-Changed-Why:
I will take this.


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53168: libreoffice 6.0.2.1 build fails on NetBSD/i386 7.1.2
Date: Fri, 27 Apr 2018 10:09:52 -0500 (CDT)

 I see this same failure on NetBSD/i386-8.0_RC1 as well.

 Will try on i386-current (8.99.14) soon-ish.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53168: libreoffice 6.0.2.1 build fails on NetBSD/i386 7.1.2
Date: Sat, 5 May 2018 23:03:21 -0500 (CDT)

 On Fri, 27 Apr 2018, John D. Baker wrote:

 > I see this same failure on NetBSD/i386-8.0_RC1 as well.
 > 
 > Will try on i386-current (8.99.14) soon-ish.

 Same failure on i386-current (still 8.99.14 right now).

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53168: libreoffice 6.0.2.1 build fails on NetBSD/i386 7.1.2
Date: Fri, 22 Jun 2018 11:19:58 -0500 (CDT)

 Has there been any development with this PR?  As of libreoffice 6.0.4.2
 in pkgsrc-HEAD, in the looming shadows of the pkgsrc-2018Q2 freeze, this
 problem still occurs.

 I hadn't noticed the workaround when I first saw the PR, but I've applied
 it and my build appears to be proceeding.  I'm building on
 NetBSD/i386-8.0_RC1 (and eventually on -8.99.19).

 Thanks.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.