Openfoam1912编译waves2Foam失败,求教
-
使用东岳老师的openfoam安装包,如下[http://dyfluid.com/download.html],由于我的工作需要使用openfoam1912编译waves2Foam,而东岳老师给配好waves2Foam的只有of2106和2012,所以尝试自行编译。
根据网上能搜到的教程,进行了如下步骤,
1,首先安装wave2Foam的依赖sudo apt install libgsl-dev gfortran subversion git mkdir -p $FOAM_RUN/../applications/utilities cd $FOAM_RUN/../applications/utilities
使用svn下载源代码(waves2Foam编译有两个大坑,一个是waves2Foam的版本一定要和OpenFOAM版本对应,查询到支持OpenFOAM-v1912的waves2Foam版本号为2137,将上述命令中的版本号替换为2137,即)
svn co -r 2137 http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam
2,编译waves2Foam的另一个大坑,Ubuntu2204自带的gcc,g++,gfortran版本太新了,不能成功编译waves2Foam。我们使用gcc-9,g++-9,gfortran-9编译即可。
执行如下命令下载老版本的gcc,g++以及gfortran:sudo apt-get update sudo apt-get install g++-9 gcc-9 gfortran-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 100
3,由于已知的(大陆)网络问题,会导致无法下载OceanWave3D,从而引发后续一系列问题,导致编译失败。此部分通过阅读make文件的操作,进行手动解决OceanWave3D的编译,主要进行了以下操作:
从官网手动下载OceanWave3D,下载完成后解压,并将文件夹名字后的“-master”去掉;然后将OceanWave3D文件夹复制到waves2Foam文件夹的waves2Foam\ThirdParty文件夹中,并将waves2Foam\ThirdParty\settings\oceanWave3DSettings文件夹中的makefile与common.mk文件复制到waves2Foam\ThirdParty\OceanWave3D-Fortran90文件夹中并替换。这已经是网上能搜到的基本所有的教程了,之后进入waves2Foam文件进行编译,输出结果如下,编译失败(由于篇幅有限,省略部分代码)
dyfluid@dyfluid-virtual-machine:~/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam$ ./Allwmake v1912 ===================================== ENVIRONMENTAL VARIABLES ===================================== EXTBRANCH=0 FOAMEXTENDPROJECT=0 OFPLUSBRANCH=1 WAVES_APPBIN=/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin WAVES_DIR=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam WAVES_GSL_INCLUDE=/usr/include WAVES_GSL_LIB=/usr/lib64 WAVES_LIBBIN=/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib WAVES_POST=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/postProcessing WAVES_PRE=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing WAVES_SOL=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/solvers/solvers1912_PLUS WAVES_SRC=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src WAVES_TUT=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/tutorials WAVES_UTIL=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities WAVES_XVERSION=0 WM_PROJECT_VERSION_NUMBER=1912 ===================================== COMPILE LAPACK-3.3.1 ===================================== lapack-3.3.1 has already been compiled ===================================== COMPILE SPARSKIT2 ===================================== SPARSKIT2 has already been compiled ===================================== COMPILE OCEANWAVE3D ===================================== Pull changes from the OceanWave3D git repository ... fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git rm -f /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/*.o rm -f /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/*.mod rm -f /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/OceanWave3D ls: 无法访问 '*.mod': 没有那个文件或目录 mv: 对 '*.mod' 调用 stat 失败: 没有那个文件或目录 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/precision.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/precision.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build precision.mod 已重命名 'precision.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/precision.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/constants.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/constants.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build 已重命名 'constants.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/constants.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/datatypes.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/datatypes.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build ls: 无法访问 '*.mod': 没有那个文件或目录 datatypes.mod 已重命名 'datatypes.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/datatypes.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/HSL_LU.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/HSL_LU.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build hsl_lu.mod 已重命名 'hsl_lu.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/hsl_lu.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/OFmodule.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/OFmodule.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build ofmodule.mod 已重命名 'ofmodule.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/ofmodule.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/globalvariables.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/globalvariables.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build 已重命名 'globalvariables.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/globalvariables.mod' ls: 无法访问 'globalvariables.mod': 没有那个文件或目录 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/pdamp_CSR.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/pdamp_CSR.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build pdamp_csr.mod 已重命名 'pdamp_csr.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/pdamp_csr.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/variabledefs/SPK.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/SPK.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build spk.mod 已重命名 'spk.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/spk.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/utilities/ErfAux.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/ErfAux.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build erf_auxilliary.mod 已重命名 'erf_auxilliary.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/erf_auxilliary.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/utilities/ErfReal.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/ErfReal.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build error_function.mod 已重命名 'error_function.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/error_function.mod' 'thirdpartylibs/LIB_VTK_IO/static/lib_vtk_io.mod' -> '/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/lib_vtk_io.mod' gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/utilities/DetectBreaking.f90 -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/DetectBreaking.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build gfortran -O3 -fPIC -ffpe-trap=invalid,zero,overflow -ffree-line-length-none -fstack-protector-all -c src/utilities/eqns.f -o /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build/eqns.o -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty/OceanWave3D-Fortran90/../build src/utilities/eqns.f:39:72: 39 | 2 COEFF(I)=Z(N+I+10)/DCOSH(I*Z(1)) | 1 Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 2 at (1) src/utilities/eqns.f:46:72: 46 | 1 RHS(7)=RHS(7)+Z(10+I)+Z(10+I) | 1 Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1) src/utilities/eqns.f:68:72: 68 | 5 V=V+J*Z(N+J+10)*E*SINA(NM) | 1 Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 5 at (1)
出现了非常多的ls: 无法访问 '.mod': 没有那个文件或目录
mv: 对 '.mod' 调用 stat 失败: 没有那个文件或目录===================================== COMPILE SOLVERS ===================================== g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/applications/solvers/multiphase/VoF -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/dynamicFvMesh/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/incompressible/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/interfaceProperties/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/twoPhaseMixture/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/incompressible/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2FoamSamplingNew/lnInclude -I/usr/include -DOFVERSION=1912 -DEXTBRANCH=0 -DOFPLUSBRANCH=1 -DXVERSION=0 -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/waveFoam.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lfvOptions -lmeshTools -lsampling -ldynamicFvMesh -lincompressibleTransportModels -linterfaceProperties -limmiscibleIncompressibleTwoPhaseMixture -lturbulenceModels -lincompressibleTurbulenceModels -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -lwaves2FoamSampling -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/waveFoam /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 /usr/bin/ld: 找不到 -lwaves2FoamSampling: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/waveFoam] 错误 1 ===================================== COMPILE PRE-PROCESSING ===================================== wmake faceSetToSTL make[1]: 进入目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL” make[1]: 离开目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL” wmake relaxationZoneLayout make[1]: 进入目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout” g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -DOFVERSION=1912 -DEXTBRANCH=0 -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -I/usr/include -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/relaxationZoneLayout.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/relaxationZoneLayout /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 collect2: error: ld returned 1 exit status make[1]: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/relaxationZoneLayout] 错误 1 make[1]: 离开目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout” make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/apps:29:relaxationZoneLayout] 错误 2 ===================================== COMPILE POST-PROCESSING ===================================== g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/src/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2FoamProcessing/lnInclude -I/usr/include -DOFVERSION=1912 -DEXTBRANCH=0 -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/postProcessWaves2Foam.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lOpenFOAM -lfiniteVolume -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -lwaves2FoamProcessing -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 /usr/bin/ld: 找不到 -lwaves2FoamProcessing: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam] 错误 1 ===================================== COMPILE BREEDER ===================================== Nothing available for compilation in the breeder directory. ===================================== COMPILATION DONE =====================================
如上,就是所有的输出代码了,输入waveFoam命令并不能运行,实在是新手,对于这个大段代码束手无策,求各位大佬指点
-
@bike-北辰 老师您好
我刚刚去尝试把thirdparty中的allwmake文件修改,源文件如下:#!/bin/bash ## The script has been modified on 2015.09.08 to reflect the fact that # the svn-repository for OceanWave3D has been discontinued. sourceLib="lib" settings="settings" if [ ! -d "$sourceLib" ] then mkdir $sourceLib fi echo "=====================================" echo " COMPILE LAPACK-3.3.1" echo "=====================================" compileFlag=0 if [ ! -f "$sourceLib/libblas.a" ] then compileFlag=1; fi if [ ! -f "$sourceLib/liblapack_gfortran.a" ] then compileFlag=1; fi if [ ! -f "$sourceLib/libtmglib_gfortran.a" ] then compileFlag=1; fi ## COMPILE LAPACK if [ "$compileFlag" == "1" ] then # Unpack lapack-3.3.1 tar -xzf lapack-3.3.1.tgz # Copy the necessary settings cp $settings/lapackSettings/* lapack-3.3.1/. # Compile lapack cd lapack-3.3.1 make clean make all cd .. else echo echo "lapack-3.3.1 has already been compiled" echo fi echo "=====================================" echo " COMPILE SPARSKIT2" echo "=====================================" compileFlag=0 if [ ! -f "$sourceLib/libskit_gfortran.a" ] then compileFlag=1; fi ## COMPILE SPARSKIT2 if [ "$compileFlag" == "1" ] then # Unpack SPARSKIT2 tar -xzf SPARSKIT2.tar.gz # Copy the necessary settings cp $settings/sparseSettings/makefile SPARSKIT2/. # Compile SPARSKIT2 cd SPARSKIT2 make clean make lib mv libskit_gfortran.a ../lib/. cd .. else echo echo "SPARSKIT2 has already been compiled" echo fi echo "=====================================" echo " COMPILE OCEANWAVE3D" echo "=====================================" # Path for the git-repository ocw="OceanWave3D-Fortran90" # Create output directory for OceanWave3D if [ ! -d "bin" ] then mkdir bin fi # Check-out the git-repository if [ ! -d "$ocw" ] then echo "" echo "Cloning the OceanWave3D git repository ..." git clone https://github.com/boTerpPaulsen/OceanWave3D-Fortran90.git # Copy the compilation settings for OCW3D cp $settings/oceanWave3DSettings/common.mk $ocw/. cp $settings/oceanWave3DSettings/makefile $ocw/. else echo "" echo "Pull changes from the OceanWave3D git repository ..." cd $ocw # Stash the local changes on the settings git stash # Get an update of the git and report the result output=`git pull` echo $output # Check whether the git was already up to date if [[ $output == "Already up-to-date." ]] then compileFlag=0 elif [[ $output == "Already up to date." ]] then compileFlag=0 else compileFlag=1 fi # Re-apply the compilation settings git stash pop cd $OLDPWD fi # Check for the correct environmental variables if [ -z "$WAVES_LIBBIN" ] then echo "" echo "Set the environmental variables for waves2Foam" echo "Exiting compilation process" echo "" exit 1 fi # Check whether the executable has been deleted if [ ! -f "$WAVES_APPBIN/OceanWave3D" ] then compileFlag=1 fi # Check whether the library has been deleted if [ ! -f "$WAVES_LIBBIN/libOceanWave3D.so" ] then compileFlag=1 fi if [ "$compileFlag" == "1" ] then # Temporary build directory mkdir build # Compile OceanWave3D input an executable and a dynamic library cd $ocw make clean make Release make shared cd $OLDPWD # Clean up rm -rf build else echo echo "OceanWave3D has already been compiled" echo fi pwd echo "=====================================" echo " COMPILE FENTON4FOAM" echo "=====================================" fentonName="fenton4Foam" if [ ! -f "$WAVES_APPBIN/$fentonName" ] then echo echo "Compiling fenton4Foam" echo cd $fentonName gfortran -o $WAVES_APPBIN/$fentonName $fentonName.f fft.f cd $OLDPWD else echo echo "fenton4Foam has already been compiled" echo fi exit 0
我把整个COMPILE OCEANWAVE3D的部分都删掉,重新编译waves2Foam,依然编译失败,输出结果如下:
===================================== ENVIRONMENTAL VARIABLES ===================================== EXTBRANCH=0 FOAMEXTENDPROJECT=0 OFPLUSBRANCH=1 WAVES_APPBIN=/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin WAVES_DIR=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam WAVES_GSL_INCLUDE=/usr/include WAVES_GSL_LIB=/usr/lib64 WAVES_LIBBIN=/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib WAVES_POST=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/postProcessing WAVES_PRE=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing WAVES_SOL=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/solvers/solvers1912_PLUS WAVES_SRC=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src WAVES_TUT=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/tutorials WAVES_UTIL=/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities WAVES_XVERSION=0 WM_PROJECT_VERSION_NUMBER=1912 ===================================== COMPILE LAPACK-3.3.1 ===================================== lapack-3.3.1 has already been compiled ===================================== COMPILE SPARSKIT2 ===================================== SPARSKIT2 has already been compiled /home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/ThirdParty ===================================== COMPILE FENTON4FOAM ===================================== fenton4Foam has already been compiled ===================================== COMPILE LIBRARY ===================================== v1912 wmake libso (waves2Foam) g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=1912 -DEXTBRANCH=0 -DXVERSION=0 -DOFPLUSBRANCH=1 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/lagrangian/basic/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/fileFormats/lnInclude -I/usr/include -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/convexPolyhedral/convexPolyhedral.o Make/linux64GccDPInt32Opt/convexPolyhedral/localFace.o Make/linux64GccDPInt32Opt/convexPolyhedral/localCell.o Make/linux64GccDPInt32Opt/convexPolyhedral/localCellNeg.o Make/linux64GccDPInt32Opt/waveTheories/waveTheory/waveTheory.o Make/linux64GccDPInt32Opt/waveTheories/waveTheory/newWaveTheory.o Make/linux64GccDPInt32Opt/waveTheories/current/potentialCurrent/potentialCurrent.o Make/linux64GccDPInt32Opt/waveTheories/solitary/solitaryFirst/solitaryFirst.o Make/linux64GccDPInt32Opt/waveTheories/solitary/chappelear1962/chappelear1962.o Make/linux64GccDPInt32Opt/waveTheories/regular/stokesFirst/stokesFirst.o Make/linux64GccDPInt32Opt/waveTheories/regular/stokesFirstStanding/stokesFirstStanding.o Make/linux64GccDPInt32Opt/waveTheories/regular/stokesSecond/stokesSecond.o Make/linux64GccDPInt32Opt/waveTheories/regular/stokesSecondModulation/stokesSecondModulation.o Make/linux64GccDPInt32Opt/waveTheories/regular/stokesFifth/stokesFifth.o Make/linux64GccDPInt32Opt/waveTheories/regular/cnoidalFirst/cnoidalFirst.o Make/linux64GccDPInt32Opt/waveTheories/regular/streamFunction/streamFunction.o Make/linux64GccDPInt32Opt/waveTheories/irregular/irregular/irregular.o Make/linux64GccDPInt32Opt/waveTheories/irregular/bichromaticFirst/bichromaticFirst.o Make/linux64GccDPInt32Opt/waveTheories/irregular/bichromaticSecond/bichromaticSecond.o Make/linux64GccDPInt32Opt/waveTheories/mixedType/combinedWaves/combinedWaves.o Make/linux64GccDPInt32Opt/waveTheories/externalWaveForcing/externalSource.o Make/linux64GccDPInt32Opt/waveTheories/externalWaveForcing/externalWaveForcing.o Make/linux64GccDPInt32Opt/waveTheories/externalWaveForcing/emptyExternal/emptyExternal.o Make/linux64GccDPInt32Opt/waveTheories/externalWaveForcing/oceanWave3D/oceanWave3D.o Make/linux64GccDPInt32Opt/waveTheories/externalWaveForcing/irregularFast/irregularFast.o Make/linux64GccDPInt32Opt/fvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.o Make/linux64GccDPInt32Opt/fvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/relaxationShape.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/newRelaxationShape.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/frozen/relaxationShapeFrozen.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/rectangular/relaxationShapeRectangular.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/cylindrical/relaxationShapeCylindrical.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/semiCylindrical/relaxationShapeSemiCylindrical.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationShape/line/relaxationShapeLine.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationWeight/relaxationWeight.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationWeight/relaxationWeightCourantCorrection.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationWeight/exponential/relaxationWeightExponential.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationWeight/freePolynomial/relaxationWeightFreePolynomial.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationWeight/thirdOrderPolynomial/relaxationWeightThirdOrderPolynomial.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationScheme/relaxationScheme.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationScheme/newRelaxationScheme.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationScheme/empty/relaxationSchemeEmpty.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationScheme/spatial/relaxationSchemeSpatial.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationScheme/spatialInterpolation/relaxationSchemeSpatialInterpolation.o Make/linux64GccDPInt32Opt/relaxationZone/numericalBeach/numericalBeach.o Make/linux64GccDPInt32Opt/relaxationZone/numericalBeach/newNumericalBeach.o Make/linux64GccDPInt32Opt/relaxationZone/numericalBeach/empty/numericalBeachEmpty.o Make/linux64GccDPInt32Opt/relaxationZone/relaxationZone.o Make/linux64GccDPInt32Opt/setWaveField/setWaveField.o Make/linux64GccDPInt32Opt/include/crossVersionCompatibility.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lmeshTools -lsampling -lfileFormats -lstdc++ -lgfortran -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lOceanWave3D -L/usr/lib64 -lgsl -lgslcblas -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2Foam.so /usr/bin/ld: 找不到 -lgfortran: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:177:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2Foam.so] 错误 1 wmake libso (waves2FoamProcessing) g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=1912 -DEXTBRANCH=0 -DXVERSION=0 -DOFPLUSBRANCH=1 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/lagrangian/basic/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/fileFormats/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -I/usr/include -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/setWaveProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/current/potentialCurrentProperties/potentialCurrentProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/solitary/solitaryFirstProperties/solitaryFirstProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/solitary/chappelear1962Properties/chappelear1962Properties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/stokesFirstProperties/stokesFirstProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/stokesFirstStandingProperties/stokesFirstStandingProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/stokesSecondProperties/stokesSecondProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/stokesSecondModulationProperties/stokesSecondModulationProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/stokesFifthProperties/stokesFifthProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/cnoidalFirstProperties/cnoidalFirstProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/regular/streamFunctionProperties/streamFunctionProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/bichromaticFirstProperties/bichromaticFirstProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/bichromaticSecondProperties/bichromaticSecondProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/waveSpectra.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/frequencyAxis/frequencyAxis.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/frequencyAxis/equidistantFrequencyAxis/equidistantFrequencyAxis.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/frequencyAxis/cosineStretchedFrequencyAxis/cosineStretchedFrequencyAxis.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/spectra/JONSWAP/JONSWAP.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/spectra/PiersonMoskowitz/PiersonMoskowitz.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/phases/phases.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/phases/randomPhase/randomPhase.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/waveSpectra/phases/focusingPhase/focusingPhase.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/irregular/irregularProperties/irregularProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/mixedType/combinedWavesProperties/combinedWavesProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/externalWaveForcing/externalSourceProperties/externalSourceProperties.o Make/linux64GccDPInt32Opt/preProcessing/setWaveProperties/externalWaveForcing/oceanWave3DProperties/oceanWave3DProperties.o Make/linux64GccDPInt32Opt/preProcessing/probes/waveGauges/waveGauges.o Make/linux64GccDPInt32Opt/preProcessing/probes/probeGauges/probeGauges.o Make/linux64GccDPInt32Opt/preProcessing/probes/pointDistributions/pointDistributions.o Make/linux64GccDPInt32Opt/preProcessing/probes/pointDistributions/userDefinedDistribution/userDefinedDistribution.o Make/linux64GccDPInt32Opt/preProcessing/probes/pointDistributions/lineDistribution/lineDistribution.o Make/linux64GccDPInt32Opt/preProcessing/probes/pointDistributions/circularDistribution/circularDistribution.o Make/linux64GccDPInt32Opt/preProcessing/probes/pointDistributions/quadrilateralDistribution/quadrilateralDistribution.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/postProcessingWaves.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeRawData/rawSurfaceElevation/rawSurfaceElevation.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeRawData/rawVelocityProbes/rawVelocityProbes.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeRawData/rawForcesAndMoments/rawForcesAndMoments.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeRawData/rawAlphaProbes/rawAlphaProbes.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeRawData/rawOvertopping/rawOvertopping.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/write2Ascii/write2Ascii.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeIndexLocation/writeIndexLocation.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/cleaningUtil/removeData/removeData.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/cleaningUtil/removeSubDirs/removeSubDirs.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeInterpolatedData/interpolateSurfaceElevation/interpolateSurfaceElevation.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeInterpolatedData/interpolateVelocityProbes/interpolateVelocityProbes.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeInterpolatedData/interpolateForcesAndMoments/interpolateForcesAndMoments.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeInterpolatedData/interpolateAlphaProbes/interpolateAlphaProbes.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/writeInterpolatedData/interpolateOvertopping/interpolateOvertopping.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/spectralMethodsFFTBased.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/spectralMethodsLeastSquaresBased.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/fftBasedMethods/powerSpectraFFT/powerSpectraFFT.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/fftBasedMethods/reflectionAnalysis2DFFT/reflectionAnalysis2DFFT.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/leastSquareBasedMethods/powerSpectraLS/powerSpectraLS.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/leastSquareBasedMethods/reflectionAnalysis2DLS/reflectionAnalysis2DLS.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/miscOperations/ensembleAverage/ensembleAverage.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/miscOperations/trapz/trapz.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/miscOperations/cumTrapz/cumTrapz.o Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/miscOperations/zeroCrossing/zeroCrossing.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lmeshTools -lsampling -lfileFormats -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -L/usr/lib64 -lgsl -lgslcblas -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2FoamProcessing.so /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:177:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2FoamProcessing.so] 错误 1 wmake libso (waves2FoamSamplingNew) g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=1912 -DEXTBRANCH=0 -DXVERSION=0 -DOFPLUSBRANCH=1 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/fileFormats/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/surfMesh/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/conversion/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/dynamicMesh/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/surfaceElevation/sampledSurfaceElevation.o Make/linux64GccDPInt32Opt/overtopping/overtopping.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lmeshTools -lconversion -ldynamicMesh -lsampling -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2FoamSampling.so /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:177:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib/libwaves2FoamSampling.so] 错误 1 wmake libso (waves2FoamPorosity) ===================================== COMPILE SOLVERS ===================================== g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/applications/solvers/multiphase/VoF -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/dynamicFvMesh/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/incompressible/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/interfaceProperties/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/twoPhaseMixture/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/incompressible/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2FoamSamplingNew/lnInclude -I/usr/include -DOFVERSION=1912 -DEXTBRANCH=0 -DOFPLUSBRANCH=1 -DXVERSION=0 -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/waveFoam.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lfvOptions -lmeshTools -lsampling -ldynamicFvMesh -lincompressibleTransportModels -linterfaceProperties -limmiscibleIncompressibleTwoPhaseMixture -lturbulenceModels -lincompressibleTurbulenceModels -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -lwaves2FoamSampling -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/waveFoam /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 /usr/bin/ld: 找不到 -lwaves2FoamSampling: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/waveFoam] 错误 1 ===================================== COMPILE PRE-PROCESSING ===================================== wmake faceSetToSTL make[1]: 进入目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL” make[1]: 离开目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/faceSetToSTL” wmake relaxationZoneLayout make[1]: 进入目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout” g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -DOFVERSION=1912 -DEXTBRANCH=0 -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/lnInclude -I/usr/include -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/relaxationZoneLayout.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/relaxationZoneLayout /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 collect2: error: ld returned 1 exit status make[1]: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/relaxationZoneLayout] 错误 1 make[1]: 离开目录“/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/applications/utilities/preProcessing/relaxationZoneLayout” make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/apps:29:relaxationZoneLayout] 错误 2 ===================================== COMPILE POST-PROCESSING ===================================== g++ -std=c++11 -m64 -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2Foam/src/lnInclude -I/home/dyfluid/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam/src/waves2FoamProcessing/lnInclude -I/usr/include -DOFVERSION=1912 -DEXTBRANCH=0 -IlnInclude -I. -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/dyfluid/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/postProcessWaves2Foam.o -L/home/dyfluid/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/lib \ -lOpenFOAM -lfiniteVolume -L/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/lib -lwaves2Foam -lwaves2FoamProcessing -L/usr/lib64 -lgsl -lgslcblas -lOpenFOAM -ldl \ -lm -o /home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam /usr/bin/ld: 找不到 -lwaves2Foam: 没有那个文件或目录 /usr/bin/ld: 找不到 -lwaves2FoamProcessing: 没有那个文件或目录 collect2: error: ld returned 1 exit status make: *** [/home/dyfluid/OpenFOAM/OpenFOAM-v1912/wmake/makefiles/general:143:/home/dyfluid/OpenFOAM/dyfluid-v1912/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam] 错误 1 ===================================== COMPILE BREEDER ===================================== Nothing available for compilation in the breeder directory. ===================================== COMPILATION DONE =====================================
看起来跟上次存在同样的一个问题,Nothing available for compilation in the breeder directory.,不知道这个是否是编译失败的主要问题呢,还是有其他问题导致的呢
-
@李东岳 李老师好,
我用命令查找find /usr/lib /usr/local/lib -name "libgfortran.so*"
dyfluid@dyfluid-virtual-machine:~/OpenFOAM/dyfluid-v1912/applications/utilities/waves2Foam$ find /usr/lib /usr/local/lib -name "libgfortran.so*" /usr/lib/x86_64-linux-gnu/libgfortran.so.5 /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0 /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so /usr/lib/gcc/x86_64-linux-gnu/4.7/libgfortran.so /usr/lib/gcc/x86_64-linux-gnu/11/libgfortran.so
看起来系统中已经安装了多个版本的 libgfortran,但是链接错误提示 ld 找不到该库。
为了让编译器找到 libgfortran,我将其所在目录添加到 LD_LIBRARY_PATH 环境变量中。export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
输出的结果并没有任何区别.....
-
还有一个问题,就是你编译的时候,在ThirdParty/settings/ 里边的三个文件中都包含这个语句-fallow-argument-mismatch,你只需要把这三个对应的setting里边这段话找到删除就行,这一段话我没记错的话是前面这个waves2Foam作者添加进去的,我以前23年时编译waves2Foam的时候是没有这个语句的,而在24年11月底我重新编译的时候就会报错,说找不到gfortran,但是电脑又很多的版本的gfortran。后面我重新查找waves2Foam的代码,发现了这一行语句以前是没有的,而现在添加进去了,后面删除了就可以编译成功了。
因此,你的解决方案最好是把ThirdParty/settings/ 里边的三个文件中都包含这个语句-fallow-argument-mismatch这一段话删除就行。