CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFOAM141dev linking error on IBM AIX 52

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2007, 21:48
Default Hello, I got the following
  #1
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
Hello,

I got the following error when compiling the applications of the OF-1.4.1-dev version. All libraries (without mico) compiled fine after some modifications of the printstack and clocktime sources.


g++ -maix64 -Dibm64 -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude -fPIC -fpermissive -Wl,-brtl -lpthread -L/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/ibm64GccDPOpt/poe -lPstream -Wl,-binitfini:poe_remote_main -lmpi_r -lvtd_r -llapi_r -lpthreads -L/usr/lpp/ppe.poe/lib/threads -L/usr/lpp/ppe.poe/lib -L/usr/lpp/ppe.poe/lib/ip -Wl,-bnoquiet -L/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/ibm64GccDPOpt \
-lfiniteVolume -lOpenFOAM -liberty -o /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/applications/bin/ibm64GccDPOpt/lapl acianFoam
(ld): setopt 64
(ld): halt 4
(ld): setopt r/o->w
(ld): setopt nodelcsect
(ld): setopt rtl
(ld): setopt rtllib
(ld): setopt symbolic:1
(ld): lrgpage 0
(ld): savename /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/applications/bin/ibm64GccDPOpt/lapl acianFoam
(ld): filelist 15 1
(ld): i /lib/crt0_64.o
(ld): i /fastfs/tmp/mvimixer/dialog.tmpdir.berni1.1507428//ccUVzWCZ.o
(ld): lib /usr/lib/libpthread.a
(ld): lib /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/ibm64GccDPOpt/poe/libPstream.so
(ld): lib /usr/lpp/ppe.poe/lib/libmpi_r.a
(ld): lib /usr/lib/liblapi_r.a
(ld): lib /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/ibm64GccDPOpt/libfiniteVolume.s o
(ld): lib /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/ibm64GccDPOpt/libOpenFOAM.so
(ld): lib /aws/sw/ppc/gcc-4.0.2/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.2/../../../ppc64 /libiberty.a
(ld): lib /aws/sw/ppc/gcc-4.0.2/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.2/../../../ppc64 /libstdc++.a
(ld): lib /usr/lib/libm.a
(ld): lib /aws/sw/ppc/gcc-4.0.2/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.2/../../../ppc64 /libgcc_s.a
(ld): i /aws/sw/ppc/gcc-4.0.2/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.2/ppc64/libgcc.a
(ld): lib /usr/lpp/ppe.poe/lib/threads/libc.a
(ld): lib /usr/lib/librtl.a
LIBRARY: Shared object libpthread.a[shr_xpg5_64.o]: 285 symbols imported.
LIBRARY: Shared object libPstream.so: 46 symbols imported.
LIBRARY: Shared object libmpi_r.a[mpci64_r.o]: 45 symbols imported.
LIBRARY: Shared object libmpi_r.a[mpicore64_r.o]: 648 symbols imported.
LIBRARY: Shared object libmpi_r.a[mpifort64_r.o]: 1580 symbols imported.
LIBRARY: Shared object libmpi_r.a[mpipoe64_r.o]: 113 symbols imported.
LIBRARY: Shared object libmpi_r.a[mpicpp64_r.o]: 24 symbols imported.
LIBRARY: Shared object libmpi_r.a[dynamic64_r.o]: 22 symbols imported.
LIBRARY: Shared object libmpi_r.a[pm_chkrst64_r.o]: 3 symbols imported.
LIBRARY: Shared object liblapi_r.a[liblapi64_r.o]: 347 symbols imported.
LIBRARY: Shared object liblapi_r.a[liblapirdma64_r.o]: 2 symbols imported.
LIBRARY: Shared object liblapi_r.a[liblapishm64_r.o]: 6 symbols imported.
LIBRARY: Shared object liblapi_r.a[liblapiudp64_r.o]: 4 symbols imported.
LIBRARY: Shared object libfiniteVolume.so: 0 symbols imported.
LIBRARY: Shared object libOpenFOAM.so: 7586 symbols imported.
LIBRARY: Shared object libstdc++.a[libstdc++.so.6]: 3769 symbols imported.
LIBRARY: Shared object libgcc_s.a[shr.o]: 114 symbols imported.
LIBRARY: Shared object libc.a[shr_64.o]: 2370 symbols imported.
LIBRARY: Shared object libc.a[posix_aio_64.o]: 17 symbols imported.
LIBRARY: Shared object libc.a[aio_64.o]: 11 symbols imported.
LIBRARY: Shared object libc.a[pse_64.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl_64.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty_64.o]: 1 symbols imported.
LIBRARY: Shared object librtl.a[lazy42_64.o]: 3 symbols imported.
FILELIST: Number of previously inserted files processed: 15
(ld): initfini poe_remote_main
(ld): initfini _GLOBAL__FI_laplacianFoam _GLOBAL__FD_laplacianFoam
(ld): resolve
RESOLVE: 77 of 18932 symbols were kept.
(ld): addgl /usr/lib/glink64.o
ADDGL: Glink code added for 11 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
-------------------------------------------------------------------------------- --------------
ld: 0711-317 ERROR: Undefined symbol: .main
.main [10] ER PR crt0_64.s(/lib/crt0_64.o)
00000090 .text R_RBR [34] .__start
ER: The return code is 8.
collect2: ld returned 8 exit status



