Issue 76 in casacore: Issues with complex on OSX Mavericks / libc++

3 views
Skip to first unread message

casa...@googlecode.com

unread,
Apr 5, 2015, 4:34:31 PM4/5/15
to casacor...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Milestone-Release1.4

New issue 76 by T.J.Dijk...@gmail.com: Issues with complex on OSX Mavericks
/ libc++
https://code.google.com/p/casacore/issues/detail?id=76

What steps will reproduce the problem?
1. Download casacore, install dependencies (particularly gcc for fortran)
with brew
2. cmake ../src/casacore (note that the C compiler is LLVM, and standard
library is libc++ instead of libstdc++)
3. make

What is the expected output? What do you see instead?
/Users/tammo/opt/casacore/trunk/src/casacore/../casacore/casa/BasicSL/Complex.h:177:16:
error:
invalid operands to binary expression
('const Complex' (aka 'const complex<float>') and 'const Complex')
{ return left==right ? True : norm(left) >= norm(right); }
~~~~^ ~~~~~
/Users/tammo/opt/casacore/trunk/src/casacore/../casacore/casa/BasicSL/Complex.h:177:35:
error:
no matching function for call to
'norm'
{ return left==right ? True : norm(left) >= norm(right); }
^~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:947:1:
note:
candidate function not viable: cannot convert
argument of incomplete type 'const Complex' (aka 'const
complex<float>') to 'long double'
norm(long double __re)
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:954:1:
note:
candidate function not viable: cannot convert
argument of incomplete type 'const Complex' (aka 'const
complex<float>') to 'double'
norm(double __re)
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:973:1:
note:
candidate function not viable: cannot convert
argument of incomplete type 'const Complex' (aka 'const
complex<float>') to 'float'
norm(float __re)
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:936:1:
note:
candidate template ignored: could not match
'std::__1::complex' against 'std::complex'
norm(const complex<_Tp>& __c)
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:963:5:
note:
candidate template ignored: disabled by
'enable_if' [with _Tp = std::complex<float>]
is_integral<_Tp>::value,
^


Please provide any additional information below.

Possibly linked to this issue:
http://stackoverflow.com/questions/26740071/understanding-operator-lookup-which-compiler-is-correct

A possible fix is to compile with -stdlib=libstdc++ but that may give
problems when linking with programs that were built with the OS default
libc++. Note that the default has changed from libstdc++ on OSX 10.9 to
libc++ on OSX 10.10.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

casa...@googlecode.com

unread,
Apr 5, 2015, 4:49:05 PM4/5/15
to casacor...@googlegroups.com

Comment #1 on issue 76 by T.J.Dijk...@gmail.com: Issues with complex on OSX
I'll post this on the github tracker,
https://github.com/casacore/casacore/issues/85
Reply all
Reply to author
Forward
0 new messages