pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56440: pkgsrc/misc/libreoffice build failure on NetBSD/i386 with OBJMACHINE



>Number:         56440
>Category:       pkg
>Synopsis:       pkgsrc/misc/libreoffice build failure on NetBSD/i386 with OBJMACHINE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 05 14:50:00 +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@localhost:/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



Home | Main Index | Thread Index | Old Index