|
[Sponsors] |
June 12, 2007, 14:12 |
Hi,
I am compiling OpenFOAM
|
#1 |
Member
Kuan Tek Seang
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Hi,
I am compiling OpenFOAM 1.4 with gcc 4.1.2 on OpenSUSE 10.1 and had the following strange error. Any help or hints is appreciated! regards, Tek Seang SOURCE=gambitToFoam.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linux64Gcc4DPOpt/gambitToFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/tskuan/CFD/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c Make/linux64Gcc4DPOpt/gambitToFoam.C -o Make/linux64Gcc4DPOpt/gambitToFoam.o stdin:16159: m4: Warning: Excess arguments to built-in `m4_ifdef' ignored lex.yy.cc: In member function âvirtual int yyFlexLexer::yylex()â: lex.yy.cc:14023: warning: use of old-style cast lex.yy.cc:14023: warning: use of old-style cast lex.yy.cc:14039: warning: use of old-style cast lex.yy.cc:14599: warning: use of old-style cast lex.yy.cc: In member function âint yyFlexLexer::yy_get_next_buffer()â: lex.yy.cc:14847: warning: use of old-style cast lex.yy.cc:14870: warning: use of old-style cast lex.yy.cc:14883: warning: use of old-style cast lex.yy.cc:14883: warning: use of old-style cast lex.yy.cc:14904: warning: use of old-style cast lex.yy.cc: In member function âyy_state_type yyFlexLexer::yy_get_previous_state()â: lex.yy.cc:14952: warning: use of old-style cast lex.yy.cc:14952: warning: use of old-style cast lex.yy.cc: In member function âvoid yyFlexLexer::yyunput(int, char*)â: lex.yy.cc:15012: warning: use of old-style cast lex.yy.cc:15013: warning: use of old-style cast lex.yy.cc:15021: warning: use of old-style cast lex.yy.cc: In member function âint yyFlexLexer::yyinput()â: lex.yy.cc:15088: warning: use of old-style cast lex.yy.cc: In member function âvirtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)â: lex.yy.cc:15168: warning: use of old-style cast lex.yy.cc:15177: warning: use of old-style cast lex.yy.cc: In member function âvirtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)â: lex.yy.cc:15199: warning: use of old-style cast lex.yy.cc:15202: warning: use of old-style cast lex.yy.cc:15204: warning: use of old-style cast lex.yy.cc: In member function âvoid yyFlexLexer::yyensure_buffer_stack()â: lex.yy.cc:15331: warning: use of old-style cast lex.yy.cc:15349: warning: use of old-style cast lex.yy.cc: In member function âvoid yyFlexLexer::yy_push_state(int)â: lex.yy.cc:15367: warning: use of old-style cast lex.yy.cc:15370: warning: use of old-style cast lex.yy.cc:15370: warning: use of old-style cast lex.yy.cc: In function âvoid* yyalloc(yy_size_t)â: lex.yy.cc:15450: warning: use of old-style cast lex.yy.cc: In function âvoid* yyrealloc(void*, yy_size_t)â: lex.yy.cc:15462: warning: use of old-style cast lex.yy.cc:15462: warning: use of old-style cast lex.yy.cc: In function âvoid yyfree(void*)â: lex.yy.cc:15467: warning: use of old-style cast g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/tskuan/CFD/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC Make/linux64Gcc4DPOpt/gambitToFoam.o -L/home/tskuan/CFD/OpenFOAM/OpenFOAM-1.4/lib/linux64Gcc4DPOpt \ -lOpenFOAM -liberty -ldl -lm -o /home/tskuan/CFD/OpenFOAM/OpenFOAM-1.4/applications/bin/linux64Gcc4DPOpt/gambitT oFoam /usr/lib/../lib64/crt1.o: In function `_start': init.c.text+0x20): undefined reference to `main' collect2: ld returned 1 exit status make: *** [/home/tskuan/CFD/OpenFOAM/OpenFOAM-1.4/applications/bin/linux64Gcc4DPOpt/gambit ToFoam] Error 1 |
|
June 12, 2007, 14:53 |
Think it was that that version
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Think it was that that version of flex++ does not like ']]'. Put space inbetween any two angle brackets in gambitToFoam.L
|
|
June 13, 2007, 00:33 |
Hi Mattijs,
thanks for your
|
#3 |
Member
Kuan Tek Seang
Join Date: Mar 2009
Posts: 31
Rep Power: 17 |
Hi Mattijs,
thanks for your suggestion! that worked wonders! The flex++ version i am using is 2.5.31 regards, Tek Seang |
|
June 20, 2007, 11:04 |
Had the same problem on an Ubu
|
#4 |
Senior Member
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 17 |
Had the same problem on an Ubuntu (debian based) machine.
Also change: ansysToFoam.L fluentToFoam.L as suggested by Mattijs. |
|
July 2, 2007, 03:08 |
Had a similar problem when try
|
#5 |
Member
Stefan Radl
Join Date: Mar 2009
Location: Graz, Austria
Posts: 82
Rep Power: 18 |
Had a similar problem when trying to compile a new viscosity model (should give a new library). The error message is:
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crt1.o: In function `_start': ../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' Followed by a bunch of other error messages Can anyone help? br Stefan |
|
July 2, 2007, 04:33 |
Use 'wmake libso' if you are c
|
#6 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Use 'wmake libso' if you are compiling a library.
A plain 'wmake' will attempt to create an application, which requires 'main()' and yields a failure if it is missing. |
|
January 30, 2014, 01:22 |
Similar error
|
#7 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
Hi,
I know this is a really old thread. But i get a similar error. I am not compiling a library, just a solver. However, I still get this error message. Code:
/usr/lib/../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: ld returned 1 exit status make: *** [/home1/ms/me12s056/OpenFOAM/me12s056-2.1.1/platforms/linux64GccDPOpt/bin/thermoSolutalPisoFoam] Error 1
__________________
Regards, Srivaths |
|
February 1, 2014, 14:19 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Srivaths,
This isn't enough information to work with, so here are some questions, to help isolate the source of the problem:
Bruno
__________________
|
|
February 1, 2014, 14:48 |
|
#9 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13 |
Hello Bruno,
I am using Ubuntu 12.04 32 bit system. The 2.1.1 version was on a cluster that i'm running my cases on. I would like to say that I've got the issue resolved. It was a beginner's error and I just didn't spot it initially. Thank you for your time.
__________________
Regards, Srivaths |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Undefined reference to %60yyFlexLexeryywrapb | arjaan | OpenFOAM Installation | 13 | June 1, 2016 13:33 |
Undefined reference | mateusz_slowikowski | OpenFOAM Running, Solving & CFD | 7 | February 27, 2015 15:35 |
Undefined reference to %60yyFlexLexeryywrapb | zhoubinwx | OpenFOAM Bugs | 1 | May 28, 2008 06:57 |
Undefined reference | mateusz_slowikowski | OpenFOAM Running, Solving & CFD | 3 | March 11, 2008 13:19 |
Compiling liftDrag crashed with initc%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartsadgif%22 ALT%3d%22%22 BORDER%3d0%3etext0x20 undefined reference to %60mainb | sponiar | OpenFOAM Running, Solving & CFD | 2 | January 17, 2008 05:00 |