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/EVMK2H: After installing the SDK I cannot successfully compile any example applications

Part Number: EVMK2H

Tool/software: Linux

I have successfully installed the Linux SDK (ti-processor-sdk-linux-k2hk-evm-05.03.00.07). When I go into any of the "example-applications" and try to compile them I received the following error:

Output from trying to compile: arm-benchmarks-1.3

make
for dir in dhrystone whetstone linpack; do \
make -C $dir debug; \
done
make[1]: Entering directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/dhrystone'
/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -DTIME -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/dhry_1.o dhry_1.c
In file included from dhry_1.c:56:0:
dhry.h:432:10: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^~~~~~~~~
compilation terminated.
Makefile:100: recipe for target 'Debug/dhry_1.o' failed
make[1]: *** [Debug/dhry_1.o] Error 1
make[1]: Leaving directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/dhrystone'
make[1]: Entering directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/whetstone'
/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -fmessage-length=0 -Wall -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/whetstone.o whetstone.c
whetstone.c:93:10: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^~~~~~~~~~
compilation terminated.
Makefile:102: recipe for target 'Debug/whetstone.o' failed
make[1]: *** [Debug/whetstone.o] Error 1
make[1]: Leaving directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/whetstone'
make[1]: Entering directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/linpack'
/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -DUNROLL -DSP -fmessage-length=0 -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/linpack.o linpack.c
linpack.c:89:10: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^~~~~~~~~
compilation terminated.
Makefile:102: recipe for target 'Debug/linpack.o' failed
make[1]: *** [Debug/linpack.o] Error 1
make[1]: Leaving directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/example-applications/arm-benchmarks-1.3/linpack'
Makefile:7: recipe for target 'debug' failed
make: *** [debug] Error 2

What are the steps needed to be able to build the example applications and target them to the EVMK2H board, while running Linux. BTW: Yes, I am only interested in running on the SoC at this time.

