On 03/06/13 19:18, Jason Parker wrote:
>
>
> On 06/03/2013 12:03 PM, Daniel Pocock wrote:
>> I tried building manually from the source RPM
>>
>> Before running rpmbuild, I installed libsrtp-devel and I notice that
>> res_srtp.so is generated during the build
>>
>> However, the rpmbuild fails for other reasons (see the other email I
>> sent to the list about mISDNutils-devel and other spec file errors)
>>
>> Can you confirm the exact procedure you recommend for rpmbuild on a
>> CentOS6 system
> rpmbuild --rebuild --without tds --without misdn somepackage.src.rpm
>
Now trying it on a fresh VM (CentOS 6 + EPEL6, freshly built)
I have these errors during installation of build dependencies:
Installing : kmod-dahdi-linux-fwload-vpmadt032-2.6.2-1_centos6.2.6.32
20/73
WARNING:
/lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_unregister
WARNING:
/lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_register
WARNING:
/lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_unregister
WARNING:
/lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_register
and then rpmbuild fails with:
checking for gcc... no
checking for cc... no
configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
error: Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)
so I think to be added to the build dependencies in the spec file.
Then there is a more cryptic failure:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
error: Bad exit status from /var/tmp/rpm-tmp.q7wr5n (%build)
config.log reveals that g++ is missing. The build dependency is gcc-c++
- I install that and it fails due to missing make
Later, there is another failure due to missing subversion.
Altogether, these are the missing lines for the spec file:
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: subversion
although I would recommend not having a build dependency on SVN or
network access, some people like to build on secured machines without
network access.
Eventually, I end up with the same failure I had before:
RPM build errors:
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_adaptive_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cel_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/func_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_config_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_odbc.so
Now I've tried:
rpmbuild --rebuild \
--without tds \
--without misdn \
--without odbc \
asterisk-11.4.0-1_centos6.src.rpm
and on the rebuild, I get
gzip: ./usr/share/man/man8/autosupport.8 already exists; do you wish to
overwrite (y or n)?
gzip: ./usr/share/man/man8/astgenkey.8 already exists; do you wish to
overwrite (y or n)?
which suggests that `make clean' didn't really clean up after the last
attempt
Finally, I get:
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64
error: Installed (but unpackaged) file(s) found:
/usr/lib64/asterisk/modules/func_speex.so
/usr/lib64/asterisk/modules/res_srtp.so
RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/lib64/asterisk/modules/func_speex.so
/usr/lib64/asterisk/modules/res_srtp.so
so I added those two items to the spec file and finally I have a build.
I attach a diff for fixing the spec file, it fixes all these issues
except the `make clean'
Regards,
Daniel
--- SPECS/asterisk.spec.orig 2013-06-03 22:52:12.302227936 +0200
+++ SPECS/asterisk.spec 2013-06-03 23:02:33.899224528 +0200
@@ -70,6 +70,10 @@
Requires: %{name}-doc = %{actversion}
Requires: %{name}-voicemail = %{actversion}-%{release}
Requires: asterisk-sounds-core-en-gsm
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: subversion
BuildRequires: sqlite-devel
BuildRequires: ncurses-devel
BuildRequires: libxml2-devel
@@ -616,7 +620,7 @@
make %{makeflags} 2> err
mv err %{name}-sources-%{version}-%{release}.make.err
-mv %{name}-sources-%{version}-%{release}.make.err /var/log/
+mv %{name}-sources-%{version}-%{release}.make.err /tmp/
###################################################################
#
@@ -675,7 +679,7 @@
%clean
cd $RPM_BUILD_DIR
%{__rm} -rf %{name}-%{version}
-%{__rm} -rf /var/log/%{name}-sources-%{version}-%{release}.make.err
+%{__rm} -rf /tmp/%{name}-sources-%{version}-%{release}.make.err
%{__rm} -rf $RPM_BUILD_ROOT
###################################################################
@@ -877,6 +881,7 @@
%{_libdir}/asterisk/modules/res_security_log.so
%{_libdir}/asterisk/modules/res_smdi.so
%{_libdir}/asterisk/modules/res_speech.so
+%{_libdir}/asterisk/modules/res_srtp.so
%{_libdir}/asterisk/modules/res_stun_monitor.so
%{_libdir}/asterisk/modules/res_timing_pthread.so
%{_libdir}/asterisk/modules/res_xmpp.so
@@ -1230,6 +1235,7 @@
%files speex
%defattr(-, root, root)
%{_libdir}/asterisk/modules/codec_speex.so
+%{_libdir}/asterisk/modules/func_speex.so
%endif
#
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users