Bug 1728944
Summary: | redefinition of typedef is invalid in C | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | redhat |
Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | berrange, libvirt-maint, tburke |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-12-16 09:53:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
redhat
2019-07-11 04:56:20 UTC
I should have looked into it a little more before hitting that Submit button... In fact, I was not building with gcc-4.2; I was building with clang, which uses c99 mode by default. Nevertheless, the very old version of clang included with Mac OS X 10.6 evidently does not like type redefinitions. If the type redefinition cannot be avoided, I can use a newer compiler. Here is a full build log, in case it's of interest: https://build.macports.org/builders/ports-10.6_x86_64_legacy-builder/builds/107102/steps/install-port/logs/stdio I'm afraid we don't support building with such an old version of OS-X. Officially we only target the current shipping OS-X version (see https://libvirt.org/platforms.html ) though to best of my knowledge there shouldn't be any problems with the last 3-4 releases before that at least. Going all the way back to 10.6 though, is simply too far for us to justify investing our limited dev resources in. FYI we did some fixes upstream which should fix this: commit 412cc0f4038875aa1b0a3c176c309a7e777e9c3f Author: Daniel P. Berrangé <berrange> Date: Tue Oct 8 15:37:11 2019 +0100 build: stop clang complaining about redefined typedefs Clang's gnu99 mode is not quite the same as GCC's. It will complain about redefined typedefs being a C11 feature, while GCC does not complain and allows them in gnu99 mode. Reviewed-by: Fabiano Fidêncio <fidencio> Signed-off-by: Daniel P. Berrangé <berrange> Note that libvirt explicitl requests -std=gnu99 now too commit 23605f58bfd5c47d0f6fbd2aa57a8bda15e720df Author: Daniel P. Berrangé <berrange> Date: Mon Oct 7 14:07:28 2019 +0100 build: ask for -std=gnu99 explicitly We previously got -std=gnu99 secretly enabled as a side-effect of requesting the 'stdarg' gnulib module. We rely on some extensions from c99/gnu99 and while RHEL-7 supports this, it still defaults to gnu89. RHEL-7 also supports some newer standards but declares them experimental/incomplete, so sticking with gnu99 is best bet for now & matches historical usage. Reviewed-by: Fabiano Fidêncio <fidencio> Signed-off-by: Daniel P. Berrangé <berrange> |