Summary: | graphics/Coin: build with GCC 4.8 fails with /usr/local/lib/gcc48/include/c++/cstdlib:174:20: error: declaration of C function 'long long int std::abs(long long int)' conflicts with abs(long long __x) | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Gerald Pfeifer <gerald> | ||||
Component: | Individual Port(s) | Assignee: | Gerald Pfeifer <gerald> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | cmt, cristianorolim | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 192025 | ||||||
Attachments: |
|
Description
Gerald Pfeifer
2014-07-26 11:02:32 UTC
This port has no maintainer; who is going to fix it? I'll go through the unmaintained ports first. Created attachment 146273 [details]
patch for graphics/Coin
Coin mixes stdlib.h and cstdlib (the C++ variant of stdlib.h) quite freely, but that does not work out with recent compilers - it results in conflicts as seen in the build log (the only place I could find in Coin where stdlib.h is needed is src/xml/expat/expat.h, which is used from "real C" and thus cannot use C++ headers).
Instead of going through >100 files including stdlib.h and creating one-line patches for around 70 of them (some are documentation/examples only or otherwise unused in our build), I opted for using post-patch to fix the include lines.
Thanks, Christoph! I'll do a test build on my side and hope to then apply this patch tomorrow or so. A commit references this bug: Author: gerald Date: Tue Aug 26 07:16:22 UTC 2014 New revision: 366193 URL: http://svnweb.freebsd.org/changeset/ports/366193 Log: Fix the build with GCC 4.8. Coin mixes stdlib.h (the C header) and cstdlib (the C++ header) quite freely, which results in conflicts and fails with recent compilers. Address this via a post-patch substitution to avoid some 70 individual patches. PR: 192133 Submitted by: Christoph Moench-Tegeder <cmt@burggraben.net> Changes: head/graphics/Coin/Makefile I just committed your patch after testing on redports (before/after). Thank you! |