[MacPorts] #31667: libpar2 won't build with clang++
MacPorts
noreply at macports.org
Tue May 15 00:59:13 PDT 2012
#31667: libpar2 won't build with clang++
-----------------------------------+----------------------------------------
Reporter: dinge345@… | Owner: jeremyhu@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.3
Resolution: | Keywords:
Port: libpar2 |
-----------------------------------+----------------------------------------
Changes (by and.damore@…):
* owner: and.damore@… => jeremyhu@…
* cc: jeremyhu@… (removed)
* cc: and.damore@… (added)
Comment:
The error refers to par2fileformat.h:87 but that doesn't seems a variable
length arrays, a vla should have an int variable as array size.
In this case '''[]''' is used as pointer notation in the C sense, the
memory itself is allocated in verificationpacket.cpp by function
AllocatePacket(), whose definition I wasn't able to find, my cpp-fu is
weak.
The fix I can see is just replacing ''entries[]'' with ''*entries'' as per
attached patch, it succesfully built libpar2 on my Xcode 4.3 system.
I tried port par2's test scripts as well, 3 out of 6 failed but I don't
know if this is due to the upward fix.
I'm leaving the review to someone who knows par2 or can actually test it
on a real case.
This could be a clang issue if that syntax is recognized as variable
length arrays while in fact it is not.
--
Ticket URL: <https://trac.macports.org/ticket/31667#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list