I don't know the library including the symbol '.main'.

Any suggestions?

Best regards,
Matthias
matthias is offline   Reply With Quote

Old   November 25, 2007, 04:12
Default Your error messages look VERY
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,902
Rep Power: 33
hjasak will become famous soon enough
Your error messages look VERY strange - it looks like the linker crashed while trying to link the laplacianFoam executable.

For the reference, it is laplacianFoam.o that will contain the symbol main.

Could you try compiling helloWorld with this compiler? Did you build the compiler yourself or did you download it from somewhere?

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

Old   November 25, 2007, 13:08
Default No, i used an existing gcc com
  #3
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
No, i used an existing gcc compiler (gcc-4.0.2) with the system linker of AIX. You cannot build the gnu binutils for an AIX system, because they are not portable to AIX, so i have to use the system ld.

OF 1.4 works fine, but compiling of OF-1.4.1-dev (only the applications, the libraries are OK) with the same settings like OF-1.4 has failed.

Applications like foamFlex++ are working without problems. Further i had big trouble with the native sed command under AIX. It seems that OF-1.4.1-dev can not build the right paths in the dependency files. The path always looks like:

../OpenFOAM-1.4.1-dev.1-dev/...

While using gnu sed the problem has not occured.

I am trying to compile a newer version of gcc for AIX, maybe it solves the problem?!
matthias is offline   Reply With Quote

Old   November 27, 2007, 04:13
Default The only sensible place to che
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,902
Rep Power: 33
hjasak will become famous soon enough
The only sensible place to check is wmake/rules/<your> as the mechanics of the rest remains very similar. The other indication is that your error seems to occur only when linking with libraries. Try building magU or something similarly simple and chase it all the way through.

The most indicative message from your report is

(ld): er full

so something nasty happened to your linker. Did you run out of disk space?

As for sed, we all know that AIX sed is rubbish. On various platforms I also har trouble with tar, gzip and similar, so no surprise there. Use Gnu tools and all will be well. (BTW, did you consider using a gnu linker?)

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

Old   November 27, 2007, 09:53
Default Hi Matthias, Another strange
  #5
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
Hi Matthias,
Another strange thing I noticed is that the linking command line does not include the object file name to be linked, which should be something like Make/ibm64GccDpOpt/laplacianFoam.o...?!

Takuya
7islands is offline   Reply With Quote

Old   November 27, 2007, 21:08
Default Hello Takuya, the missing c
  #6
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
Hello Takuya,

the missing command line Make/ibm64GccDpOpt/laplacianFoam.o already exists but i used copy and paste for including the message and thereby it must be something went wrong, sorry for that, my fault.

@Hrvoje
As mentioned earlier, the binutils which including the gnu linker are not portable to AIX. So far as i know it is a mission impossible to compile gnu ld on AIX systems. Only the native AIX linker works.

At the moment i am still trying to compile a new gcc version and i will also look for some useful AIX linker flags, maybe it helps.

Matthias
matthias is offline   Reply With Quote

Old   November 30, 2007, 13:13
Default Matthias, can you post the cha
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Matthias, can you post the changes that you need to make to the OpenFOAM source (i.e. wmake rules, paths etc.) in order to compile it on AIX? It would be very useful. Thanks!
msrinath80 is offline   Reply With Quote

Old   December 13, 2007, 17:25
Default Matthias, Did you succeed in g
  #8
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Matthias, Did you succeed in getting OpenFOAM to build on AIX? I would love to hear your experience in this regard.
msrinath80 is offline   Reply With Quote

Old   December 17, 2007, 11:38
Default Yeah, I got it. Although it wa
  #9
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
Yeah, I got it. Although it was tricky, but finally I made it. I had to modify some parts of the source code, I will write a short HowTo in our wiki and send a link to this thread.
matthias is offline   Reply With Quote

Old   December 17, 2007, 15:01
Default Thanks Matthias, your help is
  #10
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks Matthias, your help is much appreciated
msrinath80 is offline   Reply With Quote

