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.

Deploying Libraries into my AM335x Eval SDK Development Environment SDK ti-processor-sdk-linux-am335x-evm-02.00.00.00

I need to Cross compile an application that uses the following libraries:

 libnfnetlink-1.0.1

 libmnl-1.0.3

  libnetfilter_queue-1.0.2

The application code works perfectly under the ubunutu x86 tools after I use the normal configure-make-install methodology.

However, once I start the process of attempting to cross compile the app, all of my libraries are not available. I understand that they have not been installed and I have seen several articles that discuss the use of the ./configure command and the "host" parameter to setup the libraries for various platforms for cross comipling. I just have not been able to find a good example on the procedure to use on the AM335x platform. 

Is therre a good example or do you have an alternate method to perform these operations for the am335x Avaal version of Linux?

Thanks,

Ralph

  • I have some additional information for this effort. By using ./configure command I can get the library to cross build for the AM335X Eval board. The correct sequence for the first library is as follows:
    . /opt/ti-processor-sdk-linux-am335x-evm-02.00.00.00/linux-devkit/environment-setup
    cd libnfnetlink-1.0.1/
    ./configure --host=arm-linux-gnueabihf
    make
    sudo make install

    However, when I ran the next sequence:
    cd ~/libnetfilter_queue-1.0.2/
    ./configure --host=arm-linux-gnueabihf
    make
    The make died with the following error sequence:
    [linux-devkit]:~/libnetfilter_queue-1.0.2> make
    make all-recursive
    make[1]: Entering directory `/home/ralph/libnetfilter_queue-1.0.2'
    Making all in src
    make[2]: Entering directory `/home/ralph/libnetfilter_queue-1.0.2/src'
    CC libnetfilter_queue.lo
    In file included from /opt/ti-processor-sdk-linux-am335x-evm-02.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/features.h:402:0,
    from /opt/ti-processor-sdk-linux-am335x-evm-02.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/stdio.h:27,
    from libnetfilter_queue.c:23:
    /opt/ti-processor-sdk-linux-am335x-evm-02.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
    # include <gnu/stubs-soft.h>
    ^
    compilation terminated.
    make[2]: *** [libnetfilter_queue.lo] Error 1
    make[2]: Leaving directory `/home/ralph/libnetfilter_queue-1.0.2/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/ralph/libnetfilter_queue-1.0.2'
    make: *** [all] Error 2
    [linux-devkit]:~/libnetfilter_queue-1.0.2>

    I did find several articles that referenced this type of behaviour as follows:
    * GCC Bugzilla: Bug 62099 - bootstrap build fails on ARM hard float system
    * Link: gcc.gnu.org/.../show_bug.cgi
    * Key information found toward bottom of report under response by Andrew Pinski(8/11/14)
    * You need to use -with-float=hard when configuring GCC.

    * Bugzilla: Bug 202186 - some parts of build use "gcc" instead of $CC
    * Link: bugzilla.mozilla.org/show_bug.cgi
    * Roland Mainz( 4/16/03) Comment 5.
    * If I remember it correctly the build system has a extra flag to remember whether gcc or another compiler is being used. I guess this explains the expected behaviour: non-gcc compilers use explcitly the compiler set via ${CC}/${CXX}, others use "gcc", sometimes ignoring what is used in ${CC}/${CXX} ...
    * In my case it was missing the hardcaded changes for float that did not compile.

    Any Ideas?
  • Hello Ralph,

    You can try to add -mfloat-abi=hard, otherwise I have successfully compiled these three libraries in my OE, I think this is the easiest method which automatically performs these operations.

    processors.wiki.ti.com/.../Processor_SDK_Building_The_SDK

    $ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
    $ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-02.00.00.00-config.txt
    $ cd build
    $ . conf/setenv
    $ export PATH=$HOME/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:$PATH
    $ MACHINE=am335x-evm bitbake libnetfilter-queue

    The compiled libs: 4454.libs.zip

    Best regards,
    Kemal

  • The problem still exists in Processor SDK 02.00.01.07. I'd rather not have to install an entirely separate OE layer. What's the direct way to fix the problem in the SDK itself? I'm building for the am335x_evmsk.

    [linux-devkit]:/opt/ti/ti-processor-sdk-linux-am335x-evm> make u-boot-spl
    ===================================
    Building U-boot
    ===================================
    make -j 4 -C /opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/board-support/u-boot-* CROSS_COMPILE=/opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am335x_evm_config
    make[1]: Entering directory `/opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/board-support/u-boot-2015.07+gitAUTOINC+5922e09363'
    HOSTCC scripts/basic/fixdep
    In file included from /opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/features.h:402:0,
    from /opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/sys/types.h:25,
    from scripts/basic/fixdep.c:106:
    /opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
    # include <gnu/stubs-soft.h>
    ^
    compilation terminated.
    make[2]: *** [scripts/basic/fixdep] Error 1
    make[1]: *** [scripts_basic] Error 2
    make[1]: Leaving directory `/opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/board-support/u-boot-2015.07+gitAUTOINC+5922e09363'
    make: *** [u-boot] Error 2
    [linux-devkit]:/opt/ti/ti-processor-sdk-linux-am335x-evm>

  • Hello Bob,

    Here the solution is not to source (. /opt/ti/ti-processor-sdk-linux-am335x-evm-02.00.01.07/linux-devkit/environment-setup) before issuing make u-boot-spl

    Best regards,
    Kemal

  • Hi Kemal,

    Yes, I subsequently noticed mention to that in the documentation as well. Thanks for replying.

    Best regards,
    Bob