CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Compiling liftDrag crashed with initc%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartsadgi f%22 ALT%3d%22%22 BORDER%3d0%3etext0x20 undefined reference to %60mainb (http://www.cfd-online.com/Forums/openfoam-solving/59226-compiling-liftdrag-crashed-initc-3cimg-src-3d-22httpopenfoamcfdonlinecomforumclipartsadgif-22-alt-3d-22-22-border-3d0-3etext0x20-undefined-reference-60mainb.html)

sponiar January 16, 2008 09:05

Good afternoon to forum, I wo
 
Good afternoon to forum,
I would like to build liftDrag tool to OF 1.4.1. I follow steps in this 'compiling tutorial' by pUl (Thank you a lot, very helpfull).

http://www.cfd-online.com/OpenFOAM_D...es/1/2299.html

Compiling source code in:
$WM_PROJECT_INST_DIR/OpenFOAM-1.4.1/src/postProcessing
./Allwmake

is ssuccessful without any Errors. All directory structure with source code and header files for liftDrag was donwloaded from:
http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/src/postProcessing/

In second steps, when I am try tu build liftDrag in:
$WM_PROJECT_INST_DIR/OpenFOAM-1.4.1/applications/utilities/postProcessing/miscel laneous/liftDrag
wclean && wmake

building crashed with this report:
------------------------------------------
options:10:12: warning: backslash-newline at end of file
Making dependency list for source file liftDrag.C
SOURCE=liftDrag.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible/lnIncl ude -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/liftDrag.o
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible/lnIncl ude -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/liftDrag.o -L/home/sponiar/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lincompressiblePostProcessing -lOpenFOAM -liberty -ldl -lm -o /home/sponiar/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag
/usr/lib/../lib64/crt1.o: In function `_start':
init.chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status

------------------------------------------------

It looks like some mistakes in 'ld' or in gcc. So I rebuild gcc-4.2.2, how prof.Jasak advise:
http://www.cfd-online.com/OpenFOAM_D...tml?1196851788
I do not rebuild binutils, which contain 'ld'.
$ ld -v
GNU ld version 2.16.91.0.5 20051219 (SUSE Linux)


This is 'Make option files' from liftDrag src and app:

::: applications/utilities/postProcessing/miscellaneous/liftDrag/Make/options :::

EXE_INC = \
-I$(LIB_SRC)/postProcessing/incompressible/lnInclude \
-I$(LIB_SRC)/postProcessing/incompressible \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/LESmodels \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude

EXE_LIBS = \
-lincompressiblePostProcessing \



::: /src/postProcessing/incompressible/Make/options :::

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/LESmodels \
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude

LIB_LIBS = \
-lfiniteVolume \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModels \
-lincompressibleLESmodels \
-lLESdeltas


Any idea, where could be mistake?
Thank you for you responses.
David Sponiar

bychkov January 16, 2008 13:39

Hello David, Your options f
 
Hello David,

Your options files looks good. The problem can be in the code (check header files that included in liftDrag.C utility). Also check that folder $FOAM_SRC/postProcessing/incompressible/lnInclude contain links to liftDrag.C and liftDrag.H files.

You can try to build enhanced liftDrag http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/6373
I have no problem with this on my OpenSUSEx64.

Ivan

sponiar January 17, 2008 04:00

I am sending greetings to my e
 
I am sending greetings to my eastern neighbour,
Hello Ivan.

Thanks a lot to your utility. Compilitation and building liftDrag from your prepare tool was successefuly.

It looks - how you said - like some mistake in linking header files. I checked header and linking up and I did not find any weirdly.

For completeness' sake:
• OpenFOAM-1.4.1.linux64GccDPOpt
• compilation and building Ivan's anhanced liftDragTool was successfuly,
• gcc-4.2.1 binary pack downloaded for OF 1.4.1,
• GNU linker ld 2.16.91.0.5 included in my linux distribution (I did not rebuild new binutils).

David


All times are GMT -4. The time now is 06:07.