Testing #255

Repair compilation under JCNS linux, OpenSuse 12.3

Added by pospelov over 7 years ago. Updated over 7 years ago.

Status:ArchivedStart date:06 Apr 2013
Priority:HighDue date:
Assignee:pospelov% Done:

0%

Category:-
Target version:Sprint 12

Description

Also provide python bindings generation on these systems

History

#1 Updated by pospelov over 7 years ago

  • Status changed from Backlog to Sprint

#2 Updated by pospelov over 7 years ago

There is strange behavior of gcc 4.1.2 (sic!) on JCNS machines.

Compilation crashes on lines like
StochasticSampledParameter par2(StochasticDoubleGaussian(radius2, sigma2));

where constructor is declared
StochasticSampledParameter(const StochasticDoubleGaussian &par);

Compiler complains about private copy constructor of StochasticDoubleGaussian. In principle compiler is right, because StochasticDoubleGaussian is indeed ICloneable object.

The solution is to split on two lines
StochasticDoubleGaussian x(radius2, sigma2)
StochasticSampledParameter par2(x);

The question: why our modern clang, gcc 4.7 doesn't have such problem?
Because in principle, what we are doing by passing temporary object without having copy constructor is wrong.

#3 Updated by pospelov over 7 years ago

Another problem of JCNS old 4.1.2 compiler.
If method is declared inline inside class definition, but defined in source file, then linker can't find method in shared library.
Conclusion: use inline only as in example below

class A {
void method();
}
// in same header
inline void A::method() {
bla-bla
}

or

class A {
void method() { bla-bla; }
}

and not

class A {
inline void method();
}
-> in source file
void A::method() {
bla-bla
}

(will not link)

or

class A {
inline void method() { bla-bla; }
}

(inline is unnecessary, will be inlined by definition

#4 Updated by pospelov over 7 years ago

  • Status changed from Sprint to Resolved

#5 Updated by herck over 7 years ago

  • Status changed from Resolved to Archived

Also available in: Atom PDF