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

[OpenFOAM.com] OpenFOAM v2112 CGAL build fails - how to specify GMP library

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By asims
  • 1 Post By asims

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2022, 06:14
Default OpenFOAM v2112 CGAL build fails - how to specify GMP library
  #1
New Member
 
Join Date: Jan 2015
Posts: 5
Rep Power: 11
asims is on a distinguished road
Hi

I am installing OFv2112 on RH8.3. I am Using the system compiler (gcc 8.5.0) and cmake (3.20.2). GMP, MPFR and MPC packages were also installed.

The bashrc file specified the system compiler be used.

Compilation generally went well (Allwmake), except issues were reported with CGAL as follows.

Code:
-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -fPIC -O3 -DNDEBUG'
-- USING LDFLAGS = '-m64 '
-- Configuring incomplete, errors occurred!
See also "/fsx/apps/OpenFOAM/ThirdParty-v2112/build/linux64Gcc/CGAL-4.14.3/CMakeFiles/CMakeOutput.log".

    ---------------------------------------------------
    Optional component (CGAL) had build issues
    OpenFOAM will nonetheless remain largely functional
    ---------------------------------------------------
I could not see an obvious error in the referred log. There was an additional message:

Code:
== Setting paths ==
== Setting paths (DONE) ==

== Generate version files ==
== Generate version files (DONE) ==

== Detect external libraries ==
== Detect external libraries (DONE) ==

== Generating build files ==
Configuring libCGAL
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindGMP.cmake:53 (find_package_handle_standard_args)
  cmake/modules/CGAL_SetupGMP.cmake:24 (find_package)
  cmake/modules/CGAL_SetupCGALDependencies.cmake:41 (include)
  src/CGAL/CMakeLists.txt:5 (include)
I have tried downloading and manually extracting, configure, make, make install of the latest version of the gmp library, and manually setting and exporting the variables mentioned, but no change.

How can I configure OF to build CGAL correctly and refer to the GMP libraries installed?

The CGAL configure script appeared to only specify the GMP, MPC and MPFR version if the compiler variable is set to ThirdParty, mine is set to system.

Thank you for any comments and advice.
asims is offline   Reply With Quote

Old   June 3, 2022, 12:38
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Should work fine with system gmp/mpfr - that's what I use all of the time (but on suse).
Make sure you have the gmp/mpfr-devel packages installed though. I'd guess they are missing on your system and it doesn't find any headers.
olesen is offline   Reply With Quote

Old   June 6, 2022, 11:19
Default
  #3
New Member
 
Join Date: Jan 2015
Posts: 5
Rep Power: 11
asims is on a distinguished road
Thank you Mark for the reply. A list of installed system packages filtered to those containing gmp and mpfr return the following.

sudo yum list installed | grep gmp
gmp.x86_64 1:6.1.2-10.el8 @anaconda

sudo yum list installed | grep mpfr
mpfr.x86_64 3.1.6-1.el8 @anaconda

I do not have the mpfr-devel package. Will try to install that and see what happens.
gpouliasis likes this.
asims is offline   Reply With Quote

Old   June 6, 2022, 11:22
Default
  #4
New Member
 
Join Date: Jan 2015
Posts: 5
Rep Power: 11
asims is on a distinguished road
Looks like installing the mpfr-devel package did the trick. Was able to run makeCGAL without error.

Will test properly in the next few days, and post back here.

Many thanks for the suggestion.
gpouliasis likes this.

Last edited by asims; June 6, 2022 at 11:24. Reason: Unfinished
asims is offline   Reply With Quote

Old   June 16, 2022, 21:29
Default Simple test case run successfully
  #5
New Member
 
Join Date: Jan 2015
Posts: 5
Rep Power: 11
asims is on a distinguished road
Thank you for the response and suggestion. It looks like the installation is working OK now, and that installing that library solved the problem.

Thank you very much.
asims is offline   Reply With Quote

Old   June 20, 2022, 04:56
Default
  #6
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by asims View Post
Thank you for the response and suggestion. It looks like the installation is working OK now, and that installing that library solved the problem.

Thank you very much.

Thanks for reporting back - this helps everyone. Too many forum users post questions, but never followup when the issue is solved.
olesen is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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] Openfoam 2112 build fails with aocc and clang NainaPatil OpenFOAM Installation 2 April 22, 2022 14:59
How to develop OpenFOAM with CMake and popular IDEs cosscholar OpenFOAM Programming & Development 0 March 16, 2022 16:17
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 15:47.