Building Sample PVRShell Program

This topic contains 25 replies, has 3 voices, and was last updated by  hellboy 4 years, 6 months ago.

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #31302

    hellboy
    Member

    Hi. I am trying to build a sample program given in Examples folder in the SDK but I can’t find any makefile or configure file. Can anyone tell me how can I build any sample program from its code ?

    #37410

    dgu
    Member

    Hello

    in the documentation sdk , InstallationSection.html page describe everything !!!

    regards
    david

    #37411

    hellboy
    Member

    Thanks for the reply. But I have a doubt in the very first step.
    “Define the TOOLCHAIN environment variable to the toolchain directory, or add the path to the toolchain to the PATH environment variable (i.e. run export PATH=”path to the toolchain:$PATH”).”
    What is a TOOLCHAIN and where can I find it ? Sorry for the silly doubt but I am new to all this.

    #37412

    dgu
    Member

    that is cool that you start by using this wonderfull SDK .
    by my side :
    export PATH=/home/dgu/2015sdk/SDK_3.1:$PATH
    make PLATFORM=Linux_x86_32 X11BUILD=1

    and everything compile and run

    g++ -c -DBUILD_OGLES2 -DRELEASE -O2 -m32 -march=i686 -I/home/dgu/2015sdk/SDK_3.1/Builds/Include -I/home/dgu/2015sdk/SDK_3.1/Shell -I/home/dgu/2015sdk/SDK_3.1/Shell/API/KEGL -I/home/dgu/2015sdk/SDK_3.1/Shell/OS/LinuxX11 -I/home/dgu/2015sdk/SDK_3.1/Tools/OGLES2 -I/usr/include/X11/include /home/dgu/2015sdk/SDK_3.1/Shell/OS/LinuxX11/PVRShellOS.cpp -o../Linux_x86_32/ReleaseX11/PVRShellOS.o
    g++ -o ../Linux_x86_32/ReleaseX11/OGLES2AlphaTest ../Linux_x86_32/ReleaseX11/OGLES2AlphaTest.o ../Linux_x86_32/ReleaseX11/TexFragShader.o ../Linux_x86_32/ReleaseX11/DiscardFragShader.o ../Linux_x86_32/ReleaseX11/VertShader.o ../Linux_x86_32/ReleaseX11/Wallwire.o ../Linux_x86_32/ReleaseX11/PVRShell.o ../Linux_x86_32/ReleaseX11/PVRShellAPI.o ../Linux_x86_32/ReleaseX11/PVRShellOS.o -m32 -L/usr/include/X11/lib -lX11 -lXau -lGLESv2 -lEGL -L/home/dgu/2015sdk/SDK_3.1/Tools/OGLES2/Build/LinuxGeneric/../Linux_x86_32/ReleaseX11 -logles2tools -L”/home/dgu/2015sdk/SDK_3.1/Builds/Linux/x86_32/Lib” -Wl,–rpath-link,”/home/dgu/2015sdk/SDK_3.1/Builds/Linux/x86_32/Lib”

    i am using codelite under linux as well , you can copy the shell classes in your project and setting include directoy and linking information as well , it s then fast to setup your project.

    Its really a matter of taste and opinion about preferences 🙂

    #37413

    hellboy
    Member

    I have some more doubts. I ‘ll list them all :

    1. You did a X11 build, then why didn’t you perform the second step i.e. “export X11ROOT=/usr/X11R6_SGX”.

    2. According to your first command, is the location of the toolchain the SDK_3.1 directory present in the Imagination SDK installation folder i.e. (C:ImaginationPowerVRGraphicsSDKSDK_3.1) ?

    3. According to your machine, the first line printed after doing make has -march=i686 -I toolchain-directory/Builds/Include…… But I set my toolchain directory as /usr/ig86-pc-cygwin/bin and after doing make, my first line which is printed contains :
    -march=i686 -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Include…

    g++ -DBUILD_OGLES2 -DRELEASE -O2 -m32 -march=i686 -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Include -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell/API/KEGL -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell/OS/LinuxX11 -I/usr/X11R6_SGX/include -MF”../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.d” -MG -MM -MP -MT”../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.d” -MT”../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.o” “../../OGLES2IntroducingPVRShell.cpp”
    g++ -c -DBUILD_OGLES2 -DRELEASE -O2 -m32 -march=i686 -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Include -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell/API/KEGL -I/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Shell/OS/LinuxX11 -I/usr/X11R6_SGX/include ../../OGLES2IntroducingPVRShell.cpp -o../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.o

    4. I also perform the second step i.e. “export X11ROOT=/usr/X11R6_SGX”. My make finally fails and throws the error : ld cannot find -lGLESv2

    g++ -o ../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell ../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.o ../Linux_x86_32/ReleaseX11/PVRShell.o ../Linux_x86_32/ReleaseX11/PVRShellAPI.o ../Linux_x86_32/ReleaseX11/PVRShellOS.o -m32 -L/usr/X11R6_SGX/lib -lX11 -lXau -lGLESv2 -lEGL -L”/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Linux/x86_32/Lib” -Wl,–rpath-link,”/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Linux/x86_32/Lib”
    ../../../../../../Builds/Linux/make_example.mak:46: recipe for target `../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell’ failed

    I set my LD_LIBRARY_PATH variable to contain the directory containing the libGLESv2.so file in the Builds folder in the SDK but nothing happens.

    Can you please tell where am I going wrong ?
    Thanks.

    #37414

    dgu
    Member

    hi,
    i use of course Linux Ubuntu 🙂

    if your are using window why not use visual studio ?

    about your question
    1/ it s already in my path and my gnu toolchain as well.
    are you able to compile ?

    about step 4
    set YOUR LIBRARYPATH in my case :/home/dgu/2015sdk/SDK_3.1/Builds/Linux/x86_32/Lib
    export LD_LIBRARY_PATH=YOUR LIBRARYPATH into /etc/bash.profile

    kind regards
    david

    #37415

    hellboy
    Member

    Yes, I am able to compile and generate the following files :

    OGLES2IntroducingPVRShell.d
    OGLES2IntroducingPVRShell.o
    PVRShell.d
    PVRShell.o
    PVRShellAPI.d
    PVRShellAPI.o
    PVRShellOS.d
    PVRShellOS.o

    But the final linking step to create an executable fails.

    I exported LD_LIBRARY_PATH to /etc/profile but still it cannot find libGLESv2.so

    Is it due to because I did export X11ROOT=/usr/X11R6_SGX and after make PLATFORM=Linux_x86_32 X11BUILD=1 , it searches for “GLESv2” in /usr/X11R6_SGX/lib and when I do “ls” in /usr, I don’t see any “X11R6_SGX” directory.

    g++ -o ../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell ../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell.o ../Linux_x86_32/ReleaseX11/PVRShell.o ../Linux_x86_32/ReleaseX11/PVRShellAPI.o ../Linux_x86_32/ReleaseX11/PVRShellOS.o -m32 -L/usr/X11R6_SGX/lib -lX11 -lXau -lGLESv2 -lEGL -L”/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Linux/x86_32/Lib” -Wl,–rpath-link,”/cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1/Builds/Linux/x86_32/Lib”
    ../../../../../../Builds/Linux/make_example.mak:46: recipe for target `../Linux_x86_32/ReleaseX11/OGLES2IntroducingPVRShell’ failed

    Do I also need to include /cygdrive/c/Imagination/PowerVR/GraphicsSDK/SDK_3.1ToolsOGLES2/Build/Linux_x86_32/ReleaseX11/libogles2tools.a
    to any library path ?

    I will finally be running the application on a PandaBoard.

    #37416

    dgu
    Member

    Hello

    i see,
    yes include this lib as well
    the mandatory lib under linux X11 ARE :
    GLESv2;EGL;X11

    the /usr/X11R6_SGX given in the doc are just a sample. i do not have this directoy, maybe this should be removed because it s not clear.

    #37417

    hellboy
    Member

    Nothing happened even after including the path of libogles2tools.a to LD_LIBRARY_PATH and LIB_PATH. is there something else that I am missing ?

    #37418

    dgu
    Member

    if the library is in the ld path then this error should not happend , it s seems that the ld path is wrong .
    You mention that -L/usr/X11R6_SGX/lib doesnt exist in your machine , then you should remove it.
    the directory you mention is then wrong .
    some helper
    http://www.gnu.org/software/libtool/

    #37419

    hellboy
    Member

    I had removed X11R6_SGX. Now, the X11ROOT is /usr .

    #37420

    dgu
    Member

    does it work for you ? you should be very close now

    #37421

    hellboy
    Member

    No, it didn’t .

    #37422

    dgu
    Member

    what is the error then ?
    does it compile ?

    #37423

    dgu
    Member

    your Ld path should contain where the lib are with correct path.

Viewing 15 posts - 1 through 15 (of 26 total)
You must be logged in to reply to this topic.