Ubuntu 18.04.3 LTS 编译报错

/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftbase.linux64.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftinit.linux64.o): relocation R_X86_64_32 against symbol tt_driver_class’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftsystem.linux64.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(sfnt.linux64.o): relocation R_X86_64_32 against .rodata’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(psaux.linux64.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(psnames.linux64.o): relocation R_X86_64_32S against .rodata’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(pfr.linux64.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(truetype.linux64.o): relocation R_X86_64_32 against .text’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(winfnt.linux64.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(type1.linux64.o): relocation R_X86_64_32 against .rodata.str1.1’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(type42.linux64.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(cff.linux64.o): relocation R_X86_64_32 against .text’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(type1cid.linux64.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(bdf.linux64.o): relocation R_X86_64_32 against .rodata’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(pcf.linux64.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftf.linux64.o): relocation R_X86_64_32S against .text’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(smooth.linux64.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(raster.linux64.o): relocation R_X86_64_32S against symbol ft_raster1_renderer_class’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(autofit.linux64.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(pshinter.linux64.o): relocation R_X86_64_32S against .text’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftglyph.linux64.o): relocation R_X86_64_32S against symbol ft_bitmap_glyph_class' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftstroke.linux64.o): relocation R_X86_64_32S against symbol ft_outline_glyph_class’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftgzip.linux64.o): relocation R_X86_64_32S against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftlzw.linux64.o): relocation R_X86_64_32S against .text’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: …/frameworks/cocos2d-x/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftbitmap.linux64.o): relocation R_X86_64_32S against `.rodata’ can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: 最后的链结失败: 输出不可表示的节
collect2: error: ld returned 1 exit status
CMakeFiles/test_js.dir/build.make:161: recipe for target ‘bin/test_js/test_js’ failed
make[2]: *** [bin/test_js/test_js] Error 1
CMakeFiles/Makefile2:79: recipe for target ‘CMakeFiles/test_js.dir/all’ failed
make[1]: *** [CMakeFiles/test_js.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2
执行命令出错,返回值:2。