CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Cannot compile utilities in Ubuntu 12.04 (https://www.cfd-online.com/Forums/openfoam-programming-development/128143-cannot-compile-utilities-ubuntu-12-04-a.html)

skyinventorbt January 4, 2014 22:54

Cannot compile utilities in Ubuntu 12.04
 
Hi Foamers,

I have installed OF2.2.1 in Ubuntu 12.04 and its working fine. The problem is when I compile my own utilities, it gives me error.
Code:

kannan@AIL:~/OpenFOAM/kannan-2.2.1/helicity$ wmake
Making dependency list for source file helicity.C
Making dependency list for source file compatibilityFvPatchFields/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.C
SOURCE=helicity.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/postProcessing/postCalc -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/turbulenceModels/incompressible/RAS/RASModel -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/helicity.o
SOURCE=compatibilityFvPatchFields/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/postProcessing/postCalc -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/turbulenceModels/incompressible/RAS/RASModel -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/postProcessing/postCalc -I/opt/openfoam221/src/turbulenceModels -I/opt/openfoam221/src/turbulenceModels/incompressible/RAS/RASModel -I/opt/openfoam221/src/transportModels -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude  -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/helicity.o Make/linux64GccDPOpt/turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.o -L/opt/openfoam221/platforms/linux64GccDPOpt/lib \
        /opt/openfoam221/platforms/linux64GccDPOpt/lib/postCalc.o -lincompressibleRASModels -lincompressibleTransportModels -lfiniteVolume -lgenericPatchFields -lOpenFOAM -ldl  -lm -o /opt/openfoam221/platforms/linux64GccDPOpt/bin/helicity
/usr/bin/ld: cannot open output file /opt/openfoam221/platforms/linux64GccDPOpt/bin/helicity: Permission denied
collect2: ld returned 1 exit status
make: *** [/opt/openfoam221/platforms/linux64GccDPOpt/bin/helicity] Error 1

I tried chmod to own the folder but it also did not work.

This may be due to root permission ?
Any help to make my utilities to work..

Thanks in advance...

--
KANNAN B T

wyldckat January 5, 2014 09:13

Greetings Kannan,

If you follow this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam - you should not get the same problem. The reason is because of what is defined in the file "Make/files":
Quote:

Code:

EXE = $(FOAM_USER_APPBIN)/my_icoFoam

You probably have got "FOAM_APPBIN" instead of "FOAM_USER_APPBIN".

Best regards,
Bruno

skyinventorbt January 7, 2014 00:19

Thanks Bruno. . .
I will look in to this . . .
--
KANNAN B T


All times are GMT -4. The time now is 19:09.