Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    运行hello_word遇到GLIBC_2.29 not defined in file libc.so.6改怎么办

    MR Series
    4
    9
    3361
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      oiouou123 LV 5 last edited by

      如题,请问各位大佬,在D1运行hello_word看到

      ./hello_word: relocation error: ./hello_word: symbol __libc_start_main version GLIBC_2.29 not defined in file libc.so.6 with link time reference
      

      这种情况该如何解决呢?

      1 Reply Last reply Reply Quote Share 0
      • tigger
        tigger LV 7 last edited by

        是不是用哪吒tina的SDK呢?如果用里面同一个gcc编译的话,libc.so.6 应该是 不会出这个错误提示的。

        1 Reply Last reply Reply Quote Share 0
        • YuzukiTsuru
          柚木 鉉 LV 9 last edited by

          用编译rootfs的编译器编译

          O 1 Reply Last reply Reply Quote Share 0
          • O
            oiouou123 LV 5 last edited by

            @tigger @YuzukiTsuru 大佬们,我用的官网提供的链接(如下说明),下载下来是一个叫riscv64-linux-x86_64-20210329.tar.gz的工具

            如果您只是想先试玩一下,还没下载完整源码,可以单独下载编译工具链:
            
            riscv64-glibc-gcc-thead_20200702下载
            

            另外我检查了开发板的Glibc版本发现就是2.29啊,看不懂了😢

            root@TinaLinux:/# /lib/libc.so.6
            GNU C Library (GNU libc) stable release version 2.29.
            Copyright (C) 2019 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.
            There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
            PARTICULAR PURPOSE.
            Compiled by GNU CC version 8.1.0.
            libc ABIs: UNIQUE ABSOLUTE
            For bug reporting instructions, please see:
            <http://www.gnu.org/software/libc/bugs.html>.
            
            1 Reply Last reply Reply Quote Share 0
            • O
              oiouou123 LV 5 @YuzukiTsuru last edited by

              @yuzukitsuru 大佬这个编译器是指那个,是官网那个吗链接,我下载拿到的是riscv64-linux-x86_64-20210329.tar.gz

              YuzukiTsuru 1 Reply Last reply Reply Quote Share 0
              • YuzukiTsuru
                柚木 鉉 LV 9 @oiouou123 last edited by

                @oiouou123 tina源码里的编译器,应该就是那个
                30e0878e-092f-45a8-aafb-35ded0516c89-image.png

                Using built-in specs.
                COLLECT_GCC=./riscv64-unknown-linux-gnu-gcc
                COLLECT_LTO_WRAPPER=/home/yuzuki/WorkSpace/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/../libexec/gcc/riscv64-unknown-linux-gnu/8.1.0/lto-wrapper
                Target: riscv64-unknown-linux-gnu
                Configured with: /ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/build/../source/riscv/riscv-gcc/configure --target=riscv64-unknown-linux-gnu --with-mpc=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --with-mpfr=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --with-gmp=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/lib-for-gcc-x86_64-linux/ --prefix=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/install --with-sysroot=/ldhome/software/toolsbuild/slave/workspace/riscv64_build_linux_x86_64/install/sysroot --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-nls --disable-bootstrap --src=../../source/riscv/riscv-gcc --enable-checking=yes --with-pkgversion='C-SKY RISCV Tools V1.8.4 B20200702' --enable-multilib --with-abi=lp64d --with-arch=rv64gcxthead 'CFLAGS_FOR_TARGET=-O2  -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2  -mcmodel=medany' CC=gcc CXX=g++
                Thread model: posix
                gcc version 8.1.0 (C-SKY RISCV Tools V1.8.4 B20200702) 
                
                O 2 Replies Last reply Reply Quote Share 0
                • O
                  oiouou123 LV 5 @YuzukiTsuru last edited by

                  @yuzukitsuru 大佬,我看了一眼发现版本不一样,我找找源码里的,感谢!

                  Using built-in specs.
                  COLLECT_GCC=./riscv64-unknown-linux-gnu-gcc
                  COLLECT_LTO_WRAPPER=/mnt/f/riscv/bin/../libexec/gcc/riscv64-unknown-linux-gnu/10.2.0/lto-wrapper
                  Target: riscv64-unknown-linux-gnu
                  Configured with: /ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/build/../source/riscv/riscv-gcc/configure --target=riscv64-unknown-linux-gnu --with-gmp=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/lib-for-gcc-x86_64-linux/ --with-mpfr=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/lib-for-gcc-x86_64-linux/ --with-mpc=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/lib-for-gcc-x86_64-linux/ --with-libexpat-prefix=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/lib-for-gcc-x86_64-linux/ --with-pkgversion='T-HEAD RISCV Tools V2.0.0.10 B20210329' --prefix=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/install --with-sysroot=/ldhome/software/toolsbuild/slave2/workspace/Toolchain/release-riscv-0/install/sysroot --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=../../source/riscv/riscv-gcc --enable-multilib --with-abi=lp64d --with-arch=rv64gcxthead 'CFLAGS_FOR_TARGET=-O2   -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2   -mcmodel=medany'
                  Thread model: posix
                  Supported LTO compression algorithms: zlib
                  gcc version 10.2.0 (T-HEAD RISCV Tools V2.0.0.10 B20210329) 
                  
                  1 Reply Last reply Reply Quote Share 0
                  • O
                    oiouou123 LV 5 @YuzukiTsuru last edited by

                    @yuzukitsuru 谢谢大佬,直接装D1源码,用/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin底下的./riscv64-unknown-linux-gnu-gcc编译,可以看到结果😉

                    root@TinaLinux:/# ./hello
                    Hello NeZha
                    
                    xiaowenge 1 Reply Last reply Reply Quote Share 0
                    • xiaowenge
                      DOT小文哥 LV 8 @oiouou123 last edited by

                      @oiouou123 恭喜跑通hellow world!下一步 改变世界!

                      1 Reply Last reply Reply Quote Share 0
                      • 1 / 1
                      • First post
                        Last post

                      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                      行为准则 | 用户协议 | 隐私权政策