Message ID | 1489099998.2597.16.camel@sandisk.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
On Thu, Mar 09, 2017 at 10:53:31PM +0000, Bart Van Assche wrote: > Sorry, I used the wrong base for the diff command. How about the patch below > to fix the SuSE build: Are you using an older suse? I just updated my tumbleweed image and it built fine with HEAD. What is in your /etc/rpm/macros.cmake? All the suse's I looked at have this in that file: %cmake_install \ DESTDIR=%{buildroot} %__builder install -C %__builddir It comes from here (tumbleweed): builder-40f0d1607cec:/etc/rpm # rpm -qf /etc/rpm/macros.cmake cmake-3.7.2-1.1.x86_64 (13.2): bash-4.2# rpm -qf /etc/rpm/macros.cmake cmake-3.0.2-6.1.x86_64 ? I also checked and it built OK on OpenSuse 13.2 So.. I'm confused what we are trying to fix here? :) Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2017-03-09 at 16:04 -0700, Jason Gunthorpe wrote: > On Thu, Mar 09, 2017 at 10:53:31PM +0000, Bart Van Assche wrote: > > Sorry, I used the wrong base for the diff command. How about the patch below > > to fix the SuSE build: > > Are you using an older suse? I just updated my tumbleweed image and it > built fine with HEAD. > > What is in your /etc/rpm/macros.cmake? All the suse's I looked at have > this in that file: > > %cmake_install \ > DESTDIR=%{buildroot} %__builder install -C %__builddir > > It comes from here (tumbleweed): > > builder-40f0d1607cec:/etc/rpm # rpm -qf /etc/rpm/macros.cmake > cmake-3.7.2-1.1.x86_64 > > (13.2): > > bash-4.2# rpm -qf /etc/rpm/macros.cmake > cmake-3.0.2-6.1.x86_64 > > ? > > I also checked and it built OK on OpenSuse 13.2 > > So.. I'm confused what we are trying to fix here? :) Hello Jason, Without that patch building an RPM fails against a recent version of Tumbleweed: $ rpm -qf /etc/issue.net openSUSE-release-20170304-1.1.x86_64 $ rpm -qf /etc/rpm/macros.cmake cmake-3.7.2-1.1.x86_64 $ cat ./build-rpm.sh #!/bin/sh name=rdma-core version=$(sed -n 's/^Version:[[:blank:]]*//p' rdma-core.spec) rpmtopdir=$PWD/rpmbuilddir git archive --prefix rdma-core-${version}/ --output ${name}-${version}.tgz HEAD && rm -rf ${rpmtopdir} && mkdir -p ${rpmtopdir}/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && cp ${name}-${version}.tgz ${rpmtopdir}/SOURCES && rpmbuild --define="%_topdir ${rpmtopdir}" -ba ${name}.spec $ ./build-rpm.sh [ ... ] -- Build files have been written to: rdma-core/rpmbuilddir/BUILD/rdma-core-13/build + /usr/bin/make -j4 VERBOSE=1 make: *** No targets specified and no makefile found. Stop. error: Bad exit status from /var/tmp/rpm-tmp.4zaz5Y (%build) Bart.-- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Mar 09, 2017 at 11:12:43PM +0000, Bart Van Assche wrote: > Without that patch building an RPM fails against a recent version of > Tumbleweed: I don't get it, it is fine for me - just rebuilt my local docker image from scratch with today's stuff to be certain: $ rpm -qf /etc/issue.net openSUSE-release-20170308-1.1.x86_64 Is your macros.cmake unmodified? ea1f4008e57762c8c422e2562b2bff8f /etc/rpm/macros.cmake It seems like something else is going on with your system, I wonder if your system could have a conflicting rpm macro? The docker image is very minimal... > $ cat ./build-rpm.sh > #!/bin/sh > name=rdma-core > version=$(sed -n 's/^Version:[[:blank:]]*//p' rdma-core.spec) > rpmtopdir=$PWD/rpmbuilddir > git archive --prefix rdma-core-${version}/ --output ${name}-${version}.tgz HEAD && > rm -rf ${rpmtopdir} && > mkdir -p ${rpmtopdir}/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && > cp ${name}-${version}.tgz ${rpmtopdir}/SOURCES && > rpmbuild --define="%_topdir ${rpmtopdir}" -ba ${name}.spec I ran those commands by hand and had no problem either: [..] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Xgc1tl + umask 022 + cd /home/jgg/rpmbuild/rpmbuilddir/BUILD + /usr/bin/rm -rf /home/jgg/rpmbuild/rpmbuilddir/BUILDROOT/rdma-core-13-1.x86_64 ++ dirname /home/jgg/rpmbuild/rpmbuilddir/BUILDROOT/rdma-core-13-1.x86_64 + /usr/bin/mkdir -p /home/jgg/rpmbuild/rpmbuilddir/BUILDROOT + /usr/bin/mkdir /home/jgg/rpmbuild/rpmbuilddir/BUILDROOT/rdma-core-13-1.x86_64 + cd rdma-core-13 + find . -name CMakeLists.txt -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE /}' '{}' + + mkdir -p build + cd build + /usr/bin/cmake /home/jgg/rpmbuild/rpmbuilddir/BUILD/rdma-core-13/. -GNinja -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_CXX_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG' '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules -DCMAKE_MODULE_LINKER_FLAGS= -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_BINDIR:PATH=/usr/bin -DCMAKE_INSTALL_SBINDIR:PATH=/usr/sbin -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/lib -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/usr/com -DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include -DCMAKE_INSTALL_INFODIR:PATH=/usr/share/info -DCMAKE_INSTALL_MANDIR:PATH=/usr/share/man -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/usr/lib/systemd/system -DCMAKE_INSTALL_INITDDIR:PATH=/etc/init.d -DCMAKE_INSTALL_RUNDIR:PATH=/run -DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/doc/packages/rdma-core-13 -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=/usr/lib/udev/rules.d [..] + ninja -v -j8 I don't know what to say.. If you want to duplicate what I am looking at install docker and do: $ buildlib/cbuild build-images tumbleweed $ buildlib/cbuild pkg tumbleweed --run-shell Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2017-03-09 at 16:23 -0700, Jason Gunthorpe wrote: > It seems like something else is going on with your system, I wonder if > your system could have a conflicting rpm macro? That might be what's causing trouble ... both /etc/rpm/macros.kde4 and /etc/rpm/macros.qt5 contain the following definition: %make_jobs %{__make} %{?_smp_mflags} VERBOSE=1 How about explicitly defining %make_jobs in the rdma-core spec to work around this? Thanks, Bart.-- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/rdma-core.spec b/rdma-core.spec index 6519bc37..aa486371 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -27,6 +27,8 @@ BuildRequires: valgrind-devel BuildRequires: ninja,make %define __builder ninja # cmake_install,make_jobs is specified by opensuse +%define cmake cmake +%define cmake_install DESTDIR=%{buildroot} make install # Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags # which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style