lvc / abi-compliance-checker

A tool for checking backward API/ABI compatibility of a C/C++ library
https://lvc.github.io/abi-compliance-checker/
GNU Lesser General Public License v2.1
624 stars 78 forks source link

Syntax error in MinGW header when using ABI-Compliance-Checker with Windows #121

Open RhanTegoth opened 1 year ago

RhanTegoth commented 1 year ago

Could some who managed to use this tool with Windows explain how to do it? If i run abi-compliance-checker.pl -lib NAME -old V1.xml -new V2.xml (with my actual libname inserted) i get an error that looks like i might have an incompatible version for perl or mingw?

So far i have installed StrawberryPerl (I think the paths got added automatically). I have downloaded mingw and added it's path to the environment. But I think it is not used up to the point of the error, since I get the same result if I don't have it in path. Visual Studio is installed too. I have not installed sigcheck, info-zip or ctags yets. Reason 1: I was currious in which order these tools work and install them step by step as the errors occure. Reason 2: I have no idea if i need to build ctags or if the source code is build when needed. Reason 3: I have no idea which of the programs i can find on https://infozip.sourceforge.net/ to download or if this is even the right website.

Though the error I receive seems to be an incompatiblity with Perl or MinGW. Is there some sort of maximum Version one may use? Or perhaps a specific one beside StrawberryPerl?

In file included from C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/crtdefs.h:10, from C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/stddef.h:7, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stddef.h:1, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/cxxabi_init_exception.h:38, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/exception_ptr.h:38, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/exception:143, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/new:40, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/ext/new_allocator.h:33, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/x86_64-w64-mingw32/bits/c++allocator.h:33, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/allocator.h:46, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/memory:63, .... (omitted library specific stuff) C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/_mingw.h:572:7: error: missing terminating " character asm volatile("int {$}3":); ^~~~ In file included from C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/crtdefs.h:10, from C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/stddef.h:7, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/stddef.h:1, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/cxxabi_init_exception.h:38, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/exception_ptr.h:38, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/exception:143, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/new:40, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/ext/new_allocator.h:33, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/x86_64-w64-mingw32/bits/c++allocator.h:33, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/bits/allocator.h:46, from C:/Programme/StrawberryPerl/c/lib/gcc/x86_64-w64-mingw32/8.3.0/include/c++/memory:63, .... (omitted library specific stuff) C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/_mingw.h: In function 'void debugbreak()': C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/_mingw.h:572:4: error: '$' was not declared in this scope asm volatile("int {$}3":); ^ C:/Programme/StrawberryPerl/c/x86_64-w64-mingw32/include/_mingw.h:572:7: error: expected ';' before '}' token asm volatile__("int {$}3":); ^ ; }

honeyyaya commented 11 months ago

hello ,May I ask if the respondent has resolved it? How to avoid it。

RhanTegoth commented 11 months ago

I never managed to resolve the issue. I ended up using a Linux system to run the abi checker.

honeyyaya commented 11 months ago

I never managed to resolve the issue. I ended up using a Linux system to run the abi checker.

Thank you