This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Build gdb in Yocto errors

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

I tried to build gdb with bitbake, I used MACHINE=am335x-evm bitbake gdb. but I got the error log as followed.

/usr/build-environment/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf//arm-linux-gnueabihf/lib/libstdc++.a: error adding symbols: No more archived files
collect2: error: ld returned 1 exit status
Makefile:2215: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/home/guyan/tisdk1/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdb/8.0-r0/build-arm-linux-gnueabi/gdb'
Makefile:8792: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/guyan/tisdk1/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdb/8.0-r0/build-arm-linux-gnueabi'
Makefile:849: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: oe_runmake failed
WARNING: /home/guyan/tisdk1/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdb/8.0-r0/temp/run.do_compile.99609:1 exit 1 from 'exit 1'
ERROR: Function failed: do_compile

I googled it and someone said it may because of the version of gcc.

  • Hello yan,

    The error you got is very unusual. I can build the gdb with no issues on my side. Please, try to build on another computer and make sure that the gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz is successfully extracted and the gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/lib/libstdc++.a file is not corrupted. Also, make sure that  you have executed the prerequisites commands before starting to build.

    $ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386

    $ sudo dpkg-reconfigure dash
    (Select "No" when prompted)

    Best regards,
    Kemal

  • It's weird that after I download the arm-linux-gcc again and build it, it just worked. But I remember that I have never changed anything in it. Thanks.