[MacPorts] #31667: libpar2 won't build with clang++
#31667: libpar2 won't build with clang++ ----------------------------------+----------------------------------------- Reporter: dinge345@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: libpar2 ----------------------------------+----------------------------------------- libpar2 does not compile: {{{:info:build ./par2fileformat.h:87:25: error: flexible array member 'entries' of non-POD element type 'FILEVERIFICATIONENTRY []'}}} but forcing compiler to g++ works: {{{port install libpar2 configure.compiler=gcc}}} Using OS X 10.7.2 with XCode 4.2, no older XCode installed. MacPorts defaults to clang in this configuration. -- Ticket URL: <https://trac.macports.org/ticket/31667> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ ----------------------------------+----------------------------------------- Reporter: dinge345@… | Owner: arno+macports@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: libpar2 ----------------------------------+----------------------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => arno+macports@… Comment: I don't know what "configure.compiler=gcc" means, since Xcode 4.2 does not include any version of gcc; please try with "configure.compiler=llvm- gcc-4.2" instead; if that works, we want to use that. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ ----------------------------------+----------------------------------------- Reporter: dinge345@… | Owner: arno+macports@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: libpar2 ----------------------------------+----------------------------------------- Comment(by dinge345@…): Yes, it works with "configure.compiler=llvm-gcc-4.2". -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ ----------------------------------+----------------------------------------- Reporter: dinge345@… | Owner: arno+macports@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: libpar2 ----------------------------------+----------------------------------------- Comment(by dinge345@…): Unsurprisingly I get the same error with the par2 port, it also works with llvm-gcc-4.2 -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: arno+macports@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: libpar2 | -----------------------------------+---------------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) * status: new => closed * resolution: => fixed Comment: Replying to [comment:2 dinge345@…]:
Yes, it works with "configure.compiler=llvm-gcc-4.2".
Thanks; fixed in r86473. Replying to [comment:3 dinge345@…]:
Unsurprisingly I get the same error with the par2 port
#31789 -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: arno+macports@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 | -----------------------------------+---------------------------------------- Changes (by jeremyhu@…): * status: closed => reopened * resolution: fixed => Comment: Reopening to track a real fix rather than a workaround -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 jeremyhu@…): * owner: arno+macports@… => jeremyhu@… * status: reopened => new -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): This is essentially the same as #33152 -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: and.damore@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 | -----------------------------------+---------------------------------------- Changes (by jeremyhu@…): * owner: jeremyhu@… => and.damore@… Comment: Andrea, You found the solution for the similar issue in ppl, so would you mind fixing par2 and libpar2 as well? I'm fluent in C++, and it doesn't look like this is the same root cause (issues in configure). If this is a deficiency in clang++, we should file a report against the compiler rather than working around it. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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
#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 | -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Yeah, with llvm-gcc it passes all 6 tests. With clang, it fails 4 out of 6 here... -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | -----------------------------------+---------------------------------------- Comment(by and.damore@…): The problem there is about port '''par2''', are the failing tests due to this specific issue or are they clang related but not to the fixed '''libpar2'''? If the latter we should commit '''libpar2''' and close this ticket. I think the [] syntax in that struct is just a C pointer and the patch is fine, but I'd like to get a specific review about that. Anyone? -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | -----------------------------------+---------------------------------------- Comment(by cal@…): JFYI, this is the reason the nzbget port is set to use llvm-gcc-4.2. It would be great if this was fixed, so I can drop the compiler change. As to the question, yes `type name[]` is equivalent to `type *name` in this case as far as I know. Please commit the patch. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | -----------------------------------+---------------------------------------- Comment(by cal@…): Alternatively, one could probably use `type name[0]`. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Replying to [comment:12 and.damore@…]:
The problem there is about port '''par2''', are the failing tests due to this specific issue or are they clang related but not to the fixed '''libpar2'''?
I don't know. There are no tests in libpar2, so I was using par2's tests to verify both since they share so much code. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 won't build with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: libpar2 | -----------------------------------+---------------------------------------- Changes (by and.damore@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:13 cal@…]:
JFYI, this is the reason the nzbget port is set to use llvm-gcc-4.2. It would be great if this was fixed, so I can drop the compiler change. As to the question, yes `type name[]` is equivalent to `type *name` in this case as far as I know. Please commit the patch.
Committed r93338, ticket closed. -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 and par2 fail 'make check' with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 par2 | -----------------------------------+---------------------------------------- Changes (by jeremyhu@…): * status: closed => reopened * resolution: fixed => * port: libpar2 => libpar2 par2 Comment: And reverted in r93350 ... -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 and par2 fail 'make check' with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 par2 | -----------------------------------+---------------------------------------- Changes (by jmr@…): * cc: arno+macports@…, julian@… (added) -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 and par2 fail 'make check' with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 par2 | -----------------------------------+---------------------------------------- Comment(by jmr@…): Replying to [comment:14 cal@…]:
Alternatively, one could probably use `type name[0]`. This is what FreeBSD does.
-- Ticket URL: <https://trac.macports.org/ticket/31667#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 and par2 fail 'make check' with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 par2 | -----------------------------------+---------------------------------------- Comment(by and.damore@…): Replying to [comment:17 jeremyhu@…]:
And reverted in r93350 ...
Did you revert due to par2 failing tests? -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:20> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31667: libpar2 and par2 fail 'make check' with clang++ -----------------------------------+---------------------------------------- Reporter: dinge345@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: libpar2 par2 | -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Replying to [comment:20 and.damore@…]:
Replying to [comment:17 jeremyhu@…]:
And reverted in r93350 ...
Did you revert due to par2 failing tests?
Yes, as mentioned in the Portfile comment, the commit message, and this ticket ;) -- Ticket URL: <https://trac.macports.org/ticket/31667#comment:21> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts