Bug 237105 - biology/canu: fix build with GCC-based architectures
Summary: biology/canu: fix build with GCC-based 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: Jason W. Bacon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-08 11:34 UTC by Piotr Kubaj
Modified: 2019-04-18 12:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (jwb)


Attachments
patch (1.88 KB, patch)
2019-04-08 11:34 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 2019-04-08 11:34:12 UTC
Created attachment 203474 [details]
patch

Don't use USES=compiler:openmp, it uses base GCC if it's available, but base GCC can't build this port. Set USE_GCC=yes instead.

Also force linking to -lgomp -lpthread on powerpc64 and replace ARCH with powerpc, if building on powerpc64.
Comment 1 Jason W. Bacon freebsd_committer freebsd_triage 2019-04-10 15:10:32 UTC
Thanks for the patch, but I've actually been working on this in my WIP collection:

https://github.com/outpaddling/freebsd-ports-wip

I have upstream patches there for the ppc target issues as well as fixes for aarch64.

As for USE_GCC, I'd like to find a clean, portable, and robust way to trigger use of a newer compiler on platforms that need it.

I don't like replacing compiler:openmp with USE_GCC, as compiler:openmp will likely be able to use the base clang in the future, eliminating the gcc dependency.

I'd also like to avoid making assumptions based on ARCH (even though they may be valid now) and instead use a direct test for GCC 4.2 base compiler.
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2019-04-12 00:48:31 UTC
I cleaned up the port in wip today and retested on ppc64 and aarch64 under qemu.  

https://github.com/outpaddling/freebsd-ports-wip/tree/master/canu

I also wrapped USE_GCC in a check for GCC 4.2 base compiler, leaving compiler:openmp intact.  I think that's the best we can do with the current infrastructure.

If/when compiler:openmp supports using clang, the GCC dep will drop off automatically for all clang-based platforms.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-18 12:16:40 UTC
A commit references this bug:

Author: jwb
Date: Thu Apr 18 12:15:57 UTC 2019
New revision: 499251
URL: https://svnweb.freebsd.org/changeset/ports/499251

Log:
  biology/canu: Fix build on powerpc64 and aarch64

  Should also work on powerpc and arm*, but unable to test

  PR:             237105
  Reported by:    pkubaj

Changes:
  head/biology/canu/Makefile
  head/biology/canu/files/patch-Makefile
  head/biology/canu/files/patch-pipelines_canu_Defaults.pm
  head/biology/canu/files/patch-pipelines_canu_Execution.pm
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2019-04-18 12:17:44 UTC
Fix committed and sending patch upstream, thanks!