Old   January 6, 2008, 06:56
Default Matthias, just a friendly remi
  #11
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Matthias, just a friendly reminder. I would appreciate if you could post the changes you made to get OF to compile on AIX. Thanks.
msrinath80 is offline   Reply With Quote

Old   January 7, 2008, 08:32
Default Hi Srinath, I checked out t
  #12
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
Hi Srinath,

I checked out the latest OF-1.4.1-dev version from sourceforge svn repository to test my little HowTo. I noticed that there were differences between my and the svn version. So that is the reason for the delay, I had to modify my instructions.

PREFACE:
-We use an AIX 5.2 system for parallel computing only and not for development tasks
-The entire java stuff is not important for our work, so it doesn't work and I have no time to make it work
-the following instructions have been worked out for running openfoam on our aix system, I don't guarantee that OF will work on other AIX machines with these instructions
-we use the native IBM AIX parallel environment POE and not LAM or MPICH
-very important: you have to use another wmake/rules file for IBM AIX machines, the linux ones don't work, because there are differences between compiler and linker flags on linux and AIX machines
-I have used the gnu compiler 4.0.2 and the system linker to build OF, you can use every working gnu compiler greater then 4.0.1 but you cannot use the gnu linker, because the gnu linker and AIX are not compatible (problem with linking shared libraries)
-It is possible that you have to rebuild the gnu stuff like sed, grep, find and so on but it depends on your AIX system
-Finally, we have still problems with OF and the AIX system, if I want to build the solvers with parallel support I had to modify a line in our wmake/rules/ibm file which contains all the poe stuff but after including poe I can't build the apps (blockMesh, decomposeParDict etc..) without parallel support, for that I must remove the line in the wmake/rules/ibm file, that is very annoying.
-AND there are still big problems with the wmake scripting under our AIX system, I have NO solution for these problems, I created just a workaround but that is not the ultimate solution

Okay in the next listing I write the instructions!
matthias is offline   Reply With Quote

Old   January 7, 2008, 09:44
Default 1 .OpenFOAM/bashrc # IBM RS
  #13
Member
 
Matthias Walter
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 63
Rep Power: 17
matthias is on a distinguished road
1 .OpenFOAM/bashrc

# IBM RS6000
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

elif [ "$machineTest" = "AIX" ]; then

export WM_ARCH=ibm64
export WM_MPLIB=POE


2 .bashrc

elif [ .$WM_MPLIB = .POE ]; then

export POE_VERSION=
export POE_HOME=/usr/lpp/ppe.poe
export POE_ARCH_PATH=/usr/lpp/ppe.poe

AddLib $POE_ARCH_PATH/lib
AddPath $POE_ARCH_PATH/bin

export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/poe

3 create wmake/rules/ibm64Gcc4 directory
set correct rule files

4 building foamFlex

remove from wmake/rules/ibm64Gcc4/c++
in line begining with LINKEXE all the POE (MPI) stuff ,incl. lPstream

after foamFlex has been build add all the POE (MPI) stuff again, don't forgett lPstream

5 This is one of the problems mentioned earlier, I don't know if it concerns our machine only or if it is a general bug under AIX 5.2

when he is linking, then the message occurs:

"linking include files to ..../OpenFOAM/OpenFOAM-1.4.1-dev.1-dev/....."

I don't know the cause!!! My workaround is

in 'wmake/scripts/addCompile' comment out
sed -e s%$WM_PROJECT_DIR%'$(WM_PROJECT_DIR)'% > $depName

and set the absolute Path (Caution: Please leave '.1-dev' from the path name)

sed -e s%$WM_PROJECT_DIR%/.../OpenFOAM/OpenFOAM-1.4% > $depName

!!! I don't know if you have to do that, so please try it out before you make changes in the addCompile file!!!

6 src/OpenFOAM/OSspecific/Unix/clockTime/clockTime.H

comment out line 41 and 43 so that #include <sys/time.h> is included

7
comment out
#include <execinfo.h>

void printSourceFileAndLine(...)
{
/*
....
*/
}

error:printStack(...)
{
/*
....
*/
}


8
src/triSurface/triSurface/interfaces/NAS/readNAS.C

replace pow10(exp) with pow(10,exp)

9 src/malloc/fbsdmalloc

set environment variable OBJECT_MODE

export OBJECT_MODE=64

10 see number 5; now OF wanted to build the solvers and apps. Here I get the following error after wmake all:

...../OpenFOAM/OpenFOAM-1.4.1-dev/wmake/wmake[183]: : 0031-045 sigaction(SIGSEGV)
make: *** empty string invalid as file name. Stop.

I don't know the causes, it seems that the AIX system has trouble to properly execute the wmake scripts.

my workaround:

Build the important solver and apps on your own. You can go to the subdirectory and make a wmake by hand, thats all!
But please pay attention to my comments in the last listing regarding the building of solvers/apps with and without POE,MPI support


I hope this helps you! Good luck!

Matthias
matthias is offline   Reply With Quote

Old   January 7, 2008, 15:33
Default Thanks Matthias. I'll give it
  #14
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thanks Matthias. I'll give it a shot soon.
msrinath80 is offline   Reply With Quote

Old   January 8, 2008, 09:06
Default Hi Srinath, please forget a
  #15
Senior Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 123
Rep Power: 18
hannes is on a distinguished road
Hi Srinath,

please forget about the hack in Step 5 (addCompile script). We have found the problem. The environment on our machine was messed up with some values from the old version 1.4.

Best regards, Hannes
__________________
silentdynamics GmbH - http://silentdynamics.de
open source CAE software solutions & support
hannes is offline   Reply With Quote

Old   January 8, 2008, 13:29
Default Hi again, and the error in
  #16
Senior Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 123
Rep Power: 18
hannes is on a distinguished road
Hi again,

and the error in step 10 can be removed by modifying the wmake script. Change line 183 from:

$make -k -f $WM_DIR/MakefileApps FOAM_APPS="`find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name "Make" \) -printf "%f "`"

to

$make -k -f $WM_DIR/MakefileApps FOAM_APPS="$(find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name "Make" \) -printf "%f ")"

The apostrophs ` ` have been replaced by $( )

Best regards, Hannes
__________________
silentdynamics GmbH - http://silentdynamics.de
open source CAE software solutions & support
hannes is offline   Reply With Quote

Old   January 8, 2008, 18:25
Default Thank you Hannes.
  #17
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Thank you Hannes.
msrinath80 is offline   Reply With Quote

Old   March 24, 2008, 11:16
Default Hello, I plan to install Op
  #18
New Member
 
Shivasubramanian Gopalakrishnan
Join Date: Mar 2009
Location: Amherst, Massachusetts, USA
Posts: 15
Rep Power: 17
shivasub is on a distinguished road
Hello,

I plan to install OpenFOAM on an AIX 5.3 system sometime soon(I don't have access to the machine yet). Have been going through some of the AIX threads and looking at the suggestions posted.

Has anyone tried using the AIX Toolbox for Linux Applications ? Is it helpful and does it make the job of installation any easier?

regards
Shiva
shivasub is offline   Reply With Quote

Old   March 28, 2008, 15:17
Default Shiva, The quickest way is
  #19
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Shiva,

The quickest way is to install GNU/Linux on the AIX machine. Saves a lot of time and headache. The harder way is to try and do work like Matthias has described. If you are new to OpenFOAM, my suggestion is that you try and do at least one fresh build from source all by yourself (on GNU/Linux) to get a feel first. Compiling from source on GNU/Linux isn't trivial either. Follow the instructions[1] in the wiki. Personally, I've rebuilt OpenFOAM like 10-12 times from scratch and thus am reasonably comfortable with unexpected installation hiccups.

[1] http://openfoamwiki.net/index.php/Ho...mpile_OpenFOAM
msrinath80 is offline   Reply With Quote

Old   March 30, 2008, 00:50
Default Hi Srinath, Thanks for the
  #20
New Member
 
Shivasubramanian Gopalakrishnan
Join Date: Mar 2009
Location: Amherst, Massachusetts, USA
Posts: 15
Rep Power: 17
shivasub is on a distinguished road
Hi Srinath,

Thanks for the pointer. Unfortunately the machine on which I need to install OpenFOAM is not owned by my research group and hence I cannot replace the OS.

I have been using OpenFOAM for more than a year now and have built it before (though not 10 - 12 times ) on Linux machines. The ongoing attempt is first on AIX. Will post details of my attempts, failures and successes.

-Shiva
shivasub 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
OpenFOAM141dev A new implementation of dynamicKistlerGammaContactAngle eberberovic OpenFOAM Running, Solving & CFD 26 June 10, 2021 05:08
Installing OpenFoam141dev vtk errors cvv OpenFOAM Installation 0 February 11, 2009 03:54
SpaceVaryingGammaContactAngle in OpenFOAM141dev asaha OpenFOAM Running, Solving & CFD 0 January 23, 2009 11:16
Error compiling OpenFOAM141dev on Ubuntu 710 andersking OpenFOAM Bugs 1 January 16, 2008 06:43
CoupledFvScalarMatrix in OpenFOAM141dev oleg_weinstein OpenFOAM Installation 6 December 13, 2007 14:16


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