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

OF 2.3.x libconformalVoronoiMesh Compilation Error

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By andyru

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2014, 17:58
Default OF 2.3.x libconformalVoronoiMesh Compilation Error
  #1
Member
 
Brock Lee
Join Date: Sep 2012
Location: Midwest
Posts: 40
Rep Power: 13
GRAUPS is on a distinguished road
Foamers,

I'm attempting to compile OF 2.3.x (ddafa9836ad9) on RHEL 5.7 using GCC 4.9.0. Everything compiles fine except for a small portion of foamyHexMesh (the app that I wanted to test). I receive the following error...

Code:
/home/brock/my_apps/binutils-2.24/bin/ld: /usr/lib/../lib64/libmpfr.a(clear.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/lib/../lib64/libmpfr.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
/apps/OpenFOAM/OpenFOAM-2.3.x/wmake/Makefile:172: recipe for target '/apps/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so' failed
make[2]: *** [/apps/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libconformalVoronoiMesh.so] Error 1
make[2]: Target 'libso' not remade because of errors.
...which ultimately causes foamyHexMesh to fail to compile.

The error notes to add -fPIC and recompile, however I have been unable to correctly identify where that needs to be added. Can anyone help me diagnose and fix this error?

Thanks!

Brock

Last edited by GRAUPS; June 17, 2014 at 12:04.
GRAUPS is offline   Reply With Quote

Old   June 18, 2014, 11:41
Default Figured it out
  #2
Member
 
Brock Lee
Join Date: Sep 2012
Location: Midwest
Posts: 40
Rep Power: 13
GRAUPS is on a distinguished road
Foamers,

I figured it out. I compiled CGAL with mpfr and gmp libraries that I placed in...

Code:
ThirdParty-2.3.x/platforms/linux64
...this is where CGAL looks for them during compile time. However, the OF compiler apparently isn't smart enough to look there when linking CGAL with foamyHexMesh.

I ended up having to put the mpfr and gmp libraries I used to compile CGAL into $FOAM_SITE_LIBBIN so that they would get used instead of the system versions of mpfr and gmp.

Cheers,

Brock
GRAUPS is offline   Reply With Quote

Old   July 15, 2014, 06:02
Default alternatevly give wmake libso correct path
  #3
Member
 
Andreas Ruopp
Join Date: Aug 2009
Location: Stuttgart / Germany
Posts: 31
Rep Power: 16
andyru is on a distinguished road
Hi,

I encountered the same problem:

Code:
...
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libCGAL.so.10, needed by 
/mnt/fs2/home/bla/OpenFOAM23_susi12_3/OpenFOAM-2.3.x/platforms/linux64GccDPDebug/lib/libconformalVoronoiMesh.so, 
not found (try using -rpath or -rpath-link)
...
so just edit in $WM_PROJECT_DIR/applications/utilities/mesh/generation/foamyHexMesh/Make/options

Code:
...
-lsampling \
-L$(WM_THIRD_PARTY_DIR)/platforms/linux64Gcc/CGAL-4.3/lib \
-lCGAL
Then, wmake libso should do the job.
macelee likes this.
andyru is offline   Reply With Quote

Reply

Tags
compile, error, foamyhexmesh


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
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 62 September 18, 2017 06:45
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38


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