Bug 231544

Summary: print/harfbuzz: fix build on GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: freebsd-gnome (Nobody) <gnome>
Status: Closed FIXED    
Severity: Affects Only Me CC: jbeich, linimon, pkubaj
Priority: --- Flags: bugzilla: maintainer-feedback? (gnome)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
v2 jbeich: maintainer-approval+

Description Piotr Kubaj freebsd_committer freebsd_triage 2018-09-21 13:17:33 UTC
Created attachment 197302 [details]
patch

Compiling harfbuzz on powerpc64 fails with:
/usr/local/lib/libgraphite2.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'

USES=compiler:c++11-lang is necessary to fix this.

Tested on amd64 and powerpc64.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-09-21 21:19:21 UTC
Comment on attachment 197302 [details]
patch

>Index: Makefile
>===================================================================
>--- Makefile	(revision 480254)
>+++ Makefile	(working copy)
>@@ -14,7 +14,7 @@
> 		libgraphite2.so:graphics/graphite2
> 
> USE_LDCONFIG=	yes
>-USES=		gettext-runtime gmake gnome libtool \
>+USES=		compiler:c++11-lang gettext-runtime gmake gnome libtool \

USES=compiler:c++11-lib is already defined under for -icu slave. Just move that into master port to fix libstdc++ ABI mismatch.

USES=compiler:c++11-lang unlike *-lib variant didn't force new libstdc++ on FreeBSD 9.* amd64/i386 but nowadays both are synonyms for platforms stuck with in-base GCC.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-09-22 05:55:18 UTC
Created attachment 197329 [details]
v2

Thanks for the clarification about the difference between lang and lib (I wondered about it myself).

Here's a new patch.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-09-23 21:10:57 UTC
Comment on attachment 197329 [details]
v2

I'm not the maintainer but the fix looks OK.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-09-23 21:15:27 UTC
A commit references this bug:

Author: jbeich
Date: Sun Sep 23 21:15:06 UTC 2018
New revision: 480533
URL: https://svnweb.freebsd.org/changeset/ports/480533

Log:
  print/harfbuzz: unbreak on GCC archs after r477696

  /usr/local/lib/libgraphite2.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'

  PR:		231544
  Submitted by:	Piotr Kubaj

Changes:
  head/print/harfbuzz/Makefile
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-09-23 21:16:30 UTC
A commit references this bug:

Author: jbeich
Date: Sun Sep 23 21:16:18 UTC 2018
New revision: 480534
URL: https://svnweb.freebsd.org/changeset/ports/480534

Log:
  MFH: r480533

  print/harfbuzz: unbreak on GCC archs after r477696

  /usr/local/lib/libgraphite2.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'

  PR:		231544
  Submitted by:	Piotr Kubaj
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/print/harfbuzz/Makefile