Bug 232547 - graphics/exiv2: improvements for GCC architectures
Summary: graphics/exiv2: improvements for GCC architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2018-10-22 21:50 UTC by Piotr Kubaj
Modified: 2018-11-24 08:44 UTC (History)
3 users (show)

See Also:
riggs: maintainer-feedback+


Attachments
patch (767 bytes, patch)
2018-10-22 21:50 UTC, Piotr Kubaj
no flags Details | Diff
v2 (802 bytes, patch)
2018-10-23 19:01 UTC, Piotr Kubaj
no flags Details | Diff
v2 (771 bytes, patch)
2018-10-27 11:10 UTC, Piotr Kubaj
no flags Details | Diff
v3 (789 bytes, patch)
2018-11-03 00:34 UTC, Piotr Kubaj
no flags Details | Diff
v4 (662 bytes, patch)
2018-11-18 13:15 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2018-10-22 21:50:42 UTC
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.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-23 19:01:56 UTC
Created attachment 198508 [details]
v2

Better fix - don't link to libintl and pass a flag to disable NLS.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-27 11:10:41 UTC
Created attachment 198689 [details]
v2

Since gettext is used in USES, we can add LDFLAGS+=-lintl.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2018-11-03 00:34:40 UTC
Created attachment 198902 [details]
v3

There should also be USES=localbase:ldflags.
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2018-11-18 07:13:54 UTC
(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?
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2018-11-18 13:15:14 UTC
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.
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-11-24 08:38:58 UTC
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