executing powervr sdk binairie examples on linux

Hi Calvin,

[blockquote]In addition, how to make the example in SDK_2017_R1/Examples?[/blockquote]
To build the examples for Linux x86, with X11 window system run the following command:
[scode lang=“{language}”]$ make PLATFORM=Linux_x86_64 X11BUILD=1 X11ROOT=/usr/include/X11[/scode]

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

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?

Hi Calvin,

[blockquote]Do I miss some other configuration before run these example?[/blockquote]

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?

[blockquote]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.[/blockquote]

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

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 ~~~

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

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?

Hi Calvin,

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

[scode lang="{language}"]
void CommandLineParser::set(int argc, char** argv)
{
if (argc < 0)
{
return;
}

[/scode]

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

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

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