NetBSD Problem Report #56440
From tsutsui@ceres.dti.ne.jp Tue Oct 5 14:47:26 2021
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 C83301A921F
for <gnats-bugs@gnats.NetBSD.org>; Tue, 5 Oct 2021 14:47:26 +0000 (UTC)
Message-Id: <202110051447.195ElIbl012963@ceres.dti.ne.jp>
Date: Tue, 5 Oct 2021 23:47:18 +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: pkgsrc/misc/libreoffice build failure on NetBSD/i386 with OBJMACHINE
X-Send-Pr-Version: 3.95
>Number: 56440
>Category: pkg
>Synopsis: pkgsrc/misc/libreoffice build failure on NetBSD/i386 with OBJMACHINE
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 05 14:50:00 +0000 2021
>Closed-Date: Fri Dec 10 19:01:19 +0000 2021
>Last-Modified: Fri Dec 10 19:05:01 +0000 2021
>Originator: Izumi Tsutsui
>Release: NetBSD 9.2 + pkgsrc-2021Q3
>Organization:
>Environment:
System: NetBSD optiplex 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
On NetBSD/i386 9.2 with the following mk.conf lines
---
USR_OBJMACHINE=yes
OBJMACHINE=yes
MKHOSTOBJ=yes
---
building pkgsrc/misc/libreoffice fails:
---
[build CXX] external/skia/source/skia_compiler.cxx
<command-line>:0:23: fatal error: /s/obj.1/pkgsrc/misc/libreoffice/work.1/libreoffice-7.2.0.4/config_host/config_skia.h: No such file or directory
compilation terminated.
gmake[1]: *** [/s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-7.2.0.4/solenv/gbuild/LinkTarget.mk:301: /s/obj.i386/pkgsrc/misc/libreoffice/work.i386/libreoffice-7.2.0.4/workdir/CxxObject/external/skia/source/SkMemory_malloc.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
:
---
It looks 'obj.i386' and 'work.i386' in WRKSRC for the config_skia.h path
are unintentionally replaced due to compilers -Di386 predefines.
This looks to come from ibreoffice-7.2.0.4/RepositoryExternal.mk:
---
$(call gb_LinkTarget_use_libraries,$(1),skia)
$(call gb_LinkTarget_add_defs,$(1),\
-DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
-DSKIA_DLL \
)
endef
---
>How-To-Repeat:
See above.
>Fix:
The following kludge works around here.
---
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/libreoffice/Makefile,v
retrieving revision 1.269
diff -u -p -r1.269 Makefile
--- Makefile 22 Aug 2021 02:41:50 -0000 1.269
+++ Makefile 5 Oct 2021 14:35:29 -0000
@@ -262,6 +262,13 @@ MAKE_ENV+= SHELL=${BASH}
BUILD_MAKE_FLAGS+= VERBOSE=true
#BUILD_MAKE_FLAGS+= GMAKE_OPTIONS+=-p
+.if ${MACHINE_ARCH} == "i386"
+# XXX: avoid unexpected substitution in the include path
+# (work.i386 -> work.1) when ${OBJMACHINE} is set
+# <command-line>:0:23: fatal error: /usr/obj.1/pkgsrc/misc/libreoffice/work.1/libreoffice-7.2.0.4/config_host/config_skia.h: No such file or directory
+CFLAGS+= -Ui386
+.endif
+
.if ${OPSYS} != "Linux"
BUILDLINK_TRANSFORM+= rm:-ldl
.endif
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56440: pkgsrc/misc/libreoffice build failure on NetBSD/i386
with OBJMACHINE
Date: Fri, 8 Oct 2021 04:45:50 +0000
On Tue, Oct 05, 2021 at 02:50:00PM +0000, Izumi Tsutsui wrote:
> The following kludge works around here.
>
> ---
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/misc/libreoffice/Makefile,v
> retrieving revision 1.269
> diff -u -p -r1.269 Makefile
> --- Makefile 22 Aug 2021 02:41:50 -0000 1.269
> +++ Makefile 5 Oct 2021 14:35:29 -0000
> @@ -262,6 +262,13 @@ MAKE_ENV+= SHELL=${BASH}
> BUILD_MAKE_FLAGS+= VERBOSE=true
> #BUILD_MAKE_FLAGS+= GMAKE_OPTIONS+=-p
>
> +.if ${MACHINE_ARCH} == "i386"
> +# XXX: avoid unexpected substitution in the include path
> +# (work.i386 -> work.1) when ${OBJMACHINE} is set
> +# <command-line>:0:23: fatal error: /usr/obj.1/pkgsrc/misc/libreoffice/work.1/libreoffice-7.2.0.4/config_host/config_skia.h: No such file or directory
> +CFLAGS+= -Ui386
> +.endif
> +
> .if ${OPSYS} != "Linux"
> BUILDLINK_TRANSFORM+= rm:-ldl
> .endif
Wow, what a mess :-|
please go ahead and commit that...
--
David A. Holland
dholland@netbsd.org
Responsible-Changed-From-To: pkg-manager->tsutsui
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Thu, 04 Nov 2021 10:12:09 +0000
Responsible-Changed-Why:
Please commit the diff.
State-Changed-From-To: open->analyzed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Thu, 04 Nov 2021 10:12:09 +0000
State-Changed-Why:
State-Changed-From-To: analyzed->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 10 Dec 2021 19:01:19 +0000
State-Changed-Why:
Committed.
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56440 CVS commit: pkgsrc/misc/libreoffice
Date: Fri, 10 Dec 2021 19:00:14 +0000
Module Name: pkgsrc
Committed By: tsutsui
Date: Fri Dec 10 19:00:14 UTC 2021
Modified Files:
pkgsrc/misc/libreoffice: Makefile
Log Message:
libreoffice: put a kludge to fix a build error on NetBSD/i386. PR/56440
To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 pkgsrc/misc/libreoffice/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.