csMACnz / Coveralls.net-Samples

Sample Coveralls.net projects as reference for how it is used.
22 stars 22 forks source link

make process fails on nunit-monocov-travis-vi branch #8

Open Beakerboy opened 5 years ago

Beakerboy commented 5 years ago

I'm trying to get a C# project to run tests and supply coverage report to coveralls.io following the script in the nunit-monocov-travis-vi branch. The make process fails with the following errors:

make
mcs -debug /target:exe /out:monocov.exe -define:GUI_gtk -r:Mono.Cecil -r:Mono.CompilerServices.SymbolWriter -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -r:System.Drawing -resource:gui/gtk/monocov.glade,monocov.glade Constants.cs CoverageItem.cs NamespaceCoverageItem.cs ClassCoverageItem.cs MethodCoverageItem.cs CoverageModel.cs SourceFileCoverageData.cs XmlExporter.cs HtmlExporter.cs Options.cs MonoCovOptions.cs MonoCovMain.cs gui/gtk/MonoCov.cs gui/gtk/CoverageView.cs gui/gtk/SourceWindow.cs -resource:style.xsl,style.xsl -resource:trans.gif,trans.gif
HtmlExporter.cs(42,10): warning CS0618: `System.Xml.Xsl.XslTransform' is obsolete: `This class has been deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead. http://go.microsoft.com/fwlink/?linkid=14202'
HtmlExporter.cs(80,21): warning CS0618: `System.Xml.Xsl.XslTransform' is obsolete: `This class has been deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead. http://go.microsoft.com/fwlink/?linkid=14202'
Compilation succeeded - 2 warning(s)
cc coverage.c -O2 -g -DVERSION=\"0.2\" `pkg-config --cflags mono-2` `pkg-config --libs mono-2` `pkg-config --cflags glib-2.0` `pkg-config --libs glib-2.0` --shared -fPIC -o libmono-profiler-monocov.so
coverage.c: In function ‘mono_profiler_startup’:
coverage.c:129:28: error: ‘MONO_PROFILE_INS_COVERAGE’ undeclared (first use in this function)
  mono_profiler_set_events (MONO_PROFILE_INS_COVERAGE | MONO_PROFILE_COVERAGE | MONO_PROFILE_ASSEMBLY_EVENTS);
                            ^
coverage.c:129:28: note: each undeclared identifier is reported only once for each function it appears in
coverage.c:129:56: error: ‘MONO_PROFILE_COVERAGE’ undeclared (first use in this function)
  mono_profiler_set_events (MONO_PROFILE_INS_COVERAGE | MONO_PROFILE_COVERAGE | MONO_PROFILE_ASSEMBLY_EVENTS);
                                                    ^
coverage.c:129:80: error: ‘MONO_PROFILE_ASSEMBLY_EVENTS’ undeclared (first use in this function)
  mono_profiler_set_events (MONO_PROFILE_INS_COVERAGE | MONO_PROFILE_COVERAGE | MONO_PROFILE_ASSEMBLY_EVENTS);
                                                                            ^
coverage.c: At top level:
coverage.c:312:1: error: unknown type name ‘MonoProfileCoverageEntry’
 output_entry (MonoProfiler *prof, const MonoProfileCoverageEntry *entry)
 ^
coverage.c: In function ‘output_entry’:
coverage.c:318:42: error: request for member ‘iloffset’ in something not a structure or union
  fprintf (prof->outfile, "%d %d\t", entry->iloffset - prev_offset, entry->counter);
                                          ^
coverage.c:318:73: error: request for member ‘counter’ in something not a structure or union
  fprintf (prof->outfile, "%d %d\t", entry->iloffset - prev_offset, entry->counter);
                                                                         ^
coverage.c:319:21: error: request for member ‘iloffset’ in something not a structure or union
  prev_offset = entry->iloffset;
                     ^
make: *** [libmono-profiler-monocov.so] Error 1
The command "make" failed and exited with 2 during .
Beakerboy commented 5 years ago

I cloned the Coveralls.net-Samples repository, and forced it to build by editing the README file, and received the same error.

Beakerboy commented 5 years ago

The build process is successful when mono version 4.8.1 is specified in the .travis.yml file. However, monocov crashes:

monocov | starting coverage profiling.
NUnit Console Runner 3.0.5674 
Copyright (C) 2014 Charlie Poole
*** Error in `mono': realloc(): invalid next size: 0x0000000002af8f10 ***
Stacktrace:
  at <unknown> <0xffffffff>
Beakerboy commented 5 years ago

I tested several version of mono, 5.0.1, 4.6.1, 4.4.2, 4.2.3, 4.0.5, and 3.0.12. The only success was with 4.2.3 and 4.0.5.

Beakerboy commented 5 years ago

Submitted a Pull request #9