Compilation error for example/audio_player



  • Hi, I am getting the following compilation error when trying example/audio_player with command "make":

    AR: spresense_main.o cxd56_appinit.o cxd56_power.o cxd56_sdcard.o cxd56_audio_amp.o cxd56_boot.o cxd56_clock.o cxd56_ostest.o cxd56_usbmsc.o cxd56_spi.o cxd56_pwm.o cxd56_uid.o cxd56_crashdump.o cxd56_flash.o cxd56_audio.o cxd56_gpioif.o
    make[2]: Leaving directory '/home/jason/spresense/sdk/bsp/board'
    LD: nuttx
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-w_pow.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-w_pow.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-e_pow.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-e_pow.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-e_sqrt.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-e_sqrt.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_fabs.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_fabs.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_finite.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_finite.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_lib_ver.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_lib_ver.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_matherr.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_matherr.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_nan.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_nan.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_rint.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_rint.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_scalbn.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_scalbn.o)
    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_copysign.o) does not
    arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-s_copysign.o)
    Makefile:168: recipe for target 'nuttx' failed
    make[1]: *** [nuttx] Error 1
    make[1]: Leaving directory '/home/jason/spresense/sdk/bsp'
    Makefile:182: recipe for target 'nuttx' failed
    make: *** [nuttx] Error 2

    OS: ubuntu 18.04
    SDK version: 1.3

    Any ideas?


  • DeveloperWorld

    arm-none-eabi-ld: error: /home/jason/spresense/sdk/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libm.a(lib_a-w_pow.o) does not

    Seems that you have a floating point abi mismatch between between your build and your gcc lib.
    I'm not sure how this could happen. Could you try to make a complete make distclean and a make distcleankernel.
    Then reconfigure your build and rebuild everything.

    And also, please provide version of your SDK, and the steps you did when you configured your build.



  • @TE-KarlKomierowski said in Compilation error for example/audio_player:

    make distcleankernel

    Hi, below is the list of commands I used.
    I was using a completely new directory to compile the audio_player example.
    The SDK is the latest from github and I think it is 1.3.0

    cd /tmp
    git clone --recursive https://github.com/sonydevworld/spresense.git
    cd spresense/sdk/
    tools/config.py --kernel release
    tools/config.py examples/audio_player
    ./tools/flash.sh -e ~/Downloads/spresense-binaries-v1.3.0.zip
    tools/config.py examples/audio_player
    make -j 4 buildkernel
    make -j 4
    

  • DeveloperWorld

    I did the same thing:

    git clone --recursive https://github.com/sonydevworld/spresense.git && cd spresense/sdk/ && tools/config.py --kernel release && tools/config.py examples/audio_player && make -j 4 buildkernel && make -j4
    

    And it worked just fine.
    How did you install your tool chain?

    A installation script have been provided to install the tool chain and all other prerequisites that are needed.

    In the instructions on the side: https://developer.sony.com/develop/spresense/developer-tools/get-started-using-nuttx/set-up-the-nuttx-environment

    The following command is used to setup the environment:

    $ wget https://raw.githubusercontent.com/sonydevworld/spresense/master/install-tools.sh
    $ bash install-tools.sh
    


  • @TE-KarlKomierowski

    working now, thanks!