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

[OpenFOAM.org] Compile OpenFOAM7 on CentOS7 without root permission

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2020, 23:41
Default Openfoam7 Compile error on CentOS7
  #1
New Member
 
zizhou huang
Join Date: Jul 2019
Posts: 18
Rep Power: 6
zizhou is on a distinguished road
Hi FOAMers,

I was trying to compile OpenFOAM7 on CentOS7 without root permission, by following https://openfoam.org/download/7-source/. However, I got error when
Code:
./Allwmake
The log file is shown below.
Quote:
Allwmake /home/zh1476/OpenFOAM/OpenFOAM-7
make: Nothing to be done for `all'.

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

========================================
Build Scotch decomposition library scotch_6.0.6
/home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6
scotch header in /home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6/include
scotch libs in /home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/lib

========================================
Build PTScotch decomposition library scotch_6.0.6 (uses MPI)
/home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6

ptscotch header in /home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/scotch_6.0.6/include/openmpi-system
ptscotch libs in /home/zh1476/OpenFOAM/ThirdParty-7/platforms/linux64GccDPInt32/lib/openmpi-system

========================================
Build Metis decomposition
optional component Metis was not found
========================================
Build CGAL
skipped because foamyHexMesh is not selected

========================================
Done ThirdParty Allwmake
========================================

Allwmake src
no git description found
Allwmake src/Pstream
wmake dummy
wmake mpi
Allwmake libo src/OSspecific/POSIX
found <sys/inotify.h> -- enabling inotify for file monitoring.
wmake libo .
wmake OpenFOAM
wmake fileFormats
wmake surfMesh
flex -+ -o/home/zh1476/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C -f surfaceFormats/stl/STLsurfaceFormatASCII.L && g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/zh1476/OpenFOAM/OpenFOAM-7/src/fileFormats/lnInclude -IlnInclude -I. -I/home/zh1476/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude -I/home/zh1476/OpenFOAM/OpenFOAM-7/src/OSspecific/POSIX/lnInclude -fPIC -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds -c /home/zh1476/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C -o /home/zh1476/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.o
/home/zh1476/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C:301:10: fatal error: FlexLexer.h: No such file or directory
301 |
| ^
compilation terminated.
make: *** [/home/zh1476/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.o] Error 1
The version of software is listed below.
Quote:
bash-4.2$ gcc --version
gcc (GCC) 9.1.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bash-4.2$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
bash-4.2$ mpirun --version
mpirun (Open MPI) 4.0.2

Report bugs to http://www.open-mpi.org/community/help/
bash-4.2$ flex --version
flex 2.6.4
Can someone help me fix this error? Thanks a lot!

Last edited by zizhou; May 7, 2020 at 02:57.
zizhou is offline   Reply With Quote

Old   May 6, 2020, 17:01
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
why do you think that the problem is related to the root permission? It seems to me that this is not the case since you were able to execute `./Allmake`.
HPE is offline   Reply With Quote

Old   May 7, 2020, 03:01
Default
  #3
New Member
 
zizhou huang
Join Date: Jul 2019
Posts: 18
Rep Power: 6
zizhou is on a distinguished road
Thanks for your reply!
I'm not sure whether they are related, lack of root permission is just the reason why I have to compile from source code...
I thought it might because that the path to flex was not in the system path, so I added $FLEX_INC to the path, however the error remained. Do you have any idea?
zizhou is offline   Reply With Quote

Old   May 8, 2020, 06:54
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
No, I am sorry. If you think it is a bug, you can report it to https://bugs.openfoam.org/rules.php
HPE 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
[OpenFOAM.org] blockMesh issue on openfoam6 startup - ubuntu 16.04 bjdarrer OpenFOAM Installation 7 August 25, 2020 19:15
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 06:47
How to install OpenFoam1.71 on cluster without Root permission? ripperjack OpenFOAM Installation 7 May 7, 2013 16:46
missing vtf3.h BPatch.h papi.h linch OpenFOAM Installation 41 July 24, 2012 14:45
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 21:51


All times are GMT -4. The time now is 16:40.