Bug 1165784

Summary: Fail to build binary from srpm
Product: Red Hat Enterprise Linux 7 Reporter: Vaclav Ehrlich <vehrlich>
Component: spice-xpiAssignee: Christophe Fergeau <cfergeau>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.1CC: cfergeau, rbalakri, tpelka
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-xpi-2.8-8.el7 Doc Type: Bug Fix
Doc Text:
No doc needed
Story Points: ---
Clone Of:
: 1170226 (view as bug list) Environment:
Last Closed: 2015-03-05 07:59:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1170226    

Description Vaclav Ehrlich 2014-11-19 17:09:34 UTC
Description of problem:
When try to build a binary from srpm, process ends with error.

Version-Release number of selected component (if applicable):
spice-xpi-2.8-7.el7

How reproducible:
Always

Steps to Reproduce:
1.get srpm and try to build binary

Actual results:
Build process ends with error:

In file included from nsScriptablePeer.cpp:54:0:
/usr/include/xulrunner-31.2.0/nsError.h:187:1: warning: identifier 'static_assert' is a keyword in C++11 [-Wc++0x-compat]
static_assert(((nsresult)0) < ((nsresult)-1),
^
In file included from nsScriptablePeer.cpp:54:0:
/usr/include/xulrunner-31.2.0/nsError.h:187:14: error: expected constructor, destructor, or type conversion before '(' token
static_assert(((nsresult)0) < ((nsresult)-1),
            ^
/usr/include/xulrunner-31.2.0/nsError.h:189:14: error: expected constructor, destructor, or type conversion before '(' token
static_assert(sizeof(nsresult) == sizeof(uint32_t),
make[5]: *** [libnsISpicec_la-nsScriptablePeer.lo] Error 1

Expected results:
build process is finished without errors and new binary is built 

Additional info:
Build process launched on TPS servers

Comment 2 Christophe Fergeau 2014-11-20 10:48:26 UTC
Couple of issues here. With xulrunner 31, this patch is needed (but it's not related to your problem, just dropping it here for the record):

diff --git a/SpiceXPI/src/plugin/Makefile.am b/SpiceXPI/src/plugin/Makefile.am
index 08d89d7..6ad8384 100644
--- a/SpiceXPI/src/plugin/Makefile.am
+++ b/SpiceXPI/src/plugin/Makefile.am
@@ -61,10 +61,10 @@ nsISpicec.xpt: nsISpicec.idl
 	$(AM_V_GEN)$(XPIDL) -m typelib -I $(SDK_INCLUDE_DIR) $<
 else
 nsISpicec.h: nsISpicec.idl
-	$(AM_V_GEN)$(PYTHON) `pkg-config --variable=sdkdir libxul`/sdk/bin/header.py --cachedir . -I $(SDK_INCLUDE_DIR) $< -o $@
+	$(AM_V_GEN)$(PYTHON) `pkg-config --variable=libdir libxul`/header.py --cachedir . -I $(SDK_INCLUDE_DIR) $< -o $@
 
 nsISpicec.xpt: nsISpicec.idl
-	$(AM_V_GEN)$(PYTHON) `pkg-config --variable=sdkdir libxul`/sdk/bin/typelib.py --cachedir . -I $(SDK_INCLUDE_DIR) $< -o $@
+	$(AM_V_GEN)$(PYTHON) `pkg-config --variable=libdir libxul`/typelib.py --cachedir . -I $(SDK_INCLUDE_DIR) $< -o $@
 endif
 
 BUILT_SOURCES =					\
diff --git a/configure.ac b/configure.ac
index e49e683..d251a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,8 +67,8 @@ AC_SUBST(XPIDL)
 
 if ! test -x "$XPIDL"; then
   AM_PATH_PYTHON
-  AC_CHECK_FILE([`pkg-config --variable=sdkdir libxul`/sdk/bin/header.py])
-  AC_CHECK_FILE([`pkg-config --variable=sdkdir libxul`/sdk/bin/typelib.py])
+  AC_CHECK_FILE([`pkg-config --variable=libdir libxul`/header.py])
+  AC_CHECK_FILE([`pkg-config --variable=libdir libxul`/typelib.py])
 fi
 
 XUL_INCLUDEDIR=`pkg-config --variable=includedir libxul`

Then you need to have -std=gnu++1y added to your CXXFLAGS to avoid the static_assert errors you mention.

Comment 10 errata-xmlrpc 2015-03-05 07:59:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0355.html