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.

Error compiling devmem2.c while building Graphics SDK 5.01.01.01

Ok, I think I now have the right set of things to guild the Graphics SDK.

I installed the Sitara SDK version 07.00.00.00, and then installed the Graphics SDK 05.01.01.01 from that, both into /home/steve/src/qt5.2-build. I configured the kernel that's located within the SDK and successfully built it. I set up the Rules.make file for the Graphics SDK as:

HOME=/home/steve/src/qt5.2-build
CSTOOL_DIR=/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux
CSTOOL_PREFIX=arm-linux-gnueabihf-
KERNEL_INSTALL_DIR=/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01
TARGETFS_INSTALL_DIR=/home/steve/am-rootfs
GRAPHICS_INSTALL_DIR=$(HOME)/Graphics_SDK_5_01_01_01

I added the toolchain's bin directory to my path. I then executed make OMAPES=8.x all. I've gotten further than ever this time, but still got the following error (note: the entire output is here, the error is near the end):

steve@steve-VirtualBox:~/src/qt5.2-build/Graphics_SDK_5_01_01_01$ make OMAPES=8.x all
building the sgx kernel modules...
/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/bin:/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
make[1]: Entering directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM'
make[1]: Leaving directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM'
make[1]: Entering directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM'
make -C /home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01 M=`pwd` 
make[2]: Entering directory `/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01'
  LD      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.o
  LD      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/built-in.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_displayclass.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb_linux.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb.o
  LD      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/built-in.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/queue.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/hash.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/perproc.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/mem.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/power.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/deviceclass.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/metrics.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/resman.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/buffer_manager.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/pvrsrv.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/handle.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/lists.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/ra.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/common/devicemem.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/mm.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/mutex.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/mmap.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/module.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/proc.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/event.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/osfunc.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/pvr_bridge_k.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/pdump.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/mutils.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/env/linux/osperproc.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxtransfer.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxutils.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/pb.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxkick.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/mmu.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxreset.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxpower.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/bridged/bridged_pvr_bridge.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/bridged/bridged_support.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/srvkm/bridged/sgx/bridged_sgx_bridge.o
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/system/ti335x/sysutils.o
In file included from /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/system/ti335x/sysutils.c:46:0:
/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c: In function ‘EnableSGXClocks’:
/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/system/ti335x/sysutils_linux.c:195:6: warning: unused variable ‘ret’ [-Wunused-variable]
  CC [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/system/ti335x/sysconfig.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/pvrsrvkm.o
  Building modules, stage 2.
  MODPOST 3 modules
  CC      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/pvrsrvkm.mod.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/pvrsrvkm.ko
  CC      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.mod.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko
  CC      /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb.mod.o
  LD [M]  /home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM/services4/3rdparty/dc_ti335x_linux/omaplfb.ko
make[2]: Leaving directory `/home/steve/src/qt5.2-build/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01'
make[1]: Leaving directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/GFX_Linux_KM'
copying the sgx kernel modules to appropriate folder...
building devmem2...
make[1]: Entering directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/tools/devmem2'
rm -rf ./Obj *.o
make[1]: Leaving directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/tools/devmem2'
make[1]: Entering directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/tools/devmem2'
mkdir -p ./Obj
arm-linux-gnueabihf-gcc -Wall -DRELEASE -O2 -c   devmem2.c -o Obj/devmem2.o
devmem2.c:40:19: fatal error: stdio.h: No such file or directory
compilation terminated.
make[1]: *** [Obj/devmem2.o] Error 1
make[1]: Leaving directory `/home/steve/src/qt5.2-build/Graphics_SDK_5_01_01_01/tools/devmem2'
make: *** [builddevmem2] Error 2
steve@steve-VirtualBox:~/src/qt5.2-build/Graphics_SDK_5_01_01_01$

  • Steve,

    Have you set-up your host system with the setup.sh script inside <SDK7_dir>? Do you have the "build-essential" package installed?

    Best regards,
    Miroslav

  • I had not run setup.sh, but I just did and then attempted to build the Graphics SDK again and got the exact same error. What does setup.sh do that allows stdio.h to be found?

    Also, I already had TFTP and NFS set up manually, and had my AM335x EVMSK booting from it. I'm amazed that the setup script that I'm expected to run goes ahead and recreates a lot of these things for me. I'll go ahead and use what it installed until I get this thing working, then try to migrate back to my own root filesystem after.

    Anyway, I'm still at the same place with the same error. I appreciate the relatively quick responses, and if you need any more information please ask.

  • In fact, now tftpd seems broke, and I cannot load a kernel image from it...

  • Steve Ziuchkovski said:
    What does setup.sh do that allows stdio.h to be found?

    The script calls other scripts from the <SDK>/bin folder, one of which installs needed host pc packages. One of these packages is "build-essential" which, if missing, is a common reason for this error. Did you check if the package has been installed?

    Steve Ziuchkovski said:
    In fact, now tftpd seems broke, and I cannot load a kernel image from it...

    How exactly? Logs?

    Best regards,
    Miroslav

  • Here is what happened with apt-get when I ran the setup.sh script (I already have build-essential and others installed):

    Start-Date: 2014-05-28  08:19:54
    Commandline: apt-get install minicom uboot-mkimage
    Install: uboot-mkimage:i386 (2011.09-2), u-boot-tools:i386 (2011.09-2, automatic), minicom:i386 (2.5-2), lrzsz:i386 (0.12.21-5, automatic)
    End-Date: 2014-05-28  08:20:02
    

    The best way to answer your question regarding tftpd is to point you to my serverfault.com question.

  • The issue regarding tftp has been resolved, apparently the setup.sh script caused tftpd to be run as both a service and with xinetd, which would obviously conflict with each other.

    I still have the open issue of not being able to build the graphics SDK.