mpicxx:不兼容的库版本

时间:2015-06-20 16:42:26

标签: c++ dll mpi

我正在尝试将c ++代码编译到Mac v10.10上的动态链接库

我在我的所有代码的目录中运行wmake libso

并获得以下读数:

SOURCE=gammaReThetatSST/gammaReThetatSST.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -I/Users/oscarwilsby/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/gammaReThetatSST.o
dyld: Library not loaded: /usr/local/Cellar/open-mpi/1.8.4/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 50563 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/gammaReThetatSST.o
make: *** [Make/darwinIntel64GccDPOpt/gammaReThetatSST.o] Error 133

这是安装某种类型依赖的正确版本的问题吗?请指教。

编辑:

我已经尝试了brew update,然后是brew unlink open-mpi,最后是brew install open-mpi,但问题仍然存在。值得指出的是,如果我执行brew unlink open-mpi,那么当我运行wmake libso时,我现在会遇到一些编译器错误:

/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/lduInterface.H:100:26: note: hidden overloaded virtual function
      'Foam::lduInterface::initInternalFieldTransfer' declared here: type mismatch at 2nd parameter ('const labelUList &'
      (aka 'const UList<label> &') vs 'labelUList &' (aka 'UList<label> &'))
            virtual void initInternalFieldTransfer
                         ^
gammaReThetatSST/gammaReThetatSST.C:240:24: error: conversion from 'tmp<GeometricField<double, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
        volScalarField magVort = sqrt(scalar(2))*mag(skew(fvc::grad(U_)));
                       ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:260:20: error: conversion from 'tmp<GeometricField<typename scalarProduct<SymmTensor<double>, Tensor<double>
      >::type, fvPatchField, Foam::volMesh> >' to 'volScalarField' (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField U2gradU = (sqr(U_)&&(fvc::grad(U_)));
                   ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:363:20: error: conversion from 'tmp<GeometricField<double, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField CDkOmegaPlus = max
                   ^              ~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:393:20: error: conversion from 'tmp<GeometricField<double, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField arg2 = min
                   ^      ~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:858:20: error: conversion from 'tmp<GeometricField<scalar, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField S2 = magSqr(symm(fvc::grad(U_)));
                   ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:864:20: error: conversion from 'tmp<GeometricField<scalar, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField CDkOmega =
                   ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^
gammaReThetatSST/gammaReThetatSST.C:895:20: error: conversion from 'tmp<GeometricField<double, fvPatchField, Foam::volMesh> >' to 'volScalarField'
      (aka 'GeometricField<scalar, fvPatchField, Foam::volMesh>') is ambiguous
    volScalarField gammaEff = max
                   ^          ~~~
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/tmp.H:124:16: note: candidate function
        inline operator const T&() const;
               ^
/Users/ow222/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricField.H:359:9: note: candidate constructor
        GeometricField
        ^

1 个答案:

答案 0 :(得分:1)

您需要更新libopen-pal

您可以使用自制brew install open-mpi