Bug 1575520

Summary: abi-compliance-checker doesn't work under F28
Product: [Fedora] Fedora Reporter: Nikos Mavrogiannopoulos <nmavrogi>
Component: abi-compliance-checkerAssignee: Richard Shaw <hobbes1069>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: emmanuel, hobbes1069, orion, perl-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: abi-compliance-checker-2.3-1.fc28 abi-compliance-checker-2.3-1.fc27 abi-compliance-checker-2.3-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-24 13:56:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
gcc8 compatibility for abi-compliance-checker none

Description Nikos Mavrogiannopoulos 2018-05-07 07:57:07 UTC
Description of problem:
After updating gnutls CI to F28, abi-compliance-checker fails with the following error:

```
Temporary header file '/tmp/nfVOd0EPJl/dump1.h' with the following content will be compiled to create GCC translation unit dump:

  // add includes
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/gnutls.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/gnutlsxx.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/abstract.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/compat.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/crypto.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/dtls.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/ocsp.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/openpgp.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/pkcs11.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/pkcs12.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/pkcs7.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/self-test.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/socket.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/system-keys.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/tpm.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/urls.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/x509.h"
  #include "/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes/gnutls/x509-ext.h"

The GCC parameters:
  gcc -fdump-translation-unit -fkeep-inline-functions -c -x c++-header -fpermissive -w "/tmp/nfVOd0EPJl/dump1.h"  -I/builds/gnutls/gnutls/gnutls-prev-abi.tmp/lib/includes

cc1plus: error: unrecognized command line option '-fdump-translation-unit'
```

It seems it relies on a gcc flag which is no longer available.

Comment 1 Nikos Mavrogiannopoulos 2018-05-07 11:14:02 UTC
This seems to be addressed upstream:
https://github.com/lvc/abi-compliance-checker/commit/bcc9a7679a772135260cf1921e6c7fe7fc10d3c2

Comment 2 Richard Shaw 2018-05-07 12:53:50 UTC
I'll try to keep an eye out for the new release but feel free to let me know if you see it first.

Comment 3 Nikos Mavrogiannopoulos 2018-05-07 13:09:16 UTC
Why not backport this specific patch? Without it abi-compliance-checker is broken in fedora28.

Comment 4 Richard Shaw 2018-05-07 13:25:46 UTC
Since he's already committed the change in version I assume the new release will happen very soon. If not, I'll make a patch from the commit.

Comment 5 Richard Shaw 2018-05-07 15:24:38 UTC
I noticed the commit was over a month ago so I have emailed the author to see if the lack of release was intentional or not.

Comment 6 Richard Shaw 2018-05-08 13:52:01 UTC
Ok, the commit does not apply cleanly and appears to be dependent on other commits. If you want to create a clean patch I'll review it, otherwise I'm going to wait on the 2.3 release.

Comment 7 Emmanuel Seyman 2018-05-09 08:19:28 UTC
Created attachment 1433613 [details]
gcc8 compatibility for abi-compliance-checker

I rebased the patch but don't use abi-compliance-checker. Can someone check that this fixes the issue?

Comment 8 Richard Shaw 2018-05-09 12:44:07 UTC
Here's a test package based on the patch, please confirm it fixes the problem. When I get a second I'll check that it still works on my F27 system w/ GCC 7.

https://kojipkgs.fedoraproject.org//work/tasks/6903/26856903/abi-compliance-checker-2.2-3.fc29.noarch.rpm

Comment 9 Nikos Mavrogiannopoulos 2018-05-09 19:23:32 UTC
It works for me minus the dependency issue on findutils (reported separately). May I suggest the following sanity check (as CI/Test https://fedoraproject.org/wiki/CI/Tests ), if there is no other testsuite for that?


cat >c.c <<_EOF_
#include <stdio.h>

int apicall(int a)
{
printf("hello world %d\n", a);
return 0;
}
_EOF_

$ mkdir -p api-ok
$ mkdir -p api-broken

cat >api-ok/c.h <<_EOF_

int apicall(int a);
_EOF_

cat >api-broken/c.h <<_EOF_

int apicall(int a, void *ptr);
_EOF_


$ gcc -g -c -Wall -Werror -fpic c.c
$ gcc -shared -o libfoo.so c.o
$ cp libfoo.so api-ok/
$ cp libfoo.so api-broken/
$ abi-dumper libfoo.so

$ abi-compliance-checker -l foo -old api-ok -new ABI.dump # ok
$ abi-compliance-checker -l foo -old api-broken -new ABI.dump # fails

Comment 10 Richard Shaw 2018-05-10 18:53:20 UTC
I'll consider adding a test in the future but it's not something I've done before and don't have the spare cycles right now to figure it out.

Comment 11 Fedora Update System 2018-05-10 19:39:17 UTC
abi-compliance-checker-2.2-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a727930b7f

Comment 12 Fedora Update System 2018-05-10 19:39:31 UTC
abi-compliance-checker-2.2-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8de33c103f

Comment 13 Fedora Update System 2018-05-10 19:39:40 UTC
abi-compliance-checker-2.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-1171f003c1

Comment 14 Fedora Update System 2018-05-11 17:37:00 UTC
abi-compliance-checker-2.2-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a727930b7f

Comment 15 Fedora Update System 2018-05-11 18:51:39 UTC
abi-compliance-checker-2.2-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8de33c103f

Comment 16 Fedora Update System 2018-05-11 19:36:05 UTC
abi-compliance-checker-2.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-1171f003c1

Comment 17 Fedora Update System 2018-05-15 16:39:20 UTC
abi-compliance-checker-2.3-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-f38c8d8188

Comment 18 Fedora Update System 2018-05-15 16:39:37 UTC
abi-compliance-checker-2.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b68f0ba2c0

Comment 19 Fedora Update System 2018-05-15 16:39:48 UTC
abi-compliance-checker-2.3-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-21e393fe5c

Comment 20 Fedora Update System 2018-05-16 01:33:30 UTC
abi-compliance-checker-2.3-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-21e393fe5c

Comment 21 Fedora Update System 2018-05-16 02:41:29 UTC
abi-compliance-checker-2.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b68f0ba2c0

Comment 22 Fedora Update System 2018-05-16 03:27:41 UTC
abi-compliance-checker-2.3-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-f38c8d8188

Comment 23 Fedora Update System 2018-05-24 13:56:08 UTC
abi-compliance-checker-2.3-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2018-05-24 14:25:49 UTC
abi-compliance-checker-2.3-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2018-05-30 15:17:35 UTC
abi-compliance-checker-2.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.