executing powervr sdk binairie examples on linux

This topic contains 28 replies, has 6 voices, and was last updated by  Shaun 2 weeks, 1 day ago.

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #56524

    Shaun
    Member

    Hi Calvin,

    If you have installed the SDK tools to the default location, then the PVRVFrame libraries will be located in the following directory: /opt/Imagination/PowerVR_Graphics/PowerVR_Tools/PVRVFrame/Library/Linux_x86_64

    If you do not have this directory then you will need to run the installer and select “PVRVFrame” under PVRTools to install the libraries (see attached image).

    Does the PVRFrame libraries you mentioned point to /opt/Imagination/PowerVR_Graphics/PowerVR_SDK/SDK_2017_R1/Builds/Linux/x86_64/Lib?

    In fact it is the opposite, the ../Builds/Linux/x86_64/Lib are symbolic links to the PVRVFrame libraries.

    Thanks,
    Shaun

    • This reply was modified 3 weeks, 1 day ago by  Shaun.
    Attachments:
    You must be logged in to view attached files.
    #56545

    Calvin
    Member

    Shaun, Thanks so much!

    PVRVFrame path was installed in my Ubuntu, I re-exported LD_LIBRARY_PATH=/opt/Imagination/PowerVR_Graphics/PowerVR_Tools/PVRVFrame/Library/Linux_x86_64, but I still got same error, can not run EGL interface successfully.

    Actually, I’m trying to run a sample code Hello_Triangle from OpenGLES3.0_book.
    I always get a same error that is chooseConfig return numConfig=0 every time.

    I’m not sure which EGL interface was error – eglGetDisplay()/eglInitialize();
    Call eglGetError(), the error code is also not a defined normal code in egl.h.

    Do you have any suggestion or idea for me?

    Thanks!
    Calvin

    #56546

    Calvin
    Member

    ldd Hello_Trangle shows

    libGLESv2.so => /opt/Imagination/PowerVR_Graphics/PowerVR_SDK/SDK-2017_R1/Builds/Linux/x86_64/Lib/libGLESv2.so
    libEGL.so => /opt/Imagination/PowerVR_Graphics/PowerVR_SDK/SDK_2017_R1/Builds/Linux/x86_64/Lib/libEGL.so

    is there the root cause?

    but I tried ccmake, and re-config EGL and GLES library to PVRVFrame libraries, then cmake will report error.

    • This reply was modified 2 weeks, 6 days ago by  Calvin.
    #56547

    Calvin
    Member

    d

    • This reply was modified 2 weeks, 6 days ago by  Calvin.
    #56550

    Calvin
    Member

    Shaun,

    In addition, how to make the example in SDK_2017_R1/Examples?

    I just only fund an available makefile in Beginner/01_HelloAPI/OGLES/Build/Linux_x86_64.
    other examples just only have a Linux-generic folder, there is no platform matched like Linux_x86_64.

    how to build/make these examples?

    thanks!
    Calvin

    #56553

    Shaun
    Member

    Hi Calvin,

    In addition, how to make the example in SDK_2017_R1/Examples?

    To build the examples for Linux x86, with X11 window system run the following command:

    $ make PLATFORM=Linux_x86_64 X11BUILD=1 X11ROOT=/usr/include/X11

    For the HelloAPI example use the make in the ‘Linux_x86_64’ folder, for any other example use the make in the ‘LinuxGeneric’ folder.

    Thanks.
    Shaun

    1 user thanked author for this post.
    #56555

    Calvin
    Member

    Shaun,

    Thanks a lots for your help.
    Examples could make successfully, but when I run ./OGLESIntroducingPVRShell I got an error Segmentation fault and no more other printed info

    Do I miss some other configuration before run these example?

    #56556

    Shaun
    Member

    Hi Calvin,

    Do I miss some other configuration before run these example?

    Did you set the LD_LIBRARY_PATH to the PVRVFrame libraries path before executing the example? Did the example produce a log output to file before it crashed (log.txt – should be in the same directory as the binary), could you post it here if it did?

    Actually, I’m trying to run a sample code Hello_Triangle from OpenGLES3.0_book.
    I always get a same error that is chooseConfig return numConfig=0 every time.

    I’m not sure which EGL interface was error – eglGetDisplay()/eglInitialize();
    Call eglGetError(), the error code is also not a defined normal code in egl.h.

    Is there a reference to the source code you are using that you can point me too?
    Also it might be useful for you to take a look at the HelloAPI example (OGLESHelloAPI_LinuxX11.cpp) source code (from our SDK), specifically how it sets up the X11 window and how it initializes EGL – display & surface creation etc.
    Possibly your application is not setting up the X11 window correctly which is causing eglGetDisplay to fail, which in turn is causing eglChooseConfig to fail. Have you checked that the eglDisplay handle returned from the eglGetDisplay function is valid?

    Thanks,
    Shaun

    • This reply was modified 2 weeks, 5 days ago by  Shaun.
    #56559

    Calvin
    Member

    Shaun,

    Sure, I have set LD_LIBRARY_PATH=PVRVFrame libraries. binary HelloAPI could ran successfully and show a window with a yellow triangle. but others binaries besides HelloAPI were failed with same error Segmentation fault and no any log.txt in same folder.

    the issue of OpenGLES3_Book sample failure was solved. I found that the binary of a sample points to SDK libraries/symbolic libraries, I modified the name of those libraries in SDK path and set LD_LIBRARY_PATH=PVRVFrame libraries, then all those sample are successful.
    but there is a confusion in my mind, I configured EGL and OpenGL pointing to SDK libraries via ccmake, cmake and make were all successful, but execution failed. I think the binary will find/load libraries from SDK library path not PVRVFrame library path no matter how I set LD_LIBRARY_PATH=PVRVFrame libraries.
    but I configured EGL and OpenGL pointing to PVRVFrame libraries via ccmake, make failed, many symbols not found.

    Hope you could understand my comments ~~~

    #56560

    Shaun
    Member

    Hi Calvin,

    Have you tried building the app with debug symbols – add Debug=1 flag to make command. You could then use GDB to determine where in the code it is crashing.

    Thanks,
    Shaun

    #56562

    Calvin
    Member

    Hi Shaun,

    Does the binary of sample need a parameter for main function, e.g. ./OGLESIntroducingPVRShell xxx?

    I saw a line of code through gdb, commandLine.set((argc – 1), &argv[1]) in file EntryPint/main/main.cpp
    and gdb log has a line ‘_IO_new_fclose (fp=0x0) at iofclose.c:53, iofclose.c: no such file or directory’

    I’m not sure whether the entry main found the file OGLESIntroducingPVRShell?

    #56563

    Shaun
    Member

    Hi Calvin,

    The example does not require any command line arguments, if you follow the commandLine.set function call you will see this code:

    void CommandLineParser::set(int argc, char** argv)
    {	
        if (argc < 0)
        {
    	return;
        }
    ……….
    

    Which is checking if there is any command line arguments before proceeding further, so I don’t think that is the issue in this case.

    Could you try doing $ bt full in gdb after the application has crashed and dump the full output here?

    Also you could try running the application with elevated permissions (i.e. sudo ), maybe the app is trying to open a file and it does not have the permissions?

    Thanks,
    Shaun

    • This reply was modified 2 weeks, 4 days ago by  Shaun.
    1 user thanked author for this post.
    #56582

    Calvin
    Member

    Hi Shaun,

    As you said, it is a permission issue, I added SDK libraries path into ld.so.conf and sudo run the binary, executions were all successful.

    thanks so much!
    Calvin

    #56583

    Shaun
    Member

    Hi Calvin,

    I am pleased to hear that we could solve the issue, if you need any more help in the future please let us know.

    Thanks,
    Shaun

    1 user thanked author for this post.
Viewing 14 posts - 16 through 29 (of 29 total)
You must be logged in to reply to this topic.