Bug 234098

Summary: devel/aws-c-commons: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Danilo Egea Gondolfo <danilo>
Status: Closed FIXED    
Severity: Affects Only Me CC: linimon, pkubaj
Priority: --- Flags: bugzilla: maintainer-feedback? (danilo)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Piotr Kubaj freebsd_committer freebsd_triage 2018-12-17 13:57:18 UTC
Created attachment 200195 [details]
patch

This port needs C11-compatible compiler to build.

Add USES=compiler:c11 to fix build on GCC architectures.

Tested on powerpc64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2018-12-17 20:19:05 UTC
Hello, thanks for reporting the problem. May you provide me the error you are facing? I tried to build it with gcc48 and it works. The standard gnu99 is used during the build btw (-std=gnu99).

It's strange an API called "Core c99 package..." relies on c11...
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-12-17 22:15:57 UTC
(In reply to Danilo Egea Gondolfo from comment #1)
The error is here https://talos.anongoth.pl/data/powerpc64-default/2018-12-16_22h33m32s/logs/errors/aws-c-common-20181212.log

You can remove -Wno-sign-conversion flag but then another error is caused (I don't have a log unfortunately) that GCC 4.4 or higher is required.

There are also errors related to the lack of atomic functions (apart from GCC 4.4 requirement), which also point at C11.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-01-12 18:34:03 UTC
A commit references this bug:

Author: danilo
Date: Sat Jan 12 18:33:45 UTC 2019
New revision: 490069
URL: https://svnweb.freebsd.org/changeset/ports/490069

Log:
  - Update to 0.3.0
  - Add compiler:c11 to fix build on archs that still use GCC as default compiler [1]

  PR:		234098
  Submitted by:	Piotr Kubaj [1]

Changes:
  head/devel/aws-c-commons/Makefile
  head/devel/aws-c-commons/distinfo
  head/devel/aws-c-commons/files/patch-CMakeLists.txt
  head/devel/aws-c-commons/pkg-plist
Comment 4 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2019-01-12 18:38:43 UTC
Committed. Thanks!