I’ve successfully compiled GLFW on Linaro 11.10 (on a UDOO board), but when I try to execute a basic test (http://www.glfw.org/documentation.html) I got a segmentation fault just after the call to glfwCreateWindow.
Of course no of the examples included in the git package is running.
How can I solve it? Maybe there is some options in the make process for GLFW on an AMRv7 processor?
Thank you.
P.S.:
As specified in the subject I’m running Linaro 11.10 for an ARMv7 (UDOO board), gcc version 4.6.1
0 0x2ac2ec18 in __glXInitializeVisualConfigFromTags () from /usr/lib/libGL.so.1
1 0x2ac2d4e8 in glXChooseFBConfigSGIX () from /usr/lib/libGL.so.1
2 0x000147b4 in chooseFBConfig ()
3 0x00014e40 in _glfwCreateContext ()
4 0x00013d42 in _glfwPlatformCreateWindow ()
5 0x0000e996 in glfwCreateWindow ()
6 0x0000ca82 in main ()
Anyway I noticed that for UDOO I should select glesv2 as client API.
So I used ccmake to change this option, cleaned the CMake cache, and now I got another problem. When I compile GLFX I got an error including “/usr/include/EGL/eglvivante.h”, it complaints “Platform not recognized”.
Giving a brief overview to that include it seems that it cannot identify my architecture, so the error is generated.
So I tried to force Linux as system and ARMV7 as architecture setting the option CMAKE_C_FLAGS as follow:
-march=armv7-a -DLINUX=1
But I got a lot of errors in function _glfwCreateContext about undeclared value (such as: “EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR”…)
It might be including its own eglext.h, which would then block the up-to-date version that ships with GLFW. It’s difficult to know without more information. Seeing the actual errors might help.
These are the errors I got if I only set glesv2 as client API:
[ 5%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
In file included from /usr/include/EGL/eglplatform.h:38:0,
from /usr/include/EGL/egl.h:34,
from /home/ubuntu/development/armika/deps/glfw/src/egl_platform.h:31,
from /home/ubuntu/development/armika/deps/glfw/src/x11_platform.h:57,
from /home/ubuntu/development/armika/deps/glfw/src/internal.h:69,
from /home/ubuntu/development/armika/deps/glfw/src/clipboard.c:27:
/usr/include/EGL/eglvivante.h:244:2: error: #error "Platform not recognized"
make[2]: ** [src/CMakeFiles/glfw.dir/clipboard.c.o] Error 1
make[1]: ** [src/CMakeFiles/glfw.dir/all] Error 2
make: ** [all] Error 2
And these are the errors if I also set my CMAKE_C_FLAGS to -march=armv7-a -DLINUX=1:
[100%] Building C object src/CMakeFiles/glfw.dir/egl_context.c.o
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c: In function ‘_glfwCreateContext’:
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:347:25: error: ‘EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:347:25: note: each undeclared identifier is reported only once for each function it appears in
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:349:25: error: ‘EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:352:26: error: ‘EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:355:26: error: ‘EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:361:28: error: ‘EGL_NO_RESET_NOTIFICATION_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:363:28: error: ‘EGL_LOSE_CONTEXT_ON_RESET_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:365:22: error: ‘EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:370:13: error: ‘EGL_CONTEXT_MAJOR_VERSION_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:371:13: error: ‘EGL_CONTEXT_MINOR_VERSION_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:375:13: error: ‘EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:378:13: error: ‘EGL_CONTEXT_FLAGS_KHR’ undeclared (first use in this function)
/home/ubuntu/development/armika/deps/glfw/src/egl_context.c:381:13: error: ‘EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR’ undeclared (first use in this function)
make[2]: ** [src/CMakeFiles/glfw.dir/egl_context.c.o] Error 1
make[1]: ** [src/CMakeFiles/glfw.dir/all] Error 2
make: ** [all] Error 2