CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   compiler problem? (https://www.cfd-online.com/Forums/openfoam-installation/64810-compiler-problem.html)

thomasduerr May 25, 2009 10:39

compiler problem?
 
Hi folks,

I have a quick question about the recompilation of OF solvers:

I have all OF-1.5 installed and everything is running perfectly. However now I wanted/had to change some pieces of the code, when I want to recompile the solver using the wclean/wmake combination I receive an error message

>wclean
>wmake

Making dependency list for source file tractionDisplacement/tractionDisplacement FvPatchVectorField.C
Making dependency list for source file solidDisplacementFoam.C
SOURCE=tractionDisplacement/tractionDisplacementFvPatchVectorField.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-s tyle-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/acrobat /OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -ItractionDisplacement /lnInclude -IlnInclude -I. -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/Ope nFOAM/lnInclude -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Uni x/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/tractionDisplacementFvPat chVectorField.o
SOURCE=solidDisplacementFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -Itr actionDisplacement/lnInclude -IlnInclude -I. -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/acrobat/we be_ol/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/solidDisplacementFoam.o
readSolidDisplacementFoamControls.H: In function ‘int main(int, char**)’:
readSolidDisplacementFoamControls.H:3: warning: unused variable ‘nCorr’
readSolidDisplacementFoamControls.H:4: warning: unused variable ‘convergenceTolerance’
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -ItractionDisplacement/lnInclude -IlnInclude -I. -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/acrobat/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/tractionDisplacementFvPatchVectorField.o Make/linux64GccDPOpt/solidDisplacementFoam.o -L/home/acrobat/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
-lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/acrobat/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/solidDisplacementFoam
/home/acrobat/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../lib64/libstdc++.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/home/acrobat/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/solidDisplacementFoam] Error 1

Can someone please help me here? I also tried to recompile the full code from source files but also get errors.....

Thanks a lot for your help,
Regards,
Thomas

hellorishi May 27, 2009 03:43

Hi Thomas,

Can you post the output of foamInstallationTest ?

Did you download correct binaries-- i.e. 32 or 64 bit according to your machine?

Rishi

gwierink May 28, 2009 02:39

Hi Thomas,

Does the solver without any changes (re)compile? Try to compile the original solver to see if it is a compiler or lib issue. If not, it looks like there are some code lines incorrect or incomplete. In the latter case, can you share what you are trying to do, just to check the code?

Regards,

Gijsbert

thomasduerr May 28, 2009 08:24

Hi guys,

thanks a lot for your posts!
I managed to solve it by downloading precomiled binaries of gcc-4.2.1 from the web.
Then I adjusted the folders 100% as in the ThirdParty gcc-4-3-1 and changed the settings.sh to source gcc 421 and it works....!

I don't have a clue why it does not work with 4.3.1 on workstations but 4.2.1 solves it!

Thanks a lot again
Thomas


All times are GMT -4. The time now is 08:49.