Created attachment 198483 [details] patch GCC architectures currently use GCC7 from ports to build many ports dependent on exiv2, but GCC7 can't link againts libraries compiled with GCC4.2. Switch to GCC7 to fix it. Since ports GCC is not available on mips*, don't add USES=compiler:c++11-lang globally, since it will break mips*. powerpc64 compiles ok without -mminimal-toc, so remove that since it introduces performance penalty. Additionally, when building with GCC7, linking against libintl is necessary, so add that for GCC architectures, besides mips*. Tested on powerpc64 and amd64. Hardware sponsored by IntegriCloud.
Created attachment 198508 [details] v2 Better fix - don't link to libintl and pass a flag to disable NLS.
Created attachment 198689 [details] v2 Since gettext is used in USES, we can add LDFLAGS+=-lintl.
Created attachment 198902 [details] v3 There should also be USES=localbase:ldflags.
(In reply to Piotr Kubaj from comment #0) You note that > Since ports GCC is not available on mips*, don't add USES=compiler:c++11-lang globally, since it will break mips*. However, exiv2 uses cmake to build, and the cmake port currently contains USES=compiler:c++11-lang, subsequently trying to build exiv2 on mips also fails. Did you get cmake to build on mips without this?
Created attachment 199314 [details] v4 (In reply to Thomas Zander from comment #4) No, I didn't check whether cmake needs new compiler. That simplifies things, then.
A commit references this bug: Author: riggs Date: Sat Nov 24 08:38:11 UTC 2018 New revision: 485731 URL: https://svnweb.freebsd.org/changeset/ports/485731 Log: Fix build on gcc-based architectures, remove -mminimal-toc on powerpc64 PR: 232547 Submitted by: pkubaj@anongoth.pl Changes: head/graphics/exiv2/Makefile