I use the latest PVRTrace on a kind of Linux platform, seems it ignores LD_LIBRARY_PATH, I change to use LD_PRELOAD or replace the interception so files with the so files in the BSP(TI SOC). It can work well for the generic linux app, but not work for the app which I use node(v8) to launch. For example:
If I run the app without
LD_PRELOAD=/pvr/libEGL.so:/pvr/libGLESv2.so:/pvr/libGLESv1_CM.so:/pvr/libGLES_CM.so:/pvr/libPVRTrace.so
it can run well.
I re-flash the whole image into the device and do not change any files under /usr/lib/. So the host driver should not be the PVRTrace ones. For example,
lrwxrwxrwx 1 root root 11 Jan 1 00:03 /usr/lib/libEGL.so -> libEGL.so.1
lrwxrwxrwx 1 root root 17 Jan 1 00:02 /usr/lib/libEGL.so.1 -> libEGL.so.1.9.6.0
-rw-r–r-- 1 root root 21914 Jul 26 2015 /usr/lib/libEGL.so.1.9.6.0
I am sure there are some issues in PVRTrace’s libEGL.so, in which eglGetDisplay return 0 for node and the real eglGetDisplay is not executed.
Can you double check that if any error checking path leads to this issue?
I try to ignore libEGL.so and use
LD_PRELOAD=/pvr/libGLESv2.so:/pvr/libGLESv1_CM.so:/pvr/libGLES_CM.so:/pvr/libPVRTrace.so
and find eglGetDisplay can work well. But Segmentation fault in libPVRTrace.so: #0 0xb6f6b05e in std::map<unsigned int, VAODefinition, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, VAODefinition> > >::operator[](unsigned int const&) ()
from /opt/img-powervr-sdk/PVRHub/PVRTrace/Recorder/libPVRTrace.so #1 0xb6f5f09c in Es2::_glBindBuffer(unsigned int, unsigned int) ()
from /opt/img-powervr-sdk/PVRHub/PVRTrace/Recorder/libPVRTrace.so
This proves that is correct:
“I am sure there are some issues in PVRTrace’s libEGL.so, in which eglGetDisplay return 0 for node and the real eglGetDisplay is not executed.”
Hi Oscar,
I just tried
export LD_PRELOAD=/home/kevin/IMG_SDK_LIB/PVRTrace/Linux_x86_64/libGLESv2.so:/home/kevin/IMG_SDK_LIB/PVRTrace/Linux_x86_64/libGLESv1_CM.so:/home/kevin/IMG_SDK_LIB/PVRTrace/Linux_x86_64/libGLES_CM.so:/home/kevin/IMG_SDK_LIB/PVRTrace/Linux_x86_64/libPVRTrace.so
It is work fine on my
Linux ImgBuild 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
According to your output:
>>>>>>>>>>
PVRTRACE(M) Recorder Version: 3.3@2964572
PVRTRACE(M) Loading host library ‘/pvr/libEGL.so.1.9.6.0′
PVRTRACE(M) Host library ‘/pvr/libEGL.so.1.9.6.0′ loaded
<<<<<<<<<<
and your pvrtraceconfig.json
>>>>>>>>>>
“EglLibraryPath”: “/usr/lib/libEGL.so”,
<<<<<<<<<<
Seem like you loaded wrong host library. the right output should be like this:
>>>>>>>>>>
Loading host library '/usr/lib/libGLESv2.so’
Host library ‘/usr/lib/libGLESv2.so’ loaded
<<<<<<<<<<
Is that possible the program loaded a different json file?
or can you try to change your json file like the following:
>>>>>>>>>>
“Host”: {
“EglLibraryPath”: “/usr/lib/libEGL.so”,
“Es1LibraryPath”: “/usr/lib/libGLES_CM.so”,
“Es2LibraryPath”: “/usr/lib/libGLESv2.so”
},
<<<<<<<<<<
Thanks,
Kevin