coretran icon indicating copy to clipboard operation
coretran copied to clipboard

Failed to compile the library in Linux with gfortran version using gfortran version 6.3.1

Open WangYun1995 opened this issue 5 years ago • 4 comments

Hello, @leonfoks

Following your instructions, I typed cmake ../src in the command line, and everything is OK. Then I typed make to compile the library. However, it failed and returned to me error information as follows.

[ 81%] Building Fortran object CMakeFiles/coretran.dir/spatial/m_KdTree.f90.o
[ 83%] Building Fortran object CMakeFiles/coretran.dir/spatial/m_geometry.f90.o
[ 84%] Building Fortran object CMakeFiles/coretran.dir/spatial/sm_KdTreeBranch_class.f90.o
[ 86%] Building Fortran object CMakeFiles/coretran.dir/spatial/sm_KdTreeSearch_class.f90.o
/home/wangy/downloads/coretran/src/spatial/sm_KdTreeSearch_class.f90:1135:0:

   module procedure rangeSearch_KD!(search, tree, D, lowerBound, upperBound) result(iPoints)
 
internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1419
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
CMakeFiles/coretran.dir/build.make:731: recipe for target 'CMakeFiles/coretran.dir/spatial/sm_KdTreeSearch_class.f90.o' failed
make[2]: *** [CMakeFiles/coretran.dir/spatial/sm_KdTreeSearch_class.f90.o] Error 1
CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/coretran.dir/all' failed
make[1]: *** [CMakeFiles/coretran.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

Could you help me address this issue?

WangYun1995 avatar Feb 05 '21 12:02 WangYun1995

Hi @WangYun1995 ! Thanks for trying out Coretran!

I'm not entirely sure, but the message states a compiler error. I just tested my install with gfortran v 10 and it worked. Can you try using an updated version of gfortran please?

Thanks!

leonfoks avatar Feb 08 '21 19:02 leonfoks

Hi @leonfoks

After I deleted module procedure rangeSearch_KD and all related stuff, I compiled the library successfully.

Since all my needs are 2D tree and 3D tree, this solution is totally OK.

WangYun1995 avatar Feb 09 '21 11:02 WangYun1995

I've made a slight change to my imports in submodules. If you have time and can try a completely fresh compile that would help to see if it fixed it. Remove the entire build folder and run the cmake command again to make sure its fresh!

leonfoks avatar Feb 09 '21 22:02 leonfoks

I can say for sure that "internal compiler error" indicates the version of my compiler is too low since "coretran" works well on Windows with gfortran 7.4.

WangYun1995 avatar Feb 10 '21 10:02 WangYun1995