Opened 14 years ago
Closed 14 years ago
#27789 closed defect (fixed)
cppcheck: fails to install in Leopard
Reported by: | jpo@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | paj-macports@… | |
Port: | cppcheck |
Description
Hi,
The building process of cppcheck 1.46.1 (and 1.45) fails in Leopard (10.5).
Error messages:
... g++ -O2 -DNDEBUG -Wall -Ilib -Icli -c -o test/testautovariables.o test/testautovariables.cpp In file included from test/testautovariables.cpp:22: test/testsuite.h:49:65: error: macro "assert" passed 3 arguments, but takes just 1 test/testsuite.h:49: error: variable or field ‘assert’ declared void ...
Change History (9)
comment:1 Changed 14 years ago by jpo@…
comment:2 follow-up: 5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Please report this problem to the developers of cppcheck.
comment:4 Changed 14 years ago by paj-macports@…
I don't have a Leopard installation on which to test (shall build a VM this week). The following patch should work:
diff --git a/test/testsuite.h b/test/testsuite.h index 69fb777..f83d721 100644 --- a/test/testsuite.h +++ b/test/testsuite.h @@ -23,6 +23,9 @@ #include <sstream> #include "errorlogger.h" #include "redirect.h" +#ifdef assert +# undef assert +#endif class options;
comment:5 Changed 14 years ago by jpo@…
Replying to ryandesign@…:
Please report this problem to the developers of cppcheck.
Yesterday I reported this problem upstream
There is already a comment in the ticket saying that it is safe to rename the assert method in the testsuite,h file.
/jpo
comment:7 Changed 14 years ago by jpo@…
Replying to paj-macports@…:
Fixed upstream.
You were faster than me ;)
For the record: Upstream fix: method assert method renamed to assert_. https://github.com/danmar/cppcheck/commit/58ddb3b0abd04b1dc1ac12c316b327d980189b1f
comment:8 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|---|
Status: | new → assigned |
comment:9 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Resolved by updating the port to 1.47 (#28374).
The problem described above occurs during "make all". In particular, the compilation aborts during the compilation of the sub-target "testrunner".
With the following patch it is possible to build and install cppcheck in Mac OS X Leopard (10.5):