Version mismatch - gcov and -mno-cygwin

Brian Dessent
Fri Nov 9 22:29:00 GMT 2007

Jevin Sweval wrote:

> When adding instrumenting to -mno-cygwin compiled programs (using
> -ftest-coverage -fprofile-arcs and linking against -lgcov), I get and
> error complaining about "version mismatch between version 304c and
> 304m". Using `strings`, I believe that the gcc versions (for the
> cygwin and mingw cc1) are 304c and that libgcov is version 304m. Is
> there any chance that the package could be fixed? If not, any advice
> on what to do to fix the problem? Thanks!

The problem is that -mno-cygwin does not switch to a different cc1,
there is only one that is shared between both targets, by just setting
diffferent options in the specs file.  If you look at "ls -l
/usr/lib/gcc/i686-pc-mingw32/3.4.4/cc1.exe" it is a symlink to the
Cygwin one.  But the target libraries are obviously not the same.  So
there is no way for -mno-cygwin to switch interfaces, we'd need to
rebuild the MinGW libgcov to use 304c.  But then you lose compatibility
with real MinGW compiled objects/libs that are using 304m so that is
just as broken, since the whole point of -mno-cygwin is to be MinGW.

I'd say this is just a limitation of what -mno-cygwin is able to do; if
you want a workaround use the real MinGW gcc instead of -mno-cygwin.  If
you need a MinGW compiler that supports POSIX paths then you can build
it as a cross compiler (and in fact this is the way we intend to do
things in the future, deprecating -mno-cygwin.)


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list