FreeYourSoul / FSeam

Cpp header only library to manage compile time mock class generated via Python script
MIT License
86 stars 8 forks source link

Make of FSeam Fails #3

Closed tslator closed 5 years ago

tslator commented 5 years ago

Make Step Fails This issue is a follow one from issue #1. After issue #1 failure, copied catch.hpp to FSeam root directory. Run make and build fails. It appears the code generator has an issue, 'lass' vs 'class'?

[ 3%] Building CXX object test/CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o cd /home/tim/fseaminvestigation/FSeam/build/test && /usr/bin/c++ -DFSEAM_USE_CATCH2 -I/home/tim/fseaminvestigation/FSeam/test/src -I/home/tim/fseaminvestigation/FSeam/build/test -I/home/tim/fseaminvestigation/FSeam/test/../FSeam -I/home/tim/fseaminvestigation/FSeam/FSeam -isystem /usr/local/include -std=gnu++1z -o CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o -c /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc In file included from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:8:0: /home/tim/fseaminvestigation/FSeam/build/test/FSeamMockData.hpp:15:1: error: ‘lass’ does not name a type; did you mean ‘labs’? lass ^~~~ labs

tim@tim-ubuntu:~/fseaminvestigation/FSeam/build$ make /usr/bin/cmake -H/home/tim/fseaminvestigation/FSeam -B/home/tim/fseaminvestigation/FSeam/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/tim/fseaminvestigation/FSeam/build/CMakeFiles /home/tim/fseaminvestigation/FSeam/build/CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[1]: Entering directory '/home/tim/fseaminvestigation/FSeam/build' make -f test/CMakeFiles/testFSeamFreeFunction.dir/build.make test/CMakeFiles/testFSeamFreeFunction.dir/depend make[2]: Entering directory '/home/tim/fseaminvestigation/FSeam/build' cd /home/tim/fseaminvestigation/FSeam/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tim/fseaminvestigation/FSeam /home/tim/fseaminvestigation/FSeam/test /home/tim/fseaminvestigation/FSeam/build /home/tim/fseaminvestigation/FSeam/build/test /home/tim/fseaminvestigation/FSeam/build/test/CMakeFiles/testFSeamFreeFunction.dir/DependInfo.cmake --color= Scanning dependencies of target testFSeamFreeFunction make[2]: Leaving directory '/home/tim/fseaminvestigation/FSeam/build' make -f test/CMakeFiles/testFSeamFreeFunction.dir/build.make test/CMakeFiles/testFSeamFreeFunction.dir/build make[2]: Entering directory '/home/tim/fseaminvestigation/FSeam/build' [ 3%] Building CXX object test/CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o cd /home/tim/fseaminvestigation/FSeam/build/test && /usr/bin/c++ -DFSEAM_USE_CATCH2 -I/home/tim/fseaminvestigation/FSeam/test/src -I/home/tim/fseaminvestigation/FSeam/build/test -I/home/tim/fseaminvestigation/FSeam/test/../FSeam -I/home/tim/fseaminvestigation/FSeam/FSeam -isystem /usr/local/include -std=gnu++1z -o CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o -c /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc In file included from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:8:0: /home/tim/fseaminvestigation/FSeam/build/test/FSeamMockData.hpp:15:1: error: ‘lass’ does not name a type; did you mean ‘labs’? lass ^~~~ labs /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc: In function ‘void source::freeFunctionSimple()’: /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:25:12: error: ‘FreeFunctionData’ is not a member of ‘FSeam’ FSeam::FreeFunctionData data {}; ^~~~~~~~~~~~~~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:27:48: error: ‘data’ was not declared in this scope mockVerifier->invokeDupedMethod(__func__, &data); ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:27:48: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc: In function ‘int source::freeFunctionReturn()’: /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:34:12: error: ‘FreeFunctionData’ is not a member of ‘FSeam’ FSeam::FreeFunctionData data {}; ^~~~~~~~~~~~~~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:36:48: error: ‘data’ was not declared in this scope mockVerifier->invokeDupedMethod(__func__, &data); ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:36:48: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc: In function ‘void source::freeFunctionWithArguments(int, int, char)’: /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:43:12: error: ‘FreeFunctionData’ is not a member of ‘FSeam’ FSeam::FreeFunctionData data {}; ^~~~~~~~~~~~~~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:46:9: error: ‘data’ was not declared in this scope data.freeFunctionWithArguments_arg1_ParamValue = arg1; ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:46:9: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:48:9: error: ‘data’ was not declared in this scope data.freeFunctionWithArguments_arg2_ParamValue = arg2; ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:48:9: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:50:9: error: ‘data’ was not declared in this scope data.freeFunctionWithArguments_arg3_ParamValue = arg3; ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:50:9: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:51:48: error: ‘data’ was not declared in this scope mockVerifier->invokeDupedMethod(__func__, &data); ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:51:48: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc: In static member function ‘static int source::FreeFunctionClass::staticFunction()’: /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:58:12: error: ‘FreeFunctionData’ is not a member of ‘FSeam’ FSeam::FreeFunctionData data {}; ^~~~~~~~~~~~~~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:60:48: error: ‘data’ was not declared in this scope mockVerifier->invokeDupedMethod(__func__, &data); ^~~~ /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:60:48: note: suggested alternative: In file included from /usr/include/c++/7/string:51:0, from /usr/include/c++/7/stdexcept:39, from /usr/include/c++/7/array:39, from /usr/include/c++/7/tuple:39, from /usr/include/c++/7/functional:54, from /home/tim/fseaminvestigation/FSeam/build/test/FreeFunctionClass.fseam.cc:7: /usr/include/c++/7/bits/range_access.h:318:5: note: ‘std::data’ data(initializer_list<_Tp> __il) noexcept ^~~~ test/CMakeFiles/testFSeamFreeFunction.dir/build.make:141: recipe for target 'test/CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o' failed make[2]: *** [test/CMakeFiles/testFSeamFreeFunction.dir/FreeFunctionClass.fseam.cc.o] Error 1 make[2]: Leaving directory '/home/tim/fseaminvestigation/FSeam/build' CMakeFiles/Makefile2:414: recipe for target 'test/CMakeFiles/testFSeamFreeFunction.dir/all' failed make[1]: *** [test/CMakeFiles/testFSeamFreeFunction.dir/all] Error 2 make[1]: Leaving directory '/home/tim/fseaminvestigation/FSeam/build' Makefile:143: recipe for target 'all' failed make: *** [all] Error 2

To Reproduce Steps to reproduce the behavior:

  1. Follow instruction in readme (don't use -H. with Catch2 build)
  2. Copy catch.hpp to FSeam root directory
  3. make

Expected behavior clean build

Desktop (please complete the following information):

FreeYourSoul commented 5 years ago

as you had the error about catch2 during the first build I suspect some kind of corrupted build. Can you (with the catch2 fix) remove your build folder and redo the command lines

mkdir build && cd build && cmake .. && make build && make test && sudo make install
FreeYourSoul commented 5 years ago

If the problem re-occurs, thank you to re-open the issue