CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Problems compiling under 14

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 16, 2007, 06:16
Default Dear All, I've just downloa
  #1
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 7
grtabor is on a distinguished road
Dear All,

I've just downloaded and installed OF1.4. All existing codes (that I have tried) work fine. However I want to alter a code and recompile. I have copied oodles from the new distribution to my personal file space, altered the Make/files file to put the executable in FOAM_USER_APPBIN rather than FOAM_APPBIN, wcleaned, and tried to compile. I get a series of messages of the form:

/tmp/ccXPo0k5.s: Assembler messages:
/tmp/ccXPo0k5.s:141552: Error: unknown pseudo-op: `.weakref'


The full complilation statement is

<gavin@lutoslawski>wmake
Making dependency list for source file oodles.C
SOURCE=oodles.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/LESmodels -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/LESmodels/LESdeltas/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/transportModels -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/sampling/lnInclude -IlnInclude -I. -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/oodles.o
/tmp/ccXPo0k5.s: Assembler messages:
/tmp/ccXPo0k5.s:141552: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141553: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141554: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141555: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141556: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141557: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141558: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141559: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141560: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141561: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141562: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141563: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141564: Error: unknown pseudo-op: `.weakref'
/tmp/ccXPo0k5.s:141565: Error: unknown pseudo-op: `.weakref'
make: *** [Make/linuxGcc4DPOpt/oodles.o] Error 1


I'm a bit confused about what is going wrong here - has anyone else had this experience, or can one of the OpenCFD guys comment on this? (Mattijis, anyone???) I'm running SuSE 9.2 on this workstation - I will try it on another one running 10.something in a minute.

Gavin
grtabor is offline   Reply With Quote

Old   April 16, 2007, 06:21
Default Seen it: the compiler you've d
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,748
Rep Power: 20
hjasak will become famous soon enough
Seen it: the compiler you've downloaded does not like your linker. All you need to do is to rebuild your own compiler and all will be well:

My gcc -v says:

wooster*149-> gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.2/configure --prefix=/usr/tmp/gcc-4.1.2 --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 4.1.2


Which will tell you how to build it. In case of trouble, bive me a buzz and we'll sort it out together.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 16, 2007, 06:22
Default BTW, who is lutoslawski??? :-)
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,748
Rep Power: 20
hjasak will become famous soon enough
BTW, who is lutoslawski??? :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 16, 2007, 06:50
Default I'm getting errors on another
  #4
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 7
grtabor is on a distinguished road
I'm getting errors on another machine; running SuSE10.something; however they seem to be cropping up earlier:


<gavin@mahler>wmake
Making dependency list for source file oodles.C
SOURCE=oodles.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/LESmodels -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/LESmodels/LESdeltas/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/transportModels -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/sampling/lnInclude -IlnInclude -I. -I/opt/foam/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc4DPOpt/oodles.o
cc1plus: error: unrecognized option `-Wextra'
cc1plus: error: bad value (opteron) for -march= switch
cc1plus: error: bad value (opteron) for -mcpu= switch
make: *** [Make/linux64Gcc4DPOpt/oodles.o] Error 1

I assume this is just a question of editing something in the wmake scripts...

Rebuilding my compiler sounds painful... any tips?

Witold Lutoslawski - Polish 20thC composer. Cf http://en.wikipedia.org/wiki/Lutoslawski for more details. All my computers are named after composers; hence `mahler' is a fairly weighty twin-processor Opteron box.

Gavin
grtabor is offline   Reply With Quote

Old   April 16, 2007, 06:51
Default For further information:
  #5
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 7
grtabor is on a distinguished road
For further information:

<gavin@lutoslawski>gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr/tmp/gcc-4.1.2 --exec-prefix=/usr/tmp/gcc-4.1.2 --enable-languages=c,c++ --enable-shared --enable-__cxa_atexit --disable-checking
Thread model: posix
gcc version 4.1.2

Gavin
grtabor is offline   Reply With Quote

Old   April 16, 2007, 12:30
Default Hello, I had the exact same
  #6
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 12
mbeaudoin will become famous soon enough
Hello,

I had the exact same problems recompiling OpenFOAM 1.4 on an older RedHat system, even though I took the time to recompile gcc for that system beforehand.

From your error message, you can see that your local assembler ("as") is barfing on probably some of the newer assembler code that is generated by gcc 4.2.1.

I don't know why gcc 4.2.1 generates those assembler code even though it was compiled locally with the local assembler, and that the "configure" script for gcc should take care of identifying and adjusting for those "incompatibility" issues. This is probably documented somewhere on the GCC mailing list.

All of this to say that I no longer expect my local default assembler "as" and linker "ld" to be compatible with those spanky new gcc compilers that are proposed for OpenFOAM. With OpenFOAM 1.3, I had some weird linker problems, we had the "missing demangle.h" problem, and now, with OF 1.4, it is the assembler that is complaining.