Thanks!

  • Hi Edward,

    Take a look at the Makefile in ~/ti-processor-sdk-linux-k2hk-evm-05.00.00.15. In order to build the arm-benchmarks you should execute the following commands:
     cd ~/ti-processor-sdk-linux-k2hk-evm-05.00.00.15

     make arm-benchmarks

    Additionally you could see the Linux Software Developer's guide here:
     

    Best Regards,
    Yordan

     

  • I just tried this, but unfortunately I get the same error.

  • Some updated information, I noticed that the environment-setup script in the linux-devkit folder is empty, which doesn't seem correct.

  • Hi,

    I tested with earlier version of the SDK -> 05.00.00.15 and this works fine:
      =============================
    Building ARM Benchmarks
    =============================
    make[1]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3'
    for dir in dhrystone whetstone linpack; do \
                    make -C $dir debug; \
    done
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/dhrystone'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -DTIME  -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/dhry_1.o dhry_1.c
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -DTIME  -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/dhry_2.o dhry_2.c
    Compiling Debug...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Debug/dhrystone Debug/dhry_1.o Debug/dhry_2.o  -Wl,--hash-style=gnu -Wl,-O1   -Wl,-Map,Debug/dhrystone.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/dhrystone'
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/whetstone'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2   -fmessage-length=0 -Wall -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/whetstone.o whetstone.c
    Compiling Debug...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Debug/whetstone Debug/whetstone.o  -Wl,-O1 -Wl,--hash-style=gnu -lm   -Wl,-Map,Debug/whetstone.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/whetstone'
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/linpack'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -g3 -gdwarf-2 -DUNROLL -DSP  -fmessage-length=0 -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oDebug/linpack.o linpack.c
    Compiling Debug...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Debug/linpack Debug/linpack.o  -Wl,-O1 -Wl,--hash-style=gnu -lm   -Wl,-Map,Debug/linpack.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/linpack'
    for dir in dhrystone whetstone linpack; do \
                    make -C $dir release; \
    done
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/dhrystone'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -DTIME -O3  -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oRelease/dhry_1.o dhry_1.c
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -DTIME -O3  -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oRelease/dhry_2.o dhry_2.c
    Compiling Release...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Release/dhrystone Release/dhry_1.o Release/dhry_2.o  -Wl,--hash-style=gnu -Wl,-O1  -Wl,-Map,Release/dhrystone.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/dhrystone'
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/whetstone'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc  -O3  -fmessage-length=0 -Wall -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oRelease/whetstone.o whetstone.c
    Compiling Release...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Release/whetstone Release/whetstone.o  -Wl,-O1 -Wl,--hash-style=gnu -lm  -Wl,-Map,Release/whetstone.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/whetstone'
    make[2]: Entering directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/linpack'
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -DUNROLL -DSP -O3  -fmessage-length=0 -c -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -oRelease/linpack.o linpack.c
    Compiling Release...
    /home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -o Release/linpack Release/linpack.o  -Wl,-O1 -Wl,--hash-style=gnu -lm  -Wl,-Map,Release/linpack.map
    make[2]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3/linpack'
    make[1]: Leaving directory '/home/users/ykovachev/ti-processor-sdk-linux-k2hk-evm-05.00.00.15/example-applications/arm-benchmarks-1.3'

    I am downloading version 05.03 to test with it, but from the log you provide, specifically the errors of this kind:
       linpack.c:89:10: fatal error: stdio.h: No such file or directory
    #include <stdio.h>

       whetstone.c:93:10: fatal error: stdlib.h: No such file or directory
    #include <stdlib.h>
    ^~~~~~~~~~

    are usually caused by wrong toochain setup. Check your $PATH, $ARCH and $CROSS_COMPILE. Make sure you use the arm-linux-gnueabihf- toochain and NOT the aarch64-linux-gnu- (this is for AM654x devices ONLY!)

    Best Regards,
    Yordan

  • Thanks for the response. Like I mentioned the environment-setup script was blank and didn't seem right to me, since the build scripts use it to setup the environment. I decided to re-install the SDK and verified after the install that the environment-setup script had information in it. I was then able to build at least one of the example applications.

    I then decided to follow the Getting Started Guide, which indicates we should be able to rebuild the kernel. I used make all and it did compile a lot of code, but eventually failed with the below information. Should I create a separate question for this, or would you like to continue on this thread?

    make -j 1 -C /home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447 ARCH=arm CROSS_COMPILE=/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- zImage
    make[1]: Entering directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447'
    scripts/kconfig/conf --silentoldconfig Kconfig
    CHK include/config/kernel.release
    CHK include/generated/uapi/linux/version.h
    CHK include/generated/utsrelease.h
    CHK include/generated/bounds.h
    CHK include/generated/timeconst.h
    CHK include/generated/asm-offsets.h
    CALL scripts/checksyscalls.sh
    CHK scripts/mod/devicetable-offsets.h
    CHK include/generated/compile.h
    GZIP kernel/config_data.gz
    CHK kernel/config_data.h
    GEN lib/oid_registry_data.c
    /home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/bin/perl: 1: /home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/bin/perl: Syntax error: word unexpected (expecting ")")
    lib/Makefile:236: recipe for target 'lib/oid_registry_data.c' failed
    make[2]: *** [lib/oid_registry_data.c] Error 2
    Makefile:1039: recipe for target 'lib' failed
    make[1]: *** [lib] Error 2
    make[1]: Leaving directory '/home/ewdev/ti-processor-sdk-linux-k2hk-evm-05.03.00.07/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447'
    Makefile:10: recipe for target 'linux' failed
    make: *** [linux] Error 2

  • Hi,

    I ran the compilation of all linux SDK components to see if this error will duplicate on my side.

    Best Regards,
    Yordan

  • Hi,

    Ok, I tested this on my machine and it worked fine. See the log attached: https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/make_5F00_all_5F00_log

    Again I suppose this is a problem with your toochain. Check your $PATH after you've ran the make all command to see if the toochain directory of Processor SDK Linux is included in it.


    Best Regards,
    Yordan