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.

Unable to crosscompile test_latency.c in alsa

Dear TI E2E community,

Am unable to cross_compile 

ferryzhou.wordpress.com/.../linux-alsa-latency-test

Could you please let me know this can be cross_compiled???

srinivasan@tata-HP-Elite-7100-Microtower-PC:~/alsa-lib-1.0.26/test$ arm-linux-gnueabihf-gcc latency.c -o latency.o -lasound

/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: /tmp/ccPwvMUd.o: undefined reference to symbol 'sin@@GLIBC_2.4'
/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: 'sin@@GLIBC_2.4' is defined in DSO /opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/libm.so.6 so try adding it to the linker command line
/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/libm.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

Kindly do the needful as early as possible

  • Forwarding this to the SW team.

  • Hello Srini,

    Add a -lm argument to compile it.

    Best regards,
    Kemal

  • Hi Kemal,

    That didn't work, Could you please try downloading from the above link & cross-compile & sent me detailed steps

    Kindly do the needful as early as possible
  • Here you are!

    $ wget http://alsa.cybermirror.org/lib/alsa-lib-1.0.26.tar.bz2
    $ tar xjvf alsa-lib-1.0.26.tar.bz2
    $ cd alsa-lib-1.0.26/test
    $ export PATH=$HOME/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH
    $ arm-linux-gnueabihf-gcc latency.c -o latency -lasound -lm
  • Thanks a lot Kemal it worked!!! once again thanks a lot, Really appreciate for your quick responses


    In similar fashion am trying to make use of alsa jack plugin in ti sdk 7 BSP's

    jack-1.9.10.tar.bz2

    Could you please let me know how this can be cross compiled configured & installed in ti sdk 8 rootfs

    Kindly do the needful as early as possible, even am stuck with this jack plugin from past week

    Many Many Thanks a lot in advance Kemal
  • Good to hear this.

    These are the steps for configuring & installing the jack in TI SDK 8 rootfs:

     git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
     cd tisdk
     ./oe-layertool-setup.sh -f configs/amsdk/amsdk-08.00.00.00-config.txt
     cd build
     echo 'EXTRA_APPLICATIONS_append = " jack"' >> conf/local.conf
     . conf/setenv
     export PATH=$HOME/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin:$PATH
     MACHINE=am335x-evm bitbake tisdk-rootfs-image

  • Thanks a lot for your quick responses Kemal

    Should I untar jack-1.9.10.tar.bz2 & do the above steps, or directly perform the above steps so that , I get the jack plugin in the ti sdk rootfs 8

    In which path of the ti sdk 8 rootfs ie., /kernel/ti-sdk-am335x-evm-08.00.00.00/filesystem/tisdk-rootfs-image-am335x-evm.tar.gz gets installed??? how can I verify the same

    Could you please kindly help me out quires in the below thread also, so that would be very grateful to you..

    e2e.ti.com/.../1527777

    Kindly do the needful as early as possible,

    Many Many Thanks a lot in advance Kemal
  • So you can close this, your question will be answered in the following new thread.

  • Hi Kemal,

    Even am using the above latency test app , when I run the app am facing the below error in ti sdk 8, could you please test from your end & let us know

    root@am335x-evm:/# ./latency -P hw:0,0 -C hw:0,0 -r 8000 -m 128 -M 128 -p -s 1
    Scheduler set to Round Robin with priority 99...
    Playback device is hw:0,0
    Capture device is hw:0,0
    Parameters are 8000Hz, S16_LE, 2 channels, non-blocking mode
    Poll mode: yes
    Loop limit is 8000 frames, minimum latency = 128, maximum latency = 128
    Record open error: Invalid argument
    root@am335x-evm:/#

    Please help me out in resolving this issue as early as possible

    Many Thanks in advance
  • Hello Naven,

    The answer will be posted here when available.

    Best regards,
    Kemal