CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   kubuntu 12.04 - error during compiling OpenFoam (http://www.cfd-online.com/Forums/openfoam-installation/101618-kubuntu-12-04-error-during-compiling-openfoam.html)

fisch May 9, 2012 03:45

kubuntu 12.04 - error during compiling OpenFoam
 
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

wyldckat May 9, 2012 08:46

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

fisch May 9, 2012 11:07

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

wyldckat May 9, 2012 17:58

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

fisch May 10, 2012 03:45

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...

kmooney March 21, 2013 21:17

I encountered a similar issue and this resolved it completely. Thanks!

Quote:

Originally Posted by wyldckat (Post 360177)
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



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