abi-compliance-checker
abi-compliance-checker copied to clipboard
Removing a function from a namespace is not causing an ABI failure
Example code showing what we are seeing.
SomeHeader.h
Original:
namespace DummyNamespace
{
int SomeIntFunction();
void SomeVoidFunction();
char SomeCharFunction();
}
Modified:
namespace DummyNamespace
{
int SomeIntFunction();
char SomeCharFunction();
}
SomeHeader.h is listed as being checked on the report but the modified version is not reporting either a source or binary compatibility issue in version 1.99.9 running in 14.04 Ubuntu.
Hello.
I'll try to debug the issue this week. Meanwhile have you tried to use the abi-dumper tool (https://github.com/lvc/abi-dumper) in order to create ABI dumps for your library and then compare them to create compatibility report? Also please describe all input arguments of the tool to reproduce the issue.
Thank you.
I am trying to do this and for some reason it is harder than it should be. I try to compare the two dumps and it says it can’t find all the paths.
Although I didn’t get all the tools working, I do see a symbol difference in the .dump files between my two libraries and suspect that should trigger a report of a missing symbol and incompatibility.
After some processing, we are getting errors on a file not being able to find other headers it needs. We are not getting any removed symbol warning, could it be the case that the tool processes up to the point of error and everything else was compatible so that is what it is reporting in source and binary?
We believe we are now properly catching the can’t compile header situation so our build shouldn’t tolerate that anymore but we are still looking at this specific case.
What error message you've got when comparing ABI dumps?
It was a header missing problem, trying to fix that and run again but may be tomorrow, fighting a cold.
The tool doesn't search for any headers when comparing ABI dumps. Could you please share input arguments of the tool?
Thank you.
I got rid of the header warnings but it still says compatible for both source and abi.
I’m still fighting a cold, not sure what to do next or when I can do it right now.
We have our own wrapper script for the tool, I just gave it two different Debians to compare. If you have direct commands to try I could do that too.
I tried running the dumper utility locally and got the following. I'm not sure what it means to fix my elf utils.
(kirk)sa10319@isgu-sa10319-n:~/workspace/jdcorefs-build$ abi-dumper lib/libJDWidgets.so.6.2.0 -o ABIv0.dump -lver 0 WARNING: module version is not specified (-lver NUM) Reading debug-info ERROR: invalid debug_loc section of object, please fix your elf utils Reading v-tables ERROR: missed type id [ f2ee1] ERROR: missed type id [ f3074] ERROR: missed type id [ f4753] ERROR: missed type id [ f2d30] ERROR: missed type id [ f2f63] ERROR: missed type id [991dc2] ........ ERROR: missed type id [ f3d99] ERROR: missed type id [ f3de3] Creating ABI dump
The object ABI has been dumped to: ABIv0.dump
What is the name/release of your Linux distribution?
cat /etc/os-release
What version of the abi-dumper tool you are using?
abi-dumper --version
Thank you.
Ubuntu 10.04
Sent from my Android phone using TouchDown (www.nitrodesk.com)
-----Original Message----- From: Andrey V. Ponomarenko [[email protected]] Received: Thursday, 10 Dec 2015, 4:01AM To: lvc/abi-compliance-checker [[email protected]] CC: Albright Steve [[email protected]] Subject: Re: [abi-compliance-checker] Removing a function from a namespace is not causing an ABI failure (#27)
What is the name/release of your Linux distribution?
cat /etc/os-release
What version of the abi-dumper tool you are using?
abi-dumper --version
— Reply to this email directly or view it on GitHubhttps://github.com/lvc/abi-compliance-checker/issues/27#issuecomment-163562165.
I can’t get to the machine from home but I used the version of dumper you linked me to and I didn’t have it before
https://github.com/lvc/abi-dumper
So, I can create the dump files OK and see that one has the symbol and the other does not and I'm pasting some of those results below (I have it present in old but missing in new).
'6060184' => {
'MnglName' => '_ZN9JDWidgets17JDWidgetUtilities6setUrlER8QWebViewRK4QUrl',
'Param' => {
'0' => {
'name' => '"webView"',
'offset' => '0',
'type' => '[5c78cf]'
},
'1' => {
'name' => '"url"',
'offset' => '4',
'type' => '[5c78d4]'
}
},
'Return' => '1'
},
'_ZN8QWebView6setUrlERK4QUrl' => 'sincos@@GLIBC_2.1',
'_ZN9JDWidgets17JDWidgetUtilities6setUrlER8QWebViewRK4QUrl' => 1,
'_ZN8QWebView6setUrlERK4QUrl' => 0,
'_ZN8QWebView6setUrlERK4QUrl' => 'sincos@@GLIBC_2.1',
I can't see to get the report tool to work directly with these dumps.
Here's examples showing that it wants header information (note, libJDWidgets.so.6.2.0 exists in the new and old folders and not directly where it may be looking):
$ abi-compliance-checker -l libJDWidgets.so.6.2.0 -old abi-dumper-master/old/ABIOld.dump -new abi-dumper-master/new/ABINew.dump --v2=1
preparation, please wait ...
ERROR: can't find header files info in descriptor d1
Following up to one of your prior emails, this file doesn't exist in Ubuntu 10.04
cat /etc/os-release
and
$ abi-dumper --version ABI Dumper 0.99.12
Thanks - Steve
- The error "can't find header files info in descriptor d1" means that your ABI dump is invalid. Did you use the "-g -Og" options to compile your shared objects?
- Can you share the source code of your library, so I can debug all problems by myself?
- The reference 'type' => '[5c78cf]' in the dump points to another problem with the dump that I can't figure out currently;
- The removed symbol you noted doesn't have the "Header" attribute, so it should not be checked at all. It's another problem with the dump.
Thank you.
Yes, we compile with -g and then strip symbolic information out for production. What I was looking at was not stripped yet.
We’d have to have a Non-Disclosure Agreement in place before we could share actual code. Maybe I can come up with a representative example instead.
Please try not to strip any debug info from the shared objects before creating the ABI dump. Also the "-Og" option is mandatory to create debug info objects compatible with abi-dumper.
The tool reads debug_info, debug_loc and debug_line sections of the shared object. Please make sure that they are present in the object:
readelf -S YOUR_OBJECT.so | grep debug_line
Thank you.
I get hits on both debug_line and debug_loc.
I don’t think we are using -Og but just -g, is that good enough or not given hits on the other checks?
I could put it in just for example purposes but we want to use the tool and probably don’t want to add it if not needed.
This option is needed to check registers usage properly. However I see more significant problems with your installation, so lets forget about this option for a while.
I isolated the problem down to a new library and got permission to share this code with you - it's just wrapper code. Even so, please keep the code to yourself and treat it like you are under an NDA.
The function setUrl() exists in the old version but was removed in the new version and the reports I get say it is compatible for both - also included.
So hopefully you have enough to reproduce this on your own and can let us know what went wrong.
Thanks - Steve Albright
From: lvc [[email protected]] Sent: Monday, December 14, 2015 4:43 PM To: lvc/abi-compliance-checker Cc: Albright Steve Subject: Re: [abi-compliance-checker] Removing a function from a namespace is not causing an ABI failure (#27)
This option is needed to check registers usage properly. However I see more significant problems with your installation, so lets forget about this option for a while.
— Reply to this email directly or view it on GitHubhttps://github.com/lvc/abi-compliance-checker/issues/27#issuecomment-164583613.
Github strips out attachments from e-mails. Please resend them directly to me: http://abi-laboratory.pro/contacts.html
Thank you.