Description of problem: Supermin is a short-lived process so it's not really a problem, but it fails to build anyway with hardening flags because there is a small statically linked C binary in the build: The error is peculiar ... The static binary is compiled and linked fine, and then stripped, but there is a test (in supermin src/Makefile.am) that the final binary is statically linked, but that fails: *** error: init is not statically linked The test that fails is: @file $< | grep -isq static || \ (echo "*** error: init is not statically linked"; exit 1) Possibly this test is wrong. Complete build failure: http://koji.fedoraproject.org/koji/taskinfo?taskID=9179157
Created attachment 1001905 [details] build.log Sorry, I was looking at the wrong error. The actual error is: gcc -static -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -static -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o init init-init.o /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/5.0.0/../../../../lib64/libc.a(libc-start.o): relocation R_X86_64_32 against `_dl_starting_up' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/5.0.0/../../../../lib64/libc.a: error adding symbols: Bad value Note that we are compiling statically, so the error is bogus. See attached complete build log.
Hi Richard, I would like to help fix this. Can you please help me understand how should I proceed on this?
(In reply to Prabhjyot Sodhi[:psd] from comment #2) > Hi Richard, > I would like to help fix this. > Can you please help me understand how should I proceed on this? I don't understand the question.
can we not compile to the lib with -fPIC?
Fixed by: http://pkgs.fedoraproject.org/cgit/supermin.git/commit/
The URL about should be: http://pkgs.fedoraproject.org/cgit/supermin.git/commit/?id=8c0345898be04eea1bc6ef6684ffd6a7d04ddd2c
What happens when you put this in under %build section: CFLAGS="$RPM_OPT_FLAGS -fPIC -pie -Wl,-z,relro -Wl,-z,now" CXXFLAGS="$RPM_OPT_FLAGS -fPIC -pie -Wl,-z,relro -Wl,-z,now" export CFLAGS export CXXFLAGS
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
(In reply to Moez Roy from comment #7) > What happens when you put this in under %build section: > > CFLAGS="$RPM_OPT_FLAGS -fPIC -pie -Wl,-z,relro -Wl,-z,now" > CXXFLAGS="$RPM_OPT_FLAGS -fPIC -pie -Wl,-z,relro -Wl,-z,now" > > export CFLAGS > export CXXFLAGS The answer is the same error. Note that init is a *static linked binary*.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. 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 '23'. 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 23 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.
*** This bug has been marked as a duplicate of bug 1287743 ***