Bug 203806 - graphics/argyllcms fails to build with gcc
Summary: graphics/argyllcms fails to build with gcc
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: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-15 20:00 UTC by Justin Hibbits
Modified: 2017-05-12 02:57 UTC (History)
1 user (show)

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


Attachments
Log file of build failure (148.50 KB, text/plain)
2015-10-15 20:00 UTC, Justin Hibbits
no flags Details
Patch to add -std=gnu11 to CCFLAGS (313 bytes, patch)
2016-01-19 23:30 UTC, Justin Hibbits
no flags Details | Diff
Full patch to get argyllcms building with gcc from ports (1.67 KB, patch)
2016-09-19 19:35 UTC, Justin Hibbits
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer 2015-10-15 20:00:42 UTC
Created attachment 162099 [details]
Log file of build failure

argyllcms requires a C11 compiler, per the port Makefile.  However, gcc48 still appears to default to C89, and does not define __STDC_VERSION__.  This causes a build failure as shown in the attached log (redefinition of uint64_t).  Somehow, '-std=c11' needs to be explicitly passed to gcc, though a simple 'CFLAGS+=-std=gnu11' to the port Makefile did not do anything, so the Jamfile probably needs to be patched somehow.
Comment 1 Justin Hibbits freebsd_committer 2016-01-19 23:30:28 UTC
Created attachment 165841 [details]
Patch to add -std=gnu11 to CCFLAGS

This patch may not be entirely correct, as it's only been tested with gcc, not with clang.  A simple solution could be to rename the patch and add it as a patchfile in the Makefile, conditional on CC being gcc*.
Comment 2 Justin Hibbits freebsd_committer 2016-09-19 19:35:52 UTC
Created attachment 174973 [details]
Full patch to get argyllcms building with gcc from ports

This gets argyllcms building with gcc host compiler.  It includes the patch from attachment 165841 [details], and also two Makefile changes.
Comment 3 commit-hook freebsd_committer 2017-05-12 02:54:58 UTC
A commit references this bug:

Author: swills
Date: Fri May 12 02:54:44 UTC 2017
New revision: 440675
URL: https://svnweb.freebsd.org/changeset/ports/440675

Log:
  graphics/argyllcms: Fix build on powerpc64

  PR:		217215 [1]
  PR:		203806 [2]
  Submitted by:	Curtis Hamilton [1]
  Submitted by:	Justin Hibbits [2]
  Approved by:	kwm (maintainer)

Changes:
  head/graphics/argyllcms/Makefile
  head/graphics/argyllcms/files/patch-Jambase
  head/graphics/argyllcms/files/patch-ccast_axTLS_os__int.h
Comment 4 Steve Wills freebsd_committer 2017-05-12 02:57:03 UTC
Committed, thanks!