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
621 stars 76 forks source link

Existing std-headers shown as removed in report #85

Open hiangela opened 5 years ago

hiangela commented 5 years ago

Hello,

I'm using the ABI-Compliance-Checker under Linux, to check so of lib. Using the same so of lib into new and old folder and executed it, but sometime source compatibility report included std-headers(such as : stdio.h,string.h) of removed Symbols ,and sometime source compatibility report included std-headers(such as : stdio.h,string.h) of add Symbols.

And Using GCC 4.8.3

Any information could solved it , would be appreciated. looking forward to your reply. Thanks in advance.

lvc commented 5 years ago

Please post the command line and attach input files.

Thank you.

hiangela commented 5 years ago

Hi, i just input the same so file and using below command line abi-compliance-checker -lib APIName -old Old.xml -new New.xml --cross-gcc but sometimes source compatibility report included std-headers(such as : stdio.h,string.h) of add Symbols . If using xml-descriptor to skip std-header as below, report always work normal.

string.h stdio.h stdlib.h

Do you have any idea could solved it? Thanks in advance.

and i tried to used -nostdic in command line abi-compliance-checker -lib APIName -old Old.xml -new New.xml --cross-gcc -nostdic but it work abnormal, log would showed

[ /usr/include/stdio.h:33:21: fatal error: stddef.h: No such file or directory include compilation terminated. ]

any suggestion would be appreciated. Thanks

hiangela commented 5 years ago

HI, finally using option [--sysroot ./] that report could work normally, but it seems not best solution. And encountered below problem, If used --cross-gcc 4.8.3 could find three string.h file of std-header under cross-gcc 4.8.3, as below gcc4.8.3/libc/usr/include/bits/string.h gcc4.8.3/libc/usr/include/linux/string.h gcc4.8.3/libc/usr/include/string.h Right path is [gcc4.8.3/libc/usr/include/string.h], but sometimes abi-complinace tool would find other false path and cause wrong report.

and this tool could work on cross-compiler? Because i saw this issue-track[https://github.com/lvc/abi-compliance-checker/issues/57] is similar to what happened to me, but i used cross -gcc 4.8.3[arm-none-linux-gnueabi].

Do you know why encountered this problem, any information would be appreciated. Thanks.