That's why for now on I will always install along side my new gcc compilers the latest version of the package binutils which provides me with the latest version of "as" and "ld", demangle.h, etc.

And I make sure to adjust my PATH in order for the new gcc to pick up those "newer" versions of the binutils tools instead of the one installed by default with my workstation OS.

For your information, the whole procedure for recompiling OpenFOAM, gcc, binutils, paraview, etc is described on this OpenFOAM How-To:

http://openfoamwiki.net/index.php/Ho...mpile_OpenFOAM

This is pain, I know, but unless you upgrade your workstations to the same OS the people of OpenCFD is using, you will probably stumble on a few of those problems depending if your workstation OS is getting a tad old (like mine).

My two cents...

Martin
mbeaudoin is offline   Reply With Quote

Old   April 16, 2007, 13:10
Default Hi, In my opinion Hrv is righ
  #7
Member
 
rafal zietara
Join Date: Mar 2009
Location: Manchester, UK
Posts: 60
Rep Power: 7
rafal is on a distinguished road
Hi,
In my opinion Hrv is right, this is version
mismatch of several tools. I got this kind
error after upgrading gcc.
I dont know SuSe too much but on Gentoo
when you change gcc you have to follow
some scheme(below). Gentoo is a project of linux
from scratch so the instructions should apply
to all linux flavours
here is the procedure adopted from gentoo:

install binutils gcc-config glibc gcc
env-update
source /etc/profile
install binutils gcc-config glibc gcc
env-update
source /etc/profile
+ emergeing system twice(dont need
on other linux types i assume)

why do you do this twice?
Well, first time you compile your toolchain
with old gcc and than you compile gcc with your
new optimized like you want gcc

on SuSe it can be differently since SuSe has
lots of binaries and nobody compiles everything
hope this helps
rafal
rafal is offline   Reply With Quote

Old   April 19, 2007, 17:50
Default Hello, I had the same probl
  #8
Member
 
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 60
Rep Power: 7
anger is on a distinguished road
Hello,

I had the same problem about 'weakref' as Gavin.
I'm using a Gnu/Linux machine which origins from a Kanotix installation thus is basically a Debian/Sid.
The commands
apt-get update
apt-get install binutils
resolved the problem for me.

Regards,
-Thomas
anger is offline   Reply With Quote

Old   May 14, 2007, 13:03
Default Under SuSe9.3 I also had this
  #9
shu
New Member
 
Bitan SHU
Join Date: Mar 2009
Posts: 14
Rep Power: 7
shu is on a distinguished road
Under SuSe9.3 I also had this problem. I could compile nothing. Then I deinstalled
gcc-4.1.2.linux.tgz and installed gcc-4.1.2.linux-old.tgz. After that everything is ok.


Bitan
shu is offline   Reply With Quote

Old   July 17, 2007, 23:34
Default Hi, Im working with OpenFOA
  #10
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 7
oscar_j is on a distinguished road
Hi,

Im working with OpenFOAM-1.4 and when I try to compile a code (for example turbFoam, in turbfoam directory) I get:

bash-3.1$ wmake
Making dependency list for source file turbFoam.C
SOURCE=turbFoam.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/oscarj/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -I/home/oscarj/OpenFOAM/OpenFOAM-1.4/src/turbulenceModels -I/home/oscarj/OpenFOAM/OpenFOAM-1.4/src/transportModels -IlnInclude -I. -I/home/oscarj/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/turbFoam.o
/tmp/cc5W43cJ.s: Assembler messages:
/tmp/cc5W43cJ.s:104031: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104032: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104033: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104034: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104035: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104036: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104037: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104038: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104039: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104040: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104041: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104042: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104043: Error: unknown pseudo-op: `.weakref'
/tmp/cc5W43cJ.s:104044: Error: unknown pseudo-op: `.weakref'
make: *** [Make/linuxGcc4DPOpt/turbFoam.o] Error 1




My gcc -v says

bash-3.1$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr/tmp/gcc-4.1.2 --exec-prefix=/usr/tmp/gcc-4.1.2 --enable-languages=c,c++ --enable-shared --enable-__cxa_atexit --disable-checking
Thread model: posix
gcc version 4.1.2

Could you help me?

Many thanks
Oscar
oscar_j is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with compiling roberthino OpenFOAM Installation 3 March 17, 2008 06:04
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
Problems on Compiling UDF in FLUENT Strawberi-KeatKeat FLUENT 1 October 4, 2006 02:50
Compiling problems chris1980 OpenFOAM Installation 7 August 6, 2006 19:13
Problems with compiling CFD code! ravi Main CFD Forum 1 July 12, 2004 12:28


All times are GMT -4. The time now is 14:48.