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

[Other] Problem with compiling a third party code that relies on OF1606+

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 23, 2019, 19:08
Default Problem with compiling a third party code that relies on OF1606+
  #1
New Member
 
Artur
Join Date: Sep 2019
Posts: 3
Rep Power: 6
Artshap is on a distinguished road
Hi everyone,

I'm new to both openfoam and ubuntu, I am trying to compile a code that relies on openfoam 1606+, but it's giving me an error. To be honest as far as I can see this might not even be an OF related issue, but I hope that maybe some here can help me anyway even if it is not.



Full log from running Allmake for that package twice:
Quote:
surfaceRoughness
wmake
make[1]: Entering directory '/home/artur/works/apps/contactAngle/surfaceRoughness'
make[1]: '/home/artur/works/bin-v16/bin/surfaceRoughness' is up to date.
make[1]: Leaving directory '/home/artur/works/apps/contactAngle/surfaceRoughness'
surfaceAddLayerToCL
wmake
make[1]: Entering directory '/home/artur/works/apps/contactAngle/surfaceAddLayerToCL'
make[1]: '/home/artur/works/bin-v16/bin/surfaceAddLayerToCL' is up to date.
make[1]: Leaving directory '/home/artur/works/apps/contactAngle/surfaceAddLayerToCL'
surfaceSmoothVP
wmake
make[1]: Entering directory '/home/artur/works/apps/contactAngle/surfaceSmoothVP'
make[1]: '/home/artur/works/bin-v16/bin/surfaceSmoothVP' is up to date.
make[1]: Leaving directory '/home/artur/works/apps/contactAngle/surfaceSmoothVP'
voxelImage
g++ -std=c++0x -c sphereToRaw.cpp
g++ -o /home/artur/works/bin-v16/bin/sphereToRaw sphereToRaw.o
g++ -c -fPIC imageReader.cpp -o imageReader.o
g++ -c -fPIC voxelMesh.cpp -o voxelMesh.o
g++ -shared voxelMesh.o imageReader.o -o /home/artur/works/bin-v16/bin/libvoxelMesh.so
g++ -c imageFileConvert.cpp
g++ -fPIC -L/home/artur/works/bin-v16/bin/ imageFileConvert.o -lvoxelMesh -o /home/artur/works/bin-v16/bin/imageFileConvert
g++ -fPIC -c rawToFoam.cpp
g++ -fPIC -o /home/artur/works/bin-v16/bin/rawToFoam -L/home/artur/works/bin-v16/bin rawToFoam.o -lvoxelMesh
rm -f *.o
voxelImageNew
g++ -O3 -Wall writeRaCLInds.o -o /home/artur/works/bin-v16/bin/writeRaCLInds
/usr/bin/ld: writeRaCLInds.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'writeRaCLInds' failed
make: *** [writeRaCLInds] Error 1
voxelToSurfaceML
wmake
make[1]: Entering directory '/home/artur/works/apps/contactAngle/voxelToSurfaceML'
make[1]: '/home/artur/works/bin-v16/bin/voxelToSurfaceML' is up to date.
make[1]: Leaving directory '/home/artur/works/apps/contactAngle/voxelToSurfaceML'
Specifically the error seems to be here:


Quote:
voxelImage
g++ -std=c++0x -c sphereToRaw.cpp
g++ -o /home/artur/works/bin-v16/bin/sphereToRaw sphereToRaw.o
g++ -c -fPIC imageReader.cpp -o imageReader.o
g++ -c -fPIC voxelMesh.cpp -o voxelMesh.o
g++ -shared voxelMesh.o imageReader.o -o /home/artur/works/bin-v16/bin/libvoxelMesh.so
g++ -c imageFileConvert.cpp
g++ -fPIC -L/home/artur/works/bin-v16/bin/ imageFileConvert.o -lvoxelMesh -o /home/artur/works/bin-v16/bin/imageFileConvert
g++ -fPIC -c rawToFoam.cpp
g++ -fPIC -o /home/artur/works/bin-v16/bin/rawToFoam -L/home/artur/works/bin-v16/bin rawToFoam.o -lvoxelMesh
rm -f *.o
voxelImageNew
g++ -O3 -Wall writeRaCLInds.o -o /home/artur/works/bin-v16/bin/writeRaCLInds
/usr/bin/ld: writeRaCLInds.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'writeRaCLInds' failed
make: *** [writeRaCLInds] Error 1
Can anyone direct me on how to fix this?
Artshap is offline   Reply With Quote

 


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
calculation restart problem OF1606 ziemowitzima OpenFOAM Running, Solving & CFD 2 December 7, 2016 03:57
Help compiling code (newbie) thsb20 OpenFOAM Programming & Development 56 August 24, 2016 04:24
problem compiling spalart allmaras model bababanamzdaalma OpenFOAM 0 April 4, 2012 20:13
State of the art in CFD technology Juan Carlos GARCIA SALAS Main CFD Forum 39 November 1, 1999 14:34
What kind of Cmmercial CFD code you feel well? Lans Main CFD Forum 13 October 27, 1998 10:20


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