ubuntu18.04 最后的链结失败: 输出不可表示的节
发表于 : 2018-09-15 19:40
更新了ubuntu到18.04,在编译一个软件的时候报错最后的链结失败: 输出不可表示的节,求大佬帮忙看一看。
下面是报错的一部分:
/usr/bin/x86_64-linux-gnu-ld: kspace.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS6KSpaceE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: compute_temp_com.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS14ComputeTempCOME' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: atom_vec_ellipsoid.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS16AtomVecEllipsoidE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: 最后的链结失败: 输出不可表示的节
collect2: error: ld returned 1 exit status
Makefile:93: recipe for target '../lmp_ubuntu' failed
make[1]: *** [../lmp_ubuntu] Error 1
make[1]: 离开目录“/home/zhupanpan/software/lammps/lammps-16Mar18/src/Obj_ubuntu”
Makefile:160: recipe for target 'ubuntu' failed
make: *** [ubuntu] Error 2
之前用ubuntu16.04的时候同样的编译方法,却没有报错,有大佬能告知一下是怎么回事吗
下面是报错的一部分:
/usr/bin/x86_64-linux-gnu-ld: kspace.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS6KSpaceE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: compute_temp_com.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS14ComputeTempCOME' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: atom_vec_ellipsoid.o: relocation R_X86_64_32S against symbol `_ZTVN9LAMMPS_NS16AtomVecEllipsoidE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: 最后的链结失败: 输出不可表示的节
collect2: error: ld returned 1 exit status
Makefile:93: recipe for target '../lmp_ubuntu' failed
make[1]: *** [../lmp_ubuntu] Error 1
make[1]: 离开目录“/home/zhupanpan/software/lammps/lammps-16Mar18/src/Obj_ubuntu”
Makefile:160: recipe for target 'ubuntu' failed
make: *** [ubuntu] Error 2
之前用ubuntu16.04的时候同样的编译方法,却没有报错,有大佬能告知一下是怎么回事吗