Bug 236847 - science/chrono: fix build with GCC-based architectures
Summary: science/chrono: 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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-28 07:46 UTC by Piotr Kubaj
Modified: 2019-04-24 22:12 UTC (History)
2 users (show)

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


Attachments
patch (2.56 KB, patch)
2019-03-28 07:46 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-03-28 07:46:55 UTC
Created attachment 203210 [details]
patch

Add -Wno-error=narrowing to CXXFLAGS when using GCC to work around error.

Remove -march=native from cmake files.

Include sys/syslimits.h in src/chrono_thirdparty/filesystem/path.h, GCC doesn't include that by default.

In src/chrono/core/ChMatrix.h, include immintrin.h only if SSE or AVX is present.

Tested on powerpc64 and amd64.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2019-03-28 07:49:56 UTC
(In reply to Piotr Kubaj from comment #0)
"In src/chrono/core/ChMatrix.h, include immintrin.h only if SSE or AVX is present."
This is already upstream.

"Include sys/syslimits.h in src/chrono_thirdparty/filesystem/path.h, GCC doesn't include that by default."
PR at https://github.com/projectchrono/chrono/pull/146
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2019-04-24 22:11:24 UTC
Committed, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-24 22:12:08 UTC
A commit references this bug:

Author: yuri
Date: Wed Apr 24 22:11:06 UTC 2019
New revision: 499916
URL: https://svnweb.freebsd.org/changeset/ports/499916

Log:
  science/chrono: fix build with GCC-based architectures

  PR:		236847
  Submitted by:	pkubaj

Changes:
  head/science/chrono/Makefile