Bug 770230 - js doesn't compile on ARM due to "Your compiler does not follow the C++ specification for temporary object destruction order." error
js doesn't compile on ARM due to "Your compiler does not follow the C++ speci...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2011-12-24 09:29 EST by Peter Robinson
Modified: 2012-01-26 09:42 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-26 09:42:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Peter Robinson 2011-12-24 09:29:49 EST
js fails to build on ARM due to the following error during configure:

configure: error: Your compiler does not follow the C++ specification for temporary object destruction order.
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.y3Ssej (%prep)
    Bad exit status from /var/tmp/rpm-tmp.y3Ssej (%prep)
Child returncode was: 1

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=238249

Looking at the configure.in test case its documented as:

dnl ========================================================
dnl Test for correct temporary object destruction order
dnl ========================================================
dnl We want to make sure the compiler follows the C++ spec here as 
dnl xpcom and the string classes depend on it (bug 235381).
Comment 1 Pavel Alexeev 2012-01-01 16:08:10 EST
Are you think it is incorrect check? I think it is gcc issue on arm. Reassigning.
Comment 2 Jakub Jelinek 2012-01-01 16:46:44 EST
Can you post the relevant config.log snippet (what compiler messages were emitted if any, if it was a compile time failure or runtime failure)?

Can you compile:
extern "C" void exit(int);
class A {
public:
  A(int& x) : mValue(x) {}
  ~A() { mValue--; }
  operator char**() { return 0; }
private:
  int& mValue;
};
void func(char **arg) {}
int m=2;
void test() {
  func(A(m));
  if (m==1) m = 0;
}
int main() {
  test();
  return(m);
}

and run it, see what exit status it returned with?
Comment 3 Peter Robinson 2012-01-26 09:42:51 EST
Fixed. Issue in js.

Note You need to log in before you can comment on or make changes to this bug.