Re: [PATCH rdma-core 9/9] rpm: Include static libraries in the build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/25/18 6:47 PM, Nicolas Morey-Chaisemartin wrote:
>
> On 10/25/18 6:42 PM, Jarod Wilson wrote:
>>
>> Something like this:
>>
>> diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
>> index c281c5fa..19154ff5 100644
>> --- a/redhat/rdma-core.spec
>> +++ b/redhat/rdma-core.spec
>> @@ -11,6 +11,8 @@ License: GPLv2 or BSD
>>  Url: https://github.com/linux-rdma/rdma-core
>>  Source: rdma-core-%{version}.tgz
>>
>> +%define with_static %{?_with_static: 1} %{?!_with_static: 0}
>> +
> You could use:
> %bcond_with static_libs
> The code is simpler but deceiving as this means that "without" is the default.
>
>>  BuildRequires: binutils
>>  BuildRequires: cmake >= 2.8.11
>>  BuildRequires: gcc
>> @@ -233,6 +235,9 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand.
>>           -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \
>>           -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} \
>>           -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir} \
>> +%if %{with_static}
>> +        -DENABLE_STATIC=1 \
>> +%endif
>>           %{EXTRA_CMAKE_FLAGS}
>>  %make_jobs
>>
> Was looking into that and for some weird reason it fails on centos7:
> + /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -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 -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -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/libexec -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/var/lib -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/rc.d/init.d -DCMAKE_INSTALL_RUNDIR:PATH=/run
> -DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/doc/rdma-core-21.0 -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=/usr/lib/udev/rules.d -DENABLE_STATIC=1 '%{EXTRA_CMAKE_FLAGS}'
> CMake Error: The source directory "/home/nmorey/rpmbuild/BUILD/rdma-core-21.0/%{EXTRA_CMAKE_FLAGS}" does not exist.
>
> Seems the RPM version is handling something badly..
>
> Nicolas
>

Scratch that. It works your way. Something does not like bcond on centos though

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux