PowerVR SDK not working with g++ 4.3.3?

Hi.

I’ve ran into problems running PowerVR SDK Demos after I upgraded my distro to Ubuntu 9.04. I had no problems whatsoever with my old Hardy Heron (8.04) version.

I would guess there are some compatibility problems between PowerVR SDK provided EGL and GLES libraries and g++ installed in the system.

What happens is that whenever EGL and GLES library is linked with an application the application just dies with shared library event.

Following script illustrates what happens when a really simple application is compiled with and without EGL and GLESv2 libraries:


>8


Script started on Sun 02 Aug 2009 02:08:08 PM EEST
:~/workspace/test1$ g++ main.cpp -o test

:~/workspace/test1$ ./test 

main() - called.

:~/workspace/test1$ g++ main.cpp -lEGL -lGLESv2 -o test

:~/workspace/test1$ ./test 

:~/workspace/test1$ gdb ./test 

GNU gdb 6.8-debian

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "i486-linux-gnu"...

(gdb) run

Starting program: /home/tuomas/workspace/test1/test 

[Thread debugging using libthread_db enabled]

[New Thread 0xb79956d0 (LWP 8531)]

[New Thread 0xb7994b90 (LWP 8534)]

 
Program exited with code 0377.

(gdb) quit

:~/workspace/test1$ g++ -v

Using built-in specs.

Target: i486-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu

Thread model: posix

gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) 

:~/workspace/test1$ exit


Script done on Sun 02 Aug 2009 02:09:26 PM EEST


>8


And here is the application code:


>8


Script started on Sun 02 Aug 2009 02:14:09 PM EEST
:~/workspace/test1$ cat main.cpp 

#include <iostream>

 
using namespace std;

 
int main(int, char**)

{

    cout << "main() - called." << endl;

    return 0;

}

:~/workspace/test1$ exit


Script done on Sun 02 Aug 2009 02:14:15 PM EEST


>8


Does anybody have any ideas about what's going on? Should I use an earlier version of g++ or is there going to be a recompilation of PowerVR SDK libraries that would work with g++ 4.3.3? Or is the root cause actually something completely unrelated?

I've tried this with PowerVR SDK versions 2.03.23.1162 and 2.04.24.0811 with identical results.

Cheers,
Tuomas Järvensivu

As a follow-up, here are the shared library dependencies of both working and broken compilation.

These are the dependencies of the working compilation:


>8


:~/workspace/test1$ ldd test
    linux-gate.so.1 =>  (0xb7f7d000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e7d000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7e57000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e47000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ce4000)
    /lib/ld-linux.so.2 (0xb7f7e000)


>8


And these are the dependencies of the broken compilation:


>8


:~/workspace/test1$ ldd test
    linux-gate.so.1 =>  (0xb7ff4000)
    libEGL.so => /home/tuomas/libs/PowerVR_GLES20_Emulation_2.03.23.1162/Builds/OGLES2/LinuxPC/Lib/libEGL.so (0xb7f42000)
    libGLESv2.so => /home/tuomas/libs/PowerVR_GLES20_Emulation_2.03.23.1162/Builds/OGLES2/LinuxPC/Lib/libGLESv2.so (0xb7e04000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7d05000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7cdf000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7cd0000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b6d000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0xb7a7e000)
    librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7a75000)
    libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7a5b000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0xb7a4b000)
    libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7a42000)
    libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7a3a000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7a30000)
    /lib/ld-linux.so.2 (0xb7ff5000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7a15000)
    libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7a11000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0xb7a0d000)
    libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb7a08000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7a03000)


>8


Cheers,
Tuomas Järvensivu

Hi,

Could please make sure that you have following packages installed:

libglut3-dev, libglew-dev, glew-utils installed. if not then please install them and then run SDK.

you can install them using apt-get:

sudo apt-get install libglut3-dev -y

sudo apt-get install libglew-dev -y

sudo apt-get install glew-utils -y

Tell us if it helped

Kindest regards,



Hey.

Worked like a dream! Great. Thanks a lot.

Just in case the same happens later: Is there a list of dependencies somewhere so that one could verify to have all necessary packages installed?

Cheers,
Tuomas

Hi,

The issue that you have described is the only known problem like this (there were some others reports like this and always related to Ubunutu 8.04 and 9.04). No other software requirements should be needed. Documentation was updated with information about that case.