Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1548484

Summary: glib: Partial injection of Fedora build flags
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: glibAssignee: Paul Howarth <paul>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: mcatanza, pahan, paul, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-13 15:12:28 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:
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-02-23 16:23:42 UTC
/usr/lib64/libglib-1.2.so.0.0.10, /usr/lib64/libgmodule-1.2.so.0.0.10, /usr/lib64/libgthread-1.2.so.0.0.10 in glib-1:1.2.10-52.fc28.x86_64 have not been linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config:

It seems that -specs=/usr/lib/rpm/redhat/redhat-hardened-ld is dropped:

libtool: link: gcc -shared  -fPIC -DPIC  .libs/garray.o .libs/gcache.o .libs/gcompletion.o .libs/gdataset.o .libs/gdate.o .libs/gerror.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/giounix.o .libs/glist.o .libs/gmain.o .libs/gmem.o .libs/gmessages.o .libs/gmutex.o .libs/gnode.o .libs/gprimes.o .libs/grel.o .libs/gscanner.o .libs/gslist.o .libs/gstrfuncs.o .libs/gstring.o .libs/gtimer.o .libs/gtree.o .libs/gutils.o    -O2 -g -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -mcet -Wl,-z -Wl,relro   -Wl,-soname -Wl,libglib-1.2.so.0 -o .libs/libglib-1.2.so.0.0.10

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 Paul Howarth 2018-02-24 14:07:44 UTC
It seems to be libtool that's dropping the -specs option:

/usr/bin/libtool --mode=link gcc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection  -D_REENTRANT -Wl,-z,relro  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o libglib.la -rpath /usr/lib64 -version-info 0:10:0 -release 1.2 -export-dynamic garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.lo ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo
libtool: link: gcc -shared  -fPIC -DPIC  .libs/garray.o .libs/gcache.o .libs/gcompletion.o .libs/gdataset.o .libs/gdate.o .libs/gerror.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/giounix.o .libs/glist.o .libs/gmain.o .libs/gmem.o .libs/gmessages.o .libs/gmutex.o .libs/gnode.o .libs/gprimes.o .libs/grel.o .libs/gscanner.o .libs/gslist.o .libs/gstrfuncs.o .libs/gstring.o .libs/gtimer.o .libs/gtree.o .libs/gutils.o    -O2 -g -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -mcet -Wl,-z -Wl,relro   -Wl,-soname -Wl,libglib-1.2.so.0 -o .libs/libglib-1.2.so.0.0.10

Any idea how to get libtool to pass -specs to gcc?

I should mention that this is an ancient package so I use the system libtool rather than the one shipped with the original source, which may be a related thing.

Comment 2 Florian Weimer 2018-02-24 14:21:39 UTC
(In reply to Paul Howarth from comment #1)
> Any idea how to get libtool to pass -specs to gcc?

I asked about this recently here:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/FILPDYHXHOUOYFP65PS7SJNH5OD4RBUS/

I do not know yet how this is supposed to work.

Comment 3 Jan Kurik 2018-08-14 10:14:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 4 Ben Cotton 2020-02-11 15:48:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 5 Fedora Program Management 2021-04-29 15:53:53 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
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 '32'.

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 32 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 6 Ben Cotton 2021-08-10 12:45:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 7 Paul Howarth 2022-02-15 09:14:08 UTC
Seems to be working now:
(https://kojipkgs.fedoraproject.org/packages/glib/1.2.10/64.fc36/data/logs/x86_64/build.log)

/usr/bin/libtool --mode=link gcc  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -D_REENTRANT -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/.package_note-glib-1.2.10-64.fc36.x86_64.ld -o libglib.la -rpath /usr/lib64 -version-info 0:10:0 -release 1.2 -export-dynamic garray.lo gcache.lo gcompletion.lo gdataset.lo gdate.lo gerror.lo ghash.lo ghook.lo giochannel.lo giounix.lo glist.lo gmain.lo gmem.lo gmessages.lo gmutex.lo gnode.lo gprimes.lo grel.lo gscanner.lo gslist.lo gstrfuncs.lo gstring.lo gtimer.lo gtree.lo gutils.lo  
libtool: link: gcc -shared  -fPIC -DPIC  .libs/garray.o .libs/gcache.o .libs/gcompletion.o .libs/gdataset.o .libs/gdate.o .libs/gerror.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/giounix.o .libs/glist.o .libs/gmain.o .libs/gmem.o .libs/gmessages.o .libs/gmutex.o .libs/gnode.o .libs/gprimes.o .libs/grel.o .libs/gscanner.o .libs/gslist.o .libs/gstrfuncs.o .libs/gstring.o .libs/gtimer.o .libs/gtree.o .libs/gutils.o    -O2 -flto=auto -g -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT -Wl,/builddir/build/BUILD/.package_note-glib-1.2.10-64.fc36.x86_64.ld   -Wl,-soname -Wl,libglib-1.2.so.0 -o .libs/libglib-1.2.so.0.0.10

Comment 8 Ben Cotton 2022-11-29 16:45:33 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
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
'version' of '35'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Ben Cotton 2022-12-13 15:12:28 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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