tech-pkg archive

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

Re: libreoffice fails on netbsd-8



Greg Troxel <gdt%lexort.com@localhost> writes:

> (Someone mailed me about libreoffice problems and I think I somehow lost
> that message.)
>
> On at least one netbsd-8/amd64 system, misc/libreoffice fails.
>
> The basic issue seems to be when libreoffice's build system checks for
> fontconfig, and there is a claim that fontconfig requires a particular
> version of freetype2.  The native freetype2 is older than the
> claimed-needed version, but pkgsrc freetype2 is ok.
>
> However, adding in bl3 of freetype2 and setting API_DEPENDS did not seem
> to help, and I can't find the pkgconfig data that claims that the lower
> version isn't ok.
>
> So if anyone has a netbsd-8 box handy, and wants to try building
> libreoffice, I would be interested to hear if it works or not, and what
> you think about why.

I now think the problem might be that freetype2 doesn't bl3 the pc
file.  I don't want to touch that now.

The patch below requires pkgsrc freetype2, which might be needed anyway,
and has a pc file.  With this, this build gets pretty far.

I then run into a problem with mixing stdc++.so.7 and stc++.so.8.   It
appears that the in-tree gcc5 has /usr/lib/libstdc++.so.8 and pkgsrc
gcc6 has
  /usr/pkg/gcc6/lib/libstdc++.so.7

On netbsd-8 a number of things have GCC_REQD=6, and this results in
mixed compilation.   Thus, the overall 'compiler selection' stuff is
required, but probably people will just upgrade to netbsd-9.

Opinions about the patch?  I can certainly see not applying it because
it doesn't result in a package, and is hence just noise.  That's how I'm
leaning, but I'm posting it in case anyone finds it useful.




Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/libreoffice/Makefile,v
retrieving revision 1.215
diff -u -p -r1.215 Makefile
--- Makefile	1 Dec 2019 04:59:43 -0000	1.215
+++ Makefile	26 Dec 2019 01:02:26 -0000
@@ -4,6 +4,7 @@ VERREL=		6.3.3
 VERRC=		2
 VER=		${VERREL}.${VERRC}
 DISTNAME=	libreoffice-${VER}
+PKGREVISION=	1
 CATEGORIES=	misc
 MASTER_SITES=	http://download.documentfoundation.org/libreoffice/src/${VERREL}/
 EXTRACT_SUFX=	.tar.xz
@@ -33,6 +34,12 @@ GCC_REQD+=	7
 
 .include "../../mk/bsd.prefs.mk"
 
+# libreoffice's configure checks for fontconfig, which requires
+# freetype2 via pkg-config.  But while the native freetype2 on
+# netbsd-8 it doesn't get buildlinked in.  Work around this by
+# insisting on newer freetype2.
+BUILDLINK_API_DEPENDS.freetype2+=	freetype2>=2.10.1
+
 CHECK_BUILTIN.freetype2:=	yes
 .include "../../graphics/freetype2/builtin.mk"
 CHECK_BUILTIN.freetype2:=	no


Home | Main Index | Thread Index | Old Index