https://bugzilla.redhat.com/show_bug.cgi?id=1278676
fujiwara tfujiwar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|ibus-anthy |rpm Assignee|tfujiwar@redhat.com |packaging-team-maint@redhat | |.com
--- Comment #2 from fujiwara tfujiwar@redhat.com --- I think the package side has not changed anything. This problem does not happen in Fedora 22 or older. This problem happens in Fedora 23 or later.
If configure.ac includes "AC_PROG_CC", this problem happens:
- The tarball only includes configure.ac % zcat ../SOURCES/a-1.5.8.tar.gz | tar tfv - drwxr-xr-x root/root 0 2016-01-22 16:22 a-1.5.8/ -rw-r--r-- root/root 1207 2016-01-22 16:21 a-1.5.8/configure.ac
- configure.ac has only "AC_PROG_CC" and "AC_INIT". % cat ../BUILD/a-1.5.8/configure.ac AC_INIT([ibus-anthy], [ibus_anthy_version], [https://github.com/ibus/ibus-anthy/issues%5D,%5Bibus-anthy]) AC_PROG_CC
- a.spec runs only "autoconf" and "%configure". Name: a Version: 1.5.8
%prep %setup -q
%build autoreconf %configure
Then this problem always happen: % rpmbuild -bb --define "optflags -g" a.spec checking whether we are cross compiling... configure: error: in `/root/rpmbuild/BUILD/a-1.5.8': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details error: Bad exit status from /var/tmp/rpm-tmp.969HDg (%build)
Why rpmbuild runs LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' forcibly?
The default CFLAGS is no problem: CFLAGS='-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'
But If I change optflags, the problem happens.
I have no idea to fix this in each package side.