unicfdlab / libAcoustics

libAcoustics - OpenFOAM library for far-field noise computation

Repository from Github https://github.comunicfdlab/libAcousticsRepository from Github https://github.comunicfdlab/libAcoustics

"/usr/bin/ld: cannot find -lrandomProcesses" while compiling in OpenFOAM 2112

skyabc355 opened this issue · comments

Hi,There:
Thanks very much for the excellent libAcoustics program.
I am running a fan acoustic simulation for my thesis using OpenFOAM now.
I have finished compiling the OpenFOAM 2112 source code in my Ubuntu 20.04 system.
then I downloaded the libAcoustics-digitef-dev-2112.tar.gz and extracted them.
When I trying to compile the libAcoustics using "./makeLibrary.sh",I saw the following error message:
"/usr/bin/ld: cannot find -lrandomProcesses"
Please see the screenshot here:
Error_can not find -lrandomProcesses
I have searched all the open and closed issues,it seemed nobody have this compiling issue before.
I hope you did not mind my listing my environment variables here,I was using the "export" command here:
declare -x ADIOS2_ARCH_PATH="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/ADIOS2-2.6.0"
declare -x ALL_PROXY="http://127.0.0.1:7890"
declare -x BOOST_ARCH_PATH="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/boost_1_74_0"
declare -x CGAL_ARCH_PATH="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/CGAL-4.14.3"
declare -x COLORTERM="truecolor"
declare -x CONDA_BACKUP_ADDR2LINE="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-addr2line"
declare -x CONDA_BACKUP_AR="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-ar"
declare -x CONDA_BACKUP_AS="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-as"
declare -x CONDA_BACKUP_BUILD="x86_64-conda-linux-gnu"
declare -x CONDA_BACKUP_CC="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-cc"
declare -x CONDA_BACKUP_CC_FOR_BUILD="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-cc"
declare -x CONDA_BACKUP_CFLAGS="-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_CMAKE_PREFIX_PATH="/home/research/anaconda3:/home/research/anaconda3/x86_64-conda-linux-gnu/sysroot/usr"
declare -x CONDA_BACKUP_CONDA_BUILD_SYSROOT="/home/research/anaconda3/x86_64-conda-linux-gnu/sysroot"
declare -x CONDA_BACKUP_CPP="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-cpp"
declare -x CONDA_BACKUP_CPPFLAGS="-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_CXX="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-c++"
declare -x CONDA_BACKUP_CXXFILT="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-c++filt"
declare -x CONDA_BACKUP_CXXFLAGS="-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_CXX_FOR_BUILD="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-c++"
declare -x CONDA_BACKUP_DEBUG_CFLAGS="-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_DEBUG_CPPFLAGS="-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_DEBUG_CXXFLAGS="-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/research/anaconda3/include"
declare -x CONDA_BACKUP_ELFEDIT="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-elfedit"
declare -x CONDA_BACKUP_GCC="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-gcc"
declare -x CONDA_BACKUP_GCC_AR="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-gcc-ar"
declare -x CONDA_BACKUP_GCC_NM="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-gcc-nm"
declare -x CONDA_BACKUP_GCC_RANLIB="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-gcc-ranlib"
declare -x CONDA_BACKUP_GPROF="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-gprof"
declare -x CONDA_BACKUP_GXX="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-g++"
declare -x CONDA_BACKUP_HOST="x86_64-conda-linux-gnu"
declare -x CONDA_BACKUP_LD="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-ld"
declare -x CONDA_BACKUP_LDFLAGS="-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/research/anaconda3/lib -Wl,-rpath-link,/home/research/anaconda3/lib -L/home/research/anaconda3/lib"
declare -x CONDA_BACKUP_LD_GOLD="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-ld.gold"
declare -x CONDA_BACKUP_NM="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-nm"
declare -x CONDA_BACKUP_OBJCOPY="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-objcopy"
declare -x CONDA_BACKUP_OBJDUMP="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-objdump"
declare -x CONDA_BACKUP_RANLIB="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-ranlib"
declare -x CONDA_BACKUP_READELF="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-readelf"
declare -x CONDA_BACKUP_SIZE="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-size"
declare -x CONDA_BACKUP_STRINGS="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-strings"
declare -x CONDA_BACKUP_STRIP="/home/research/anaconda3/bin/x86_64-conda-linux-gnu-strip"
declare -x CONDA_BACKUP__CONDA_PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata_x86_64_conda_linux_gnu"
declare -x CONDA_BACKUP_build_alias="x86_64-conda-linux-gnu"
declare -x CONDA_BACKUP_host_alias="x86_64-conda-linux-gnu"
declare -x CONDA_EXE="/home/research/anaconda3/bin/conda"
declare -x CONDA_PYTHON_EXE="/home/research/anaconda3/bin/python"
declare -x CONDA_SHLVL="0"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus,guid=753d5c9bbcc209490a04f870629c0abd"
declare -x DBUS_STARTER_ADDRESS="unix:path=/run/user/1000/bus,guid=753d5c9bbcc209490a04f870629c0abd"
declare -x DBUS_STARTER_BUS_TYPE="session"
declare -x DESKTOP_SESSION="ubuntu"
declare -x DISPLAY=":0"
declare -x FFTW_ARCH_PATH="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/fftw-3.3.10"
declare -x FLOWTORCH_DATASETS="/home/research/OpenFOAM/flowtorch/datasets/"
declare -x FOAM_API="2112"
declare -x FOAM_APP="/home/research/OpenFOAM/OpenFOAM-v2112/applications"
declare -x FOAM_APPBIN="/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_ETC="/home/research/OpenFOAM/OpenFOAM-v2112/etc"
declare -x FOAM_EXT_LIBBIN="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64GccDPInt32/lib"
declare -x FOAM_LIBBIN="/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_MPI="sys-openmpi"
declare -x FOAM_RUN="/home/research/OpenFOAM/research-v2112/run"
declare -x FOAM_SITE_APPBIN="/home/research/OpenFOAM/OpenFOAM-v2112/site/2112/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_SITE_LIBBIN="/home/research/OpenFOAM/OpenFOAM-v2112/site/2112/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_SOLVERS="/home/research/OpenFOAM/OpenFOAM-v2112/applications/solvers"
declare -x FOAM_SRC="/home/research/OpenFOAM/OpenFOAM-v2112/src"
declare -x FOAM_TUTORIALS="/home/research/OpenFOAM/OpenFOAM-v2112/tutorials"
declare -x FOAM_USER_APPBIN="/home/research/OpenFOAM/research-v2112/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_USER_LIBBIN="/home/research/OpenFOAM/research-v2112/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_UTILITIES="/home/research/OpenFOAM/OpenFOAM-v2112/applications/utilities"
declare -x GDMSESSION="ubuntu"
declare -x GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
declare -x GNOME_SHELL_SESSION_MODE="ubuntu"
declare -x GNOME_TERMINAL_SCREEN="/org/gnome/Terminal/screen/7f9b5df3_d200_463d_acde_260a0f9b0467"
declare -x GNOME_TERMINAL_SERVICE=":1.106"
declare -x GPG_AGENT_INFO="/run/user/1000/gnupg/S.gpg-agent:0:1"
declare -x GTK_MODULES="gail:atk-bridge"
declare -x HOME="/home/research"
declare -x IM_CONFIG_PHASE="1"
declare -x INVOCATION_ID="b6ec8556b9974847b22c05dba1f23528"
declare -x JOURNAL_STREAM="8:61680"
declare -x LANG="en_US.UTF-8"
declare -x LC_ADDRESS="zh_CN.UTF-8"
declare -x LC_IDENTIFICATION="zh_CN.UTF-8"
declare -x LC_MEASUREMENT="zh_CN.UTF-8"
declare -x LC_MONETARY="zh_CN.UTF-8"
declare -x LC_NAME="zh_CN.UTF-8"
declare -x LC_NUMERIC="zh_CN.UTF-8"
declare -x LC_PAPER="zh_CN.UTF-8"
declare -x LC_TELEPHONE="zh_CN.UTF-8"
declare -x LC_TIME="zh_CN.UTF-8"
declare -x LD_LIBRARY_PATH="/home/research/OpenFOAM/research-v2112/platforms/linux64GccDPInt32Opt/lib:/home/research/OpenFOAM/OpenFOAM-v2112/site/2112/platforms/linux64GccDPInt32Opt/lib:/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib/sys-openmpi:/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib:/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64GccDPInt32/lib/sys-openmpi:/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64GccDPInt32/lib:/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/fftw-3.3.10/lib:/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/CGAL-4.14.3/lib64:/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64Gcc/boost_1_74_0/lib64:/usr/lib/x86_64-linux-gnu/openmpi/lib:/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib/dummy"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LOGNAME="research"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:*.xspf=00;36:"
declare -x MANAGERPID="2926"
declare -x MANPATH
declare -x MPI_ARCH_PATH="/usr/lib/x86_64-linux-gnu/openmpi"
declare -x OLDPWD="/home/research/OpenFOAM"
declare -x PATH="/home/research/OpenFOAM/research-v2112/platforms/linux64GccDPInt32Opt/bin:/home/research/OpenFOAM/OpenFOAM-v2112/site/2112/platforms/linux64GccDPInt32Opt/bin:/home/research/OpenFOAM/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/bin:/home/research/OpenFOAM/OpenFOAM-v2112/bin:/home/research/OpenFOAM/OpenFOAM-v2112/wmake:/home/research/OpenFOAM/SimFlow/simFlow/simFlow-4.0:/home/research/anaconda3/condabin:/home/research/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
declare -x PWD="/home/research/OpenFOAM/libAcoustics-digitef-dev-2112"
declare -x QT_ACCESSIBILITY="1"
declare -x QT_IM_MODULE="ibus"
declare -x SCOTCH_ARCH_PATH="/home/research/OpenFOAM/ThirdParty-v2112/platforms/linux64GccDPInt32/scotch_6.1.0"
declare -x SESSION_MANAGER="local/star:@/tmp/.ICE-unix/3144,unix/star:/tmp/.ICE-unix/3144"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_AGENT_PID="3107"
declare -x SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"
declare -x TERM="xterm-256color"
declare -x USER="research"
declare -x USERNAME="research"
declare -x VTE_VERSION="6003"
declare -x WINDOWPATH="2"
declare -x WM_ARCH="linux64"
declare -x WM_COMPILER="Gcc"
declare -x WM_COMPILER_LIB_ARCH="64"
declare -x WM_COMPILER_TYPE="system"
declare -x WM_COMPILE_OPTION="Opt"
declare -x WM_DIR="/home/research/OpenFOAM/OpenFOAM-v2112/wmake"
declare -x WM_LABEL_OPTION="Int32"
declare -x WM_LABEL_SIZE="32"
declare -x WM_MPLIB="SYSTEMOPENMPI"
declare -x WM_OPTIONS="linux64GccDPInt32Opt"
declare -x WM_PRECISION_OPTION="DP"
declare -x WM_PROJECT="OpenFOAM"
declare -x WM_PROJECT_DIR="/home/research/OpenFOAM/OpenFOAM-v2112"
declare -x WM_PROJECT_USER_DIR="/home/research/OpenFOAM/research-v2112"
declare -x WM_PROJECT_VERSION="v2112"
declare -x WM_THIRD_PARTY_DIR="/home/research/OpenFOAM/ThirdParty-v2112"
declare -x XAUTHORITY="/run/user/1000/gdm/Xauthority"
declare -x XDG_CONFIG_DIRS="/etc/xdg/xdg-ubuntu:/etc/xdg"
declare -x XDG_CURRENT_DESKTOP="ubuntu:GNOME"
declare -x XDG_DATA_DIRS="/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop"
declare -x XDG_MENU_PREFIX="gnome-"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_DESKTOP="ubuntu"
declare -x XDG_SESSION_TYPE="x11"
declare -x XMODIFIERS="@im=ibus"
declare -x _CE_CONDA=""
declare -x _CE_M=""
declare -x all_proxy="http://127.0.0.1:7890"
declare -x clashdir="/usr/share/clash"

I have also attached the whole compiling log here for your further investigation:
makeLibrary.log
Thanks in advance for your time looking into this issue.
Regards.

Hi,I removed everything in my Ubuntu 20.04 and re-compile everything in order again:
1,compile the ThirdParty-v2112
2,compile the OpenFOAM-v2112
3,compile libAcoustics-digitef-dev-2112
This time I did not see the "/usr/bin/ld: cannot find -lrandomProcesses" error message.
And all the Tests in the libAcoustics-digitef-dev-2112 could pass successfully.
Thus this issue could be closed.
Thanks for your time for this issue.