CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Compiling liftDrag crashed with initc%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartsadgi f%22 ALT%3d%22%22 BORDER%3d0%3etext0x20 undefined reference to %60mainb

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2008, 09:05
Default Good afternoon to forum, I wo
  #1
New Member
 
David Sponiar
Join Date: Mar 2009
Location: Prague, Czech rep.
Posts: 27
Rep Power: 17
sponiar is on a distinguished road
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.c.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
sponiar is offline   Reply With Quote

Old   January 16, 2008, 13:39
Default Hello David, Your options f
  #2
New Member
 
Ivan Bychkov
Join Date: Mar 2009
Location: Moscow, Russia
Posts: 7
Rep Power: 17
bychkov is on a distinguished road
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
bychkov is offline   Reply With Quote

Old   January 17, 2008, 04:00
Default I am sending greetings to my e
  #3
New Member
 
David Sponiar
Join Date: Mar 2009
Location: Prague, Czech rep.
Posts: 27
Rep Power: 17
sponiar is on a distinguished road
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
sponiar is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference to %60mainb seang OpenFOAM Installation 8 February 1, 2014 13:48
FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp rengu OpenFOAM Running, Solving & CFD 5 March 3, 2009 10:19
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp nishant_hull OpenFOAM Running, Solving & CFD 18 October 30, 2007 13:52
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp guimch OpenFOAM Running, Solving & CFD 6 October 25, 2007 17:52
Cannot find liberty %3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumcliparthappygif%22 ALT%3d%22%22 BORDER%3d0%3e panara OpenFOAM Installation 5 August 10, 2007 14:39


All times are GMT -4. The time now is 02:55.