View Issue Details

IDProjectCategoryView StatusLast Update
0000717OpenFOAMBugpublic2013-03-14 09:08
Reporteruser91Assigned Touser2 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.3
Summary0000717: Clang fails to build finiteVolume, reports type conversion is ambiguous in file cylindricalInletVelocityFvPatchVectorField.C
DescriptionClang reports an error when building finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity. The error is:

SOURCE=fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C ; clang++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -O3 -DNoRepository -ftemplate-depth-100 -I/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/triSurface/lnInclude -I/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64ClangDPOpt/cylindricalInletVelocityFvPatchVectorField.o
fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C:135:23: error: conversion from 'tmp<Field<typename
      typeOfSum<Vector<double>, Vector<double> >::type> >' to 'const vectorField' (aka 'const Field<vector>') is ambiguous
    const vectorField d = r - (hatAxis & r)*hatAxis;
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/tmp.H:121:16: note: candidate function
        inline operator const T&() const;
               ^
/home/nishit29/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Field.H:186:9: note: candidate constructor
        Field(const tmp<Field<Type> >&);
        ^
1 error generated.
make: *** [Make/linux64ClangDPOpt/cylindricalInletVelocityFvPatchVectorField.o] Error 1
Steps To Reproduce1. Select Clang as compiler
2. Build OpenFOAM-2.1.x
Additional InformationI have successfully compiled this version of OpenFOAM with gcc(4.7.2) and Icc(12.1.3).

Thw version of Clang used was:
clang version 3.3 (trunk 171611)
Target: x86_64-unknown-linux-gnu
Thread model: posix
TagsNo tags attached.

Relationships

duplicate of 0000510 closedhenry compiling with llvm/clang fails on ambiguous errors 

Activities

user91

2013-01-05 09:57

  ~0001854

Just read bug report ID 0000510 (compiling with llvm/clang fails on ambiguous errors). This bug report is a repeat, my mistake.

user2

2013-03-14 09:08

  ~0002001

Version 2.2.0/2.2.x can be compiled with Clang

Issue History

Date Modified Username Field Change
2013-01-05 09:44 user91 New Issue
2013-01-05 09:57 user91 Note Added: 0001854
2013-03-14 09:07 user2 Relationship added duplicate of 0000510
2013-03-14 09:08 user2 Note Added: 0002001
2013-03-14 09:08 user2 Status new => resolved
2013-03-14 09:08 user2 Fixed in Version => 2.2.x
2013-03-14 09:08 user2 Resolution open => fixed
2013-03-14 09:08 user2 Assigned To => user2