Skip to content
New issue

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

Use the same version of gcc/g++ as on our CI system #1

Open
agarny opened this issue Jul 5, 2019 · 2 comments
Open

Use the same version of gcc/g++ as on our CI system #1

agarny opened this issue Jul 5, 2019 · 2 comments

Comments

@agarny
Copy link

agarny commented Jul 5, 2019

Right now, our Docker file uses gcc/g++ 7.4 while our CI system uses version 8.3.

When it comes to compilation, this doesn't seem to make any difference, but when it comes to gcov, version 7.4 seems to be buggy and we would benefit from upgrading to version 8.3.

Indeed, my work on code generation relies on having a forward declaration of a structure:

...
struct GeneratorEquationAstImpl;
using GeneratorEquationAstImplPtr = std::shared_ptr<GeneratorEquationAstImpl>;

struct GeneratorEquationAstImpl
{
...
};
...

and gcov 7.4 report that the second struct GeneratorEquationAstImpl is not covered:

------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: /external/drive/src
------------------------------------------------------------------------------
File                                       Lines    Exec  Cover   Missing
------------------------------------------------------------------------------
component.cpp                                127     127   100%
componententity.cpp                          138     138   100%
entity.cpp                                    52      52   100%
error.cpp                                    136     136   100%
generator.cpp                               1155    1154    99%   116
generatorprofile.cpp                         381     381   100%
importedentity.cpp                            36      36   100%
importsource.cpp                              37      37   100%
logger.cpp                                    34      34   100%
model.cpp                                    157     157   100%
namedentity.cpp                               28      28   100%
orderedentity.cpp                             36      36   100%
parser.cpp                                   837     837   100%
printer.cpp                                  338     338   100%
reset.cpp                                     76      76   100%
units.cpp                                    140     140   100%
utilities.cpp                                 73      73   100%
utilities.h                                   10      10   100%
validator.cpp                                564     564   100%
variable.cpp                                 178     178   100%
version.cpp                                    5       5   100%
when.cpp                                      34      34   100%
xmlattribute.cpp                              48      48   100%
xmldoc.cpp                                    50      50   100%
xmlnode.cpp                                   86      86   100%
------------------------------------------------------------------------------
TOTAL                                       4756    4755   100%
------------------------------------------------------------------------------

while it's all fine using version 8.3:

------------------------------------------------------------------------------
                           GCC Code Coverage Report
Directory: /home/libcellml/bbslave/Coverage_Tests_Builder_Ubuntu_18_04_64_Bit/libcellml/src
------------------------------------------------------------------------------
File                                       Lines    Exec  Cover   Missing
------------------------------------------------------------------------------
component.cpp                                126     126   100%   
componententity.cpp                          137     137   100%   
entity.cpp                                    51      51   100%   
error.cpp                                    132     132   100%   
generator.cpp                               1156    1156   100%   
generatorprofile.cpp                         379     379   100%   
importedentity.cpp                            35      35   100%   
importsource.cpp                              36      36   100%   
logger.cpp                                    33      33   100%   
model.cpp                                    156     156   100%   
namedentity.cpp                               27      27   100%   
orderedentity.cpp                             36      36   100%   
parser.cpp                                   836     836   100%   
printer.cpp                                  336     336   100%   
reset.cpp                                     75      75   100%   
units.cpp                                    133     133   100%   
utilities.cpp                                 72      72   100%   
validator.cpp                                564     564   100%   
variable.cpp                                 174     174   100%   
version.cpp                                    4       4   100%   
when.cpp                                      33      33   100%   
xmlattribute.cpp                              48      48   100%   
xmldoc.cpp                                    48      48   100%   
xmlnode.cpp                                   86      86   100%   
------------------------------------------------------------------------------
TOTAL                                       4713    4713   100%
------------------------------------------------------------------------------
@hsorby
Copy link
Collaborator

hsorby commented Jul 5, 2019

That should be doable but a pain as gcc-7 is the default compiler on 18.04.

@agarny
Copy link
Author

agarny commented Jul 5, 2019

I know, but there clearly seems to be an issue with gcov 7.4... which prevents my code generation work from getting 100% coverage...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants