Bug 1639224 - Binary annotation
Summary: Binary annotation
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 28
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1638964 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-15 10:37 UTC by Peter Kovář
Modified: 2019-05-28 19:24 UTC (History)
4 users (show)

Fixed In Version: annobin-5.7-3.fc28
Doc Type: Bug Fix
Doc Text:
Cause: The annobin plugin was too restrictive on the version of gcc for which it would work. Consequence: Updating gcc's minor version number would invalidate the annobin plugin. Fix: Change the plugin so that it only complains when gcc's major version number changes. Result: The plugin will now work with any version of gcc that has the same major version number as the version of gcc that was used to build the plugin.
Clone Of:
Environment:
Last Closed: 2019-05-28 19:24:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Kovář 2018-10-15 10:37:57 UTC
Description of problem:
annobin: conftest.c: Error: plugin built for compiler version (8.2.1) but run with compiler version (8.1.1)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Nick Clifton 2018-10-15 10:51:35 UTC
Hi Peter,

  This sounds like an installation problem.  Ie, you should be building with
  gcc v8.2.1 rather than gcc v8.1.1.  Is there is a special reason why you
  are using an older version of the compiler ?

Cheers
  Nick

PS. As of Fedora 29, the version check in annobin only tests the major version
value, not the minor version value.  So this kind of problem should not arise
there.

Comment 2 Nick Clifton 2018-10-15 11:00:47 UTC
Hi Peter,

Comment 3 Nick Clifton 2018-10-15 11:04:00 UTC
Hi Peter,

  Ah, please ignore my previous comment.  There was a bug in annobn, such
  that it was reporting the version numbers in the wrong order.  I am fixing
  that now, and also removing the check on the minor version number.

Cheers
  Nick

Comment 4 Peter Kovář 2018-10-15 11:20:20 UTC
Hi Nick,

thank you for your quick response. Looking forward to test the bug fix as it will be available.

Peter

Comment 5 Nick Clifton 2018-10-15 11:38:12 UTC
Hi Peter,

  Right - the fixed annobin has been built:  annobin-5.7-3.fc28.

  Jakub is going to include it in the errata for gcc, so that it should
  be pushed out with that update.  But in the meantime you can probably
  grab it for yourself, should you wish.

Cheers
  Nick

Comment 6 Peter Kovář 2018-10-15 13:18:50 UTC
Hi++ Nick,

I've installed the package from https://koji.fedoraproject.org/koji/buildinfo?buildID=1153544

It just works!™

Thank you very much for a really fast fix and all you efforts.

Cheers,

Peter

Comment 7 Nick Clifton 2018-10-24 07:52:53 UTC
*** Bug 1638964 has been marked as a duplicate of this bug. ***

Comment 8 Ben Cotton 2019-05-02 19:19:23 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2019-05-02 20:35:26 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Lukas Slebodnik 2019-05-03 07:57:52 UTC
I can see some rpm magic in spec file to add requirements into annobin

https://src.fedoraproject.org/rpms/annobin/blob/master/f/annobin.spec#_77
%global gcc_vr %(gcc --version | head -n 1 | sed -e 's|.*(Red\ Hat\ ||g' -e 's|)$||g')

	
# We need the major version of gcc.
%global gcc_major %(echo "%{gcc_vr}" | cut -f1 -d".")
%global gcc_next  %(v="%{gcc_major}"; echo $((++v)))
	
# Needed when building the srpm.
%if 0%{?gcc_major} == 0
%global gcc_major 0
%endif
	
# This is a gcc plugin, hence gcc is required.
%if %{with_hard_gcc_version_requirement}
# BZ 1607430 - There is an exact requirement on the major version of gcc.
Requires: (gcc >= %{gcc_major} with gcc < %{gcc_next})
%else
Requires: gcc
%endif

But IMHO it is not sufficient
sh-5.0$ rpm -q --requires annobin | grep gcc
(gcc >= 9 with gcc < 10)
libgcc_s.so.1()(64bit)


The problem is also when bumping minor version (as you can see in description of BZ)

(In reply to Peter Kovář from comment #0)
> Description of problem:
> annobin: conftest.c: Error: plugin built for compiler version (8.2.1) but
> run with compiler version (8.1.1)
> 

IMHO using rpm macro %requires_eq would solve that.
sh$ rpm --showrc | grep -A3 requires_eq 
-13: requires_eq        %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
-13: rpmmacrodir        /usr/lib/rpm/macros.d
-13: rust_arches        x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x
-13: selinux_modules_install("s:p:")

Comment 11 Ben Cotton 2019-05-28 19:24:51 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.