问题
I am trying to compile Tizen source code. The compilation tools uses the rpm build environment. While compiling specific package I'm getting an rpm build issue "Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)"
Here is my build log
Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_PushUrlRequestListener.cpp.o
[ 8s] [ 69%] Building CXX object CMakeFiles/osp-messaging.dir src/FMsg_WapPushManagerImpl.cpp.o
[ 8s] [ 71%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_WapPushMessageImpl.cpp.o
[ 8s] [ 73%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_ComposerEvent.cpp.o
[ 8s] [ 75%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_ComposerEventArg.cpp.o
[ 8s] [ 77%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_RecipientListImpl.cpp.o
[ 8s] [ 79%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsEvent.cpp.o
[ 8s] [ 81%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsEventArg.cpp.o
[ 9s] [ 83%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsManagerImpl.cpp.o
[ 9s] [ 85%] [ 87%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsMessageImpl.cpp.o
[ 9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_CbsChannelImpl.cpp.o
[ 9s] [ 89%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_CbsMessageImpl.cpp.o
[ 9s] [ 91%] [ 93%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_EtwsPrimaryNotificationImpl.cpp.o
[ 9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MsgUtil.cpp.o
[ 9s] [ 95%] [ 97%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsMmsCallbackHandler.cpp.o
[ 9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MessagingMessageTypes.cpp.o
[ 9s] [100%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MessagingIpcProxy.cpp.o
[ 10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingMessageTypes.cpp:24:0:
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:35:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:37:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:38:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:42:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:43:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:45:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc /FMsg_MessagingMessageTypes.h:46:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:49:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:50:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:51:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:52:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:53:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:54:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:55:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:56:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:61:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:63:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:64:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingMessageTypes.cpp:24:0:
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:65:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] make[2]: *** [CMakeFiles/osp-messaging.dir/src/FMsg_MessagingMessageTypes.cpp.o] Error 1
[ 10s] make[2]: *** Waiting for unfinished jobs....
[ 10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:31:0:
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:35:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:37:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:38:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:42:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:43:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:45:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:46:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:49:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:50:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:51:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:52:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:53:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:54:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:55:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:56:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:61:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:63:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:64:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:31:0:
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:65:1: error: 'MessagingMsgStart' was not declared in this scope
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp: In member function 'virtual void Tizen::Messaging::_MessagingProxy::OnIpcResponseReceived(Tizen::Io::_IpcClient&, const IPC::Message&)':
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:122:2: error: duplicate case value
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:123:2: error: duplicate case value
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:124:2: error: duplicate case value
[ 10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[ 10s] make[2]: *** [CMakeFiles/osp-messaging.dir/src/FMsg_MessagingIpcProxy.cpp.o] Error 1
[ 11s] make[1]: *** [CMakeFiles/osp-messaging.dir/all] Error 2
[ 11s] make: *** [all] Error 2
[ 11s] error: Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)
[ 11s]
[ 11s]
[ 11s] RPM build errors:
[ 11s] Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)
I'm using the following spec file
%define _debug_package %{nil}
%define __strip /bin/true
Name: osp-messaging
Summary: osp messaging library
Version: 1.2.2.0
Release: 2
Group: System/Libraries
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(chromium)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(msg-service)
BuildRequires: pkgconfig(push)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(email-service)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libwbxml2)
BuildRequires: pkgconfig(osp-appfw)
BuildRequires: osp-appfw-internal-devel
BuildRequires: pkgconfig(osp-net)
BuildRequires: osp-net-internal-devel
BuildRequires: pkgconfig(osp-bluetooth)
BuildRequires: pkgconfig(osp-nfc)
BuildRequires: pkgconfig(osp-json)
BuildRequires: pkgconfig(osp-shell)
# runtime requires
Requires: osp-appfw
Requires: osp-bluetooth
Requires: osp-nfc
Requires: osp-json
Requires: osp-shell
%description
osp messaging library
%package devel
Summary: osp messaging library (Development)
Group: TO_BE/FILLED_IN
Requires: %{name} = %{version}-%{release}
%description devel
osp messaging library (DEV)
%package internal-devel
Summary: osp messaging library (Internal)
Group: TO_BE/FILLED_IN
Requires: %{name} = %{version}-%{release}
%description internal-devel
osp messaging library (Internal-DEV)
%package debug
Summary: osp messaging library (Development)
Group: TO_BE/FILLED_IN
Requires: %{name} = %{version}-%{release}
%description debug
osp messaging library (DEV)
%prep
%setup -q
%build
%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%ifarch %{ix86}
%if 0%{?simulator}
CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%else
CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%endif
%else
%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%else
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed v-fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%endif
%endif
# Call make instruction with smp support
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/license
cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
%make_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%manifest osp-messaging.manifest
/usr/share/license/%{name}
%{_libdir}/osp/*.so*
%files devel
%{_includedir}/osp/*.h
%{_libdir}/pkgconfig/osp-messaging.pc
%files internal-devel
%{_includedir}/osp/messaging/*.h
%files debug
%{_libdir}/osp/debug/*.so*
The error is related to rpm build, can anyone help me in solving this rpm error?
回答1:
The above errors are because of linking of files at runtime by the rpm build environment and hence it was showing errors under build
section of the spec file
To solve the above errors add the following line at the beginning of the spec file of package
%define __debug_package %{nil}
If there is already a similar code(%define ^_debug_package %{nil}) replace it with the above code
The errors in the osp
packages can also be solved by adding the above line to the spec file.
And also make sure that you use the release repo URL for compilation, you can use the following release repo URL
http://download.tizen.org/releases/2.2/tizen-2.2
来源:https://stackoverflow.com/questions/21595748/bad-exit-status-from-var-tmp-rpm-tmp-b1dgat-build