We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I have tried to compile the module on Ubuntu 18.04, using gcc, g++ and mpicxx. All seems to be fine, until I try to run the test.
Indeed, by typing make test.x in the c++/build directory, I get the following error:
/home/xelad/KMCLib-2.0-a1/c++/unittest/test_interactions.cpp:146:25: error: the compiler can assume that the address of 'rc' will never be NULL [-Werror=address] CPPUNIT_ASSERT( &rc != NULL ); ^ /home/xelad/KMCLib-2.0-a1/c++/externals/include/cppunit/TestAssert.h:131:37: note: in definition of macro 'CPPUNIT_ASSERT' ( CPPUNIT_NS::Asserter::failIf( !(condition), \ ^~~~~~~~~ cc1plus: all warnings being treated as errors unittest/CMakeFiles/unittest.dir/build.make:185: recipe for target 'unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o' failed make[3]: *** [unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o] Error 1 make[3]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:233: recipe for target 'unittest/CMakeFiles/unittest.dir/all' failed make[2]: *** [unittest/CMakeFiles/unittest.dir/all] Error 2 make[2]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:208: recipe for target 'unittest/CMakeFiles/test.x.dir/rule' failed make[1]: *** [unittest/CMakeFiles/test.x.dir/rule] Error 2 make[1]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' Makefile:193: recipe for target 'test.x' failed make: *** [test.x] Error 2
I have read the known issue and I have found that you suggested to comment the line "CPPUNIT_ASSERT( &rc != NULL );"
However, by doing that, I got another error:
/home/xelad/KMCLib-2.0-a1/c++/unittest/test_interactions.cpp:145:28: error: unused variable 'rc' [-Werror=unused-variable] const RateCalculator & rc = interactions.rateCalculator(); ^~ cc1plus: all warnings being treated as errors unittest/CMakeFiles/unittest.dir/build.make:185: recipe for target 'unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o' failed make[3]: *** [unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o] Error 1 make[3]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:233: recipe for target 'unittest/CMakeFiles/unittest.dir/all' failed make[2]: *** [unittest/CMakeFiles/unittest.dir/all] Error 2 make[2]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:208: recipe for target 'unittest/CMakeFiles/test.x.dir/rule' failed make[1]: *** [unittest/CMakeFiles/test.x.dir/rule] Error 2 make[1]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' Makefile:193: recipe for target 'test.x' failed make: *** [test.x] Error 2
Can you please suggest me how to solve this?
The text was updated successfully, but these errors were encountered:
Hello,
Have you solved your problem?
I have the same problem,and I make the following changes to run the make text.x command
make text.x
// Query for the rate calculator. const RateCalculator rc = interactions.rateCalculator(); // CPPUNIT_ASSERT( &rc != NULL );
Sorry, something went wrong.
No branches or pull requests
Hi,
I have tried to compile the module on Ubuntu 18.04, using gcc, g++ and mpicxx. All seems to be fine, until I try to run the test.
Indeed, by typing make test.x in the c++/build directory, I get the following error:
/home/xelad/KMCLib-2.0-a1/c++/unittest/test_interactions.cpp:146:25: error: the compiler can assume that the address of 'rc' will never be NULL [-Werror=address] CPPUNIT_ASSERT( &rc != NULL ); ^ /home/xelad/KMCLib-2.0-a1/c++/externals/include/cppunit/TestAssert.h:131:37: note: in definition of macro 'CPPUNIT_ASSERT' ( CPPUNIT_NS::Asserter::failIf( !(condition), \ ^~~~~~~~~ cc1plus: all warnings being treated as errors unittest/CMakeFiles/unittest.dir/build.make:185: recipe for target 'unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o' failed make[3]: *** [unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o] Error 1 make[3]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:233: recipe for target 'unittest/CMakeFiles/unittest.dir/all' failed make[2]: *** [unittest/CMakeFiles/unittest.dir/all] Error 2 make[2]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:208: recipe for target 'unittest/CMakeFiles/test.x.dir/rule' failed make[1]: *** [unittest/CMakeFiles/test.x.dir/rule] Error 2 make[1]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' Makefile:193: recipe for target 'test.x' failed make: *** [test.x] Error 2
I have read the known issue and I have found that you suggested to comment the line "CPPUNIT_ASSERT( &rc != NULL );"
However, by doing that, I got another error:
/home/xelad/KMCLib-2.0-a1/c++/unittest/test_interactions.cpp:145:28: error: unused variable 'rc' [-Werror=unused-variable] const RateCalculator & rc = interactions.rateCalculator(); ^~ cc1plus: all warnings being treated as errors unittest/CMakeFiles/unittest.dir/build.make:185: recipe for target 'unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o' failed make[3]: *** [unittest/CMakeFiles/unittest.dir/test_interactions.cpp.o] Error 1 make[3]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:233: recipe for target 'unittest/CMakeFiles/unittest.dir/all' failed make[2]: *** [unittest/CMakeFiles/unittest.dir/all] Error 2 make[2]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' CMakeFiles/Makefile2:208: recipe for target 'unittest/CMakeFiles/test.x.dir/rule' failed make[1]: *** [unittest/CMakeFiles/test.x.dir/rule] Error 2 make[1]: Leaving directory '/home/xelad/KMCLib-2.0-a1/c++/build' Makefile:193: recipe for target 'test.x' failed make: *** [test.x] Error 2
Can you please suggest me how to solve this?
The text was updated successfully, but these errors were encountered: