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

kubuntu 12.04 - error during compiling OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2012, 04:45
Default kubuntu 12.04 - error during compiling OpenFoam
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
Hi,

i updated my kubuntu to version 12.04.
before i had a running version of OpenFoam 2.1.x on my machine.
Now i get problems during compiling/linking openFOAM with the icc:

These are the first lines of my console output...

Code:
ld: Make/linux64IccDPOpt/applyBoundaryLayer.o: undefined reference to symbol '_ZN4Foam14incompressible15turbulenceModel8typeNameE'
ld: note: '_ZN4Foam14incompressible15turbulenceModel8typeNameE' is defined in DSO /home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/libincompressibleTurbulenceModel.so so try adding it to the linker command line
/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/libincompressibleTurbulenceModel.so: could not read symbols: Invalid operation
make[2]: *** [/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/applyBoundaryLayer] Error 1
make[1]: *** [applyBoundaryLayer] Error 2
ld: Make/linux64IccDPOpt/PDRMesh.o: undefined reference to symbol '_ZN4Foam9UOPstream5writeENS_8UPstream10commsTypesEiPKcli'
ld: note: '_ZN4Foam9UOPstream5writeENS_8UPstream10commsTypesEiPKcli' is defined in DSO /home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/impi-4.0.3/libPstream.so so try adding it to the linker command line
/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/impi-4.0.3/libPstream.so: could not read symbols: Invalid operation
make[2]: `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/surfaceOrient' is up to date.
make[3]: *** [/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/PDRMesh] Error 1
make[2]: *** [PDRMesh] Error 2


Has anybody an idea how to fix this???

thanks a lot.

rupert
fisch is offline   Reply With Quote

Old   May 9, 2012, 09:46
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings fisch,

  1. You didn't mention from which Kubuntu version you upgraded from!?
  2. And which Gcc version were you using before the upgrade?
  3. Is that error occurring with a new build or were you just updating?

For rebuilding OpenFOAM:
Code:
foam
wclean all
wmSET #update the OpenFOAM shell environment...
export WM_NCOMPPROCS=4
./Allwmake
If you upgraded from Kubuntu 10.04 or you were using Gcc < 4.6, then see this post: http://www.cfd-online.com/Forums/ope...oam-2-0-x.html

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 9, 2012, 12:07
Default
  #3
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
Hi,

I used kubuntu 11.10 (oneiric) before
For OpenFOAM i used the intel icc 12.1 compiler (which i still try to use)

The error occured during updating openfoam (because i changed something) and then during a complete new installation.

1) i tried your instruction and reinstalled openFOAM. i think i maybe forgot one step.
Now the first error message sounds:
Code:
icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xHost -O3 -no-prec-div  -DNoRepository -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/dynamicMesh/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude   -fPIC  Make/linux64IccDPOpt/PDRMesh.o -L/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib \
             -lmeshTools -ldynamicMesh -lfiniteVolume -lcompressibleRASModels -lOpenFOAM -ldl   -L/lib -lm -o /home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/PDRMesh
ld: Make/linux64IccDPOpt/PDRMesh.o: undefined reference to symbol '_ZN4Foam9UOPstream5writeENS_8UPstream10commsTypesEiPKcli'
ld: note: '_ZN4Foam9UOPstream5writeENS_8UPstream10commsTypesEiPKcli' is defined in DSO /home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/impi-4.0.3/libPstream.so so try adding it to the linker command line
/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib/impi-4.0.3/libPstream.so: could not read symbols: Invalid operation
make[3]: *** [/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/PDRMesh] Error 1
make[3]: Leaving directory `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/applications/utilities/mesh/advanced/PDRMesh'
make[2]: *** [PDRMesh] Error 2
It seems that there is no progress up to now...
Any idea??

thanks
fisch is offline   Reply With Quote

Old   May 9, 2012, 18:58
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi fisch,

It's weird a bit strange that I/we didn't pick up on this before on Ubuntu 11.10, but here is a likely solution:
  1. Using as reference the file "wmake/rules/linux64Gcc/c++", modify the last two lines on "wmake/rules/linux64Icc/c++" the same way, namely modify these two lines on the second file:
    Code:
    LINKLIBSO   = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
    LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
  2. Using as reference the file "wmake/rules/linux64Gcc/c", modify the last two lines on "wmake/rules/linux64Icc/c" the same way, namely modify these two lines on the second file:
    Code:
    LINKLIBSO   = $(cc) $(cFLAGS) -shared
    LINKEXE     = $(cc) $(cFLAGS) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
Hopefully this will fix the linking problem, which was something that was already reported back when Ubuntu 11.10 was released, but only affected Gcc back then!


Best regards,
Bruno
kmooney likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 10, 2012, 04:45
Default
  #5
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
Hi again,

thanks Bruno for your help.

The two mentioned errors vanished; cheers.

Now the following error was left:

Code:
make[3]: Entering directory `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/applications/utilities/mesh/manipulation/setSet'
icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xHost -O3 -no-prec-div  -DNoRepository -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -DHAS_READLINE -IlnInclude -I. -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude   -fPIC  -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64IccDPOpt/writePointSet.o Make/linux64IccDPOpt/writeFuns.o Make/linux64IccDPOpt/writePatch.o Make/linux64IccDPOpt/setSet.o -L/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/lib \
             -lmeshTools -lreadline -lncurses -lOpenFOAM -ldl   -L/lib -lm -o /home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/setSet
ld: cannot find -lncurses
make[3]: *** [/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64IccDPOpt/bin/setSet] Error 1
make[3]: Leaving directory `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/applications/utilities/mesh/manipulation/setSet'
make[2]: *** [setSet] Error 2
.
.
.
make[2]: Target `application' not remade because of errors.
make[2]: Leaving directory `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/applications/utilities/mesh/manipulation'
make[1]: *** [manipulation] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/rupert/software/OpenFOAM/OpenFOAM-2.1.x/applications/utilities/mesh'
make: *** [mesh] Error 2

therefor i just installed the ncurses package with
Code:
sudo apt-get install libncurses5-dev

Now it's compiling nicely...
fisch is offline   Reply With Quote

Old   March 21, 2013, 21:17
Default
  #6
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
I encountered a similar issue and this resolved it completely. Thanks!

Quote:
Originally Posted by wyldckat View Post
Hi fisch,

It's weird a bit strange that I/we didn't pick up on this before on Ubuntu 11.10, but here is a likely solution:
  1. Using as reference the file "wmake/rules/linux64Gcc/c++", modify the last two lines on "wmake/rules/linux64Icc/c++" the same way, namely modify these two lines on the second file:
    Code:
    LINKLIBSO   = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
    LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
  2. Using as reference the file "wmake/rules/linux64Gcc/c", modify the last two lines on "wmake/rules/linux64Icc/c" the same way, namely modify these two lines on the second file:
    Code:
    LINKLIBSO   = $(cc) $(cFLAGS) -shared
    LINKEXE     = $(cc) $(cFLAGS) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
Hopefully this will fix the linking problem, which was something that was already reported back when Ubuntu 11.10 was released, but only affected Gcc back then!


Best regards,
Bruno
kmooney is offline   Reply With Quote

Reply


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
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 10:38
OpenFOAM Training in Europe and USA hjasak OpenFOAM 0 August 8, 2008 06:33
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 09:54
Compiling OpenFOAM 12 in Single Precision fra76 OpenFOAM Installation 5 April 21, 2006 13:05
Compiling openfoam zaferleylek OpenFOAM Installation 0 November 7, 2005 08:01


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