https://bugzilla.redhat.com/show_bug.cgi?id=1703284
--- Comment #4 from Robert-André Mauchin zebob.m@gmail.com --- It seems autoreconf fails
autogen.sh: start libtoolize to get ltmain.sh libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autogen.sh: reconfigure with autoreconf BUILDSTDERR: autoreconf: Entering directory `.' BUILDSTDERR: autoreconf: configure.ac: not using Gettext BUILDSTDERR: autoreconf: running: aclocal -I m4 --force -I m4 BUILDSTDERR: sh: git: command not found BUILDSTDERR: configure.ac:122: error: AC_INIT should be called with package and version arguments BUILDSTDERR: /usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from... BUILDSTDERR: configure.ac:122: the top level BUILDSTDERR: autom4te: /usr/bin/m4 failed with exit status: 1 BUILDSTDERR: aclocal: error: echo failed with exit status: 1 BUILDSTDERR: autoreconf: aclocal failed with exit status: 1 autogen.sh: autoreconf has failed (1), let's do it manually autogen.sh: configure nbd-runner-0.3 BUILDSTDERR: sh: git: command not found BUILDSTDERR: configure.ac:122: error: AC_INIT should be called with package and version arguments BUILDSTDERR: /usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from... BUILDSTDERR: configure.ac:122: the top level BUILDSTDERR: autom4te: /usr/bin/m4 failed with exit status: 1 BUILDSTDERR: aclocal: error: echo failed with exit status: 1 BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.97vMHt (%build) BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.97vMHt (%build)
even with git as a BR it fails too.
You need to create a VERSION file manually:
%build echo v%{version} > VERSION
- Build still has error afterwards:
checking for suffix of executables... BUILDSTDERR: checking whether we are cross compiling... configure: error: in `/builddir/build/BUILD/nbd-runner-0.3': BUILDSTDERR: configure: error: cannot run C compiled programs. BUILDSTDERR: If you meant to cross compile, use `--host'. BUILDSTDERR: See `config.log' for more details
We need to redefine cflags to use fPIC:
./autogen.sh export CFLAGS="%build_cflags -fPIC" export CPPFLAGS="%build_cxxflags -fPIC" %configure %{?_without_tirpc} %{?_without_gluster} %{?_without_azblk} sed -i "/CLFAGS/d" configure %make_build
- The build still fails because there is no library generated in /usr/lib64/nbd-runner/:
+ find /builddir/build/BUILDROOT/nbd-runner-0.3-1.fc31.x86_64/usr/lib64/nbd-runner/ -name '*.a' -delete BUILDSTDERR: find: '/builddir/build/BUILDROOT/nbd-runner-0.3-1.fc31.x86_64/usr/lib64/nbd-runner/': No such file or directory
It seems they are only available in the master branch, not the 0.3 release