September 23, 2019, 19:08
|
Problem with compiling a third party code that relies on OF1606+
|
#1
|
New Member
Artur
Join Date: Sep 2019
Posts: 3
Rep Power: 6
|
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?
|
|
|