• FlightGear 从输出所省略的额外重寻址溢出


    2020-12-27

    在龙芯Fedora28上编译 FlightGear 2019.1.1 时遇到 从输出所省略的额外重寻址溢出 错误,错误信息如下:

    [ 98%] Linking CXX executable fgfs
    CMakeFiles/fgfs.dir/__/Scripting/NasalCanvas.cxx.o:在函数‘to_nasal_helper(Context*, osg::BoundingBoxImpl<osg::Vec3f> const&)’中:
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:90:(.text+0x238):  截断重寻址至相符: R_MIPS_CALL16 针对 _Unwind_Resume@@GCC_3.0
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:84:(.text+0x28c):  截断重寻址至相符: R_MIPS_CALL16 针对 _Unwind_Resume@@GCC_3.0
    CMakeFiles/fgfs.dir/__/Scripting/NasalCanvas.cxx.o:在函数‘f_createCanvas(nasal::CallContext const&)’中:
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x4e4):  截断重寻址至相符: R_MIPS_CALL16 针对 std::allocator<char>::allocator()@@GLIBCXX_3.4
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x508):  截断重寻址至相符: R_MIPS_CALL16 针对 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x580):  截断重寻址至相符: R_MIPS_CALL16 针对 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x594):  截断重寻址至相符: R_MIPS_CALL16 针对 std::allocator<char>::~allocator()@@GLIBCXX_3.4
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x5fc):  截断重寻址至相符: R_MIPS_CALL16 针对 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x61c):  截断重寻址至相符: R_MIPS_CALL16 针对 std::allocator<char>::~allocator()@@GLIBCXX_3.4
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:127:(.text+0x634):  截断重寻址至相符: R_MIPS_CALL16 针对 _Unwind_Resume@@GCC_3.0
    CMakeFiles/fgfs.dir/__/Scripting/NasalCanvas.cxx.o:在函数‘f_createWindow(nasal::CallContext const&)’中:
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:137:(.text+0x6d0):  截断重寻址至相符: R_MIPS_CALL16 针对 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()@@GLIBCXX_3.4.21
    /home/loongson/下载/flightgear/flightgear-2019.1.1/src/Scripting/NasalCanvas.cxx:137:(.text+0x7a4):  从输出所省略的额外重寻址溢出
    collect2: 错误:ld 返回 1
    make[2]: *** [src/Main/CMakeFiles/fgfs.dir/build.make:7427:src/Main/fgfs] 错误 1
    make[1]: *** [CMakeFiles/Makefile2:2133:src/Main/CMakeFiles/fgfs.dir/all] 错误 2
    make: *** [Makefile:163:all] 错误 2
    

    大佬指点后得知需要添加cxxflag -mxgot 。最终解决如下:

    CMakeList.txt 中添加一行(我添加在了第55行):

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mxgot")
    

    重新 cmake && make 通过。

  • 相关阅读:
    接口测试基础知识
    WebSocket接口怎么做测试
    python的数据类型特点和常用方法
    python封装一个工具类 ,对MySQL数据库增删改查
    python 往MySQL批量插入数据
    python对MySQL进行曾删改查
    Rest Assured从入门到遇到各种问题(汇总、更新)
    jmeter参数化之动态读取csv文件
    Charles 浏览器(火狐)抓包设置
    导入git项目报错"no projects are found to import" 找不到项目
  • 原文地址:https://www.cnblogs.com/weilinfox/p/14198570.html
Copyright © 2020-2023  润新知