|
[Sponsors] |
[OpenFOAM.org] wmake errors when compiling a new solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 26, 2023, 22:06 |
wmake errors when compiling a new solver
|
#1 |
New Member
Join Date: Nov 2023
Posts: 2
Rep Power: 0 |
Dear all,
I recently started to learn how to compile my own solver in openfoam. My Make/files is my_icoFoam.C EXE = $(FOAM_USER_APPBIN)/my_icoFoam My Make/option is EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools I followed the exact step in this guide (https://openfoamwiki.net/index.php/H...ure_to_icoFoam). When I ran the "wmake" command on the terminal (after the command "wclean"), a new sub-folder named linux64GccDPInt32Opt was generated in the Make folder. In the linux64GccDPInt32Opt folder, there are four files including options, sedxKqum7, sourceFiles, and variables. However, there was always an error message on my terminal: sed: couldn't open temporary file Make/linux64GccDPInt32Opt/sedrPpDMh: Permission denied make: *** [/opt/openfoam8/wmake/makefiles/files:70: Make/linux64GccDPInt32Opt/sourceFiles] Error 4 Make/linux64GccDPInt32Opt/sourceFiles:54: *** missing separator.* Stop. It seems that there is something wrong with my sourceFiles, which was generated in the Make/linux64GccDPInt32Opt folder. So I manually edited the sourceFiles by converting the spaces into Tabs. Then, I re-ran the wmake command. The above error message disappears and a new error message shows up: g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3* -DNoRepository -ftemplate-depth-100 -I/opt/openfoam8/src/finiteVolume/lnInclude -I/opt/openfoam8/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam8/src/OpenFOAM/lnInclude -I/opt/openfoam8/src/OSspecific/POSIX/lnInclude * -fPIC -fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed* -L/opt/openfoam8/platforms/linux64GccDPInt32Opt/lib \ * * -lfiniteVolume -lmeshTools -lOpenFOAM -ldl* \ ** * -lm -o /home/openfoam/platforms/linux64GccDPInt32Opt/bin/my_icoFoam /usr/bin/ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' collect2: error: ld returned 1 exit status make: *** [/opt/openfoam8/wmake/makefiles/general:142: /home/openfoam/platforms/linux64GccDPInt32Opt/bin/my_icoFoam] Error 1 There seems to be a lot of similar discussions about the missing separator when running the make files, so I also did similar check for my make files following the discussion here (https://stackoverflow.com/questions/...separator-stop). However, none of these trials solves my problem. Additional background information: The openfoam I installed on my mac via Docker is openfoam 8. I can successfully run all the tutorials such as pitzDally and cavity cases on my mac. I am not sure if this is because of docker container problems or something else. I don't know which direction I should go ahead to solve this problem. Any suggestions would be highly appreciated. Thanks a lot! Last edited by andrew_z; November 27, 2023 at 10:25. Reason: Correcting a typo |
|
December 4, 2023, 14:22 |
|
#2 |
New Member
Join Date: Nov 2023
Posts: 2
Rep Power: 0 |
I have figured it out. The error was related to the sed command. I installed the gnu-sed command in the docker container and then the error disappeared.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] Not found many .so files when installing OpenFOAM 6 | lengjun | OpenFOAM Installation | 2 | December 12, 2022 23:08 |
[OpenFOAM.org] Errors compiling OpenFOAM-5.0 | renardf | OpenFOAM Installation | 1 | January 12, 2018 09:35 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 09:48 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 05:41 |