imageData.h missing when making GLES2-compatibility

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

imageData.h missing when making GLES2-compatibility

Post by cattail »

Hi
I have a RaspBerryPi board, with debian wheezy-raspbian(2013-12, now has newer haven't test it).I want to make Love2D on it use OpenGL-ES2, I search forum and found GLES2-compatibility.
After automagic and ./configure , apt-get a lot of libfoo-dev(some name is diff from configure report,but can google it), I can make it for 1--2 hours. And a :
imageData.h not found bug stop the making process, I search a lot , can't find what is missing.

Is this a bug ? Can configure testing what is missing ,How can I fix it like apt-get install lib-foo-1.n-dev?

--------------
I use wheezy is another desktop PC , and make Love2D 0.9.0 from source , successd, I find 4 diff imageData.h in my X86 system:

Code: Select all

/usr/src/love09/love/src/modules/image/ImageData.h
/usr/src/love09/love/src/modules/image/magpie/ImageData.h
/usr/src/love-experiments/src/modules/image/ImageData.h
/usr/src/love-experiments/src/modules/image/magpie/ImageData.h
Two of them size is 1755, another two's size is 3918 , can I copy one of them to RaspberryPi wheezy by hand?Which one if OK?
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: imageData.h missing when making GLES2-compatibility

Post by slime »

The GLES2-compatibility branch is ancient, use the GLES branch instead (download).

You'll also need to build SDL2 from tip in order to be able to use its new Raspberry Pi backend.


You should also set the environment variable LOVE_GRAPHICS_USE_OPENGLES=1 before actually running LÖVE on the Raspberry Pi.

EDIT: I just updated the GLES branch so you shouldn't need to do the environment variable thing anymore.
Last edited by slime on Mon Jan 20, 2014 12:20 am, edited 1 time in total.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

I had download SDL2.0.2 , make make install , OK
And I get GLES branch , when I use" ./platform/unix/automagic -d" , I get :

Code: Select all

configure.ac:54: error: possibly undefined macro: AM_PATH_SDL2
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
[automagic]  Failed, sadface.
[automagic]  You can make this script more verbose running it in debug mode (-d)
[automagic]  This is generally a configuration error (I'm looking at you aclocal)

Is there anything I miss? How can I fix this?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: imageData.h missing when making GLES2-compatibility

Post by bartbes »

If you compiled it manually, the definition file for sdl2 (sdl2.pc) may be in /usr/local which is not in the default search path for pkg-config. You probably want to verify it' s in /usr/local/share/aclocal and then add it to your search path using these instructions.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

Thank slime and bartbes , I copyed sdl2.pc to /usr/local/share/aclocal,and modified platform/ unix/automagic line 47:

Code: Select all

	${ACLOCAL} -I /usr/local/share/aclocal 2>&1 || return 1
This time ,automagic running is OK. But when I run ./configure , I get :

Code: Select all

...
for library containing glLoadIdentity... no
configure: error: LÖVE needs "OpenGL", please install "OpenGL" with development files and try again
And I try apt-get install libopengl-dev (and libOpenGL-dev) ,there is nothing .
I use
apt-cache search libopengl-dev
and not found some thing like it.

Should I use some dev files about mesa, like
libgles2-mesa-dev , libgl1-mesa-dev ?
Or I missing a version number in the name? How can I get "OpenGL with development files" in debian wheezy?
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

I find a tip for find OpenGL-dev :
http://www.codeproject.com/Articles/18 ... ent-in-Ub
Open http://www.debian.org/distrib/packages , clike "Search the contents of packages",
select "packages that contain files named like this " and search "gl.h“
And I get:

Code: Select all

File 	Packages
/usr/i586-mingw32msvc/include/GL/gl.h 	mingw32-runtime
/usr/i686-w64-mingw32/include/GL/gl.h 	mingw-w64-i686-dev
/usr/include/CGAL/gl.h 	libcgal-dev
/usr/include/ClanLib-1.0/ClanLib/gl.h 	libclanlib-dev
/usr/include/FL/gl.h 	libfltk1.1-dev, libfltk1.3-dev
/usr/include/GL/gl.h 	mesa-common-dev
/usr/include/GLES/gl.h 	libgles1-mesa-dev
/usr/include/Inventor/C/glue/gl.h 	libcoin60-dev
/usr/include/Inventor/system/gl.h 	libcoin60-dev
/usr/include/OGRE/RenderSystems/GL/GL/gl.h 	libogre-1.8-dev, libogre-dev
/usr/include/sage/GL.h 	libsage-dev
/usr/include/sofa/helper/system/gl.h 	libsofa1-dev
......
Is mesa-common-dev the right option? If I will use OpenGL-ES2 Accelerate in RaspberryPi hardware , should I use libgles1-mesa-dev?
If I don't apt-get install mesa, then I can't use the slower soft emulation opengl(mesa) function , right?

-----------
And I just find there some thing not in results, but in a "Similar packages" list:

Code: Select all

    libgles2-mesa-dev
    libgles1-mesa
    libgles1-mesa-dbg
    libgles2-mesa
    libgles2-mesa-dbg
......
The libgles2-mesa-dev is likly what I must install?
Last edited by cattail on Sat Jan 25, 2014 3:14 pm, edited 2 times in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: imageData.h missing when making GLES2-compatibility

Post by bartbes »

You probably do need the mesa headers, at least. That said, I'm not sure what you need library-wise since I never compiled it with GLES support.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

Q1: Is my way about OpenGL-ES2 support right?(Does libgl1-mesa-dev include OpenGL-ES2 hardware support(ARM) ?)
After "apt-get install libgles2-mesa-dev" , configure sad OpenGL not found.
After "apt-get install mesa-common-dev" , configure sad OpenGL not found.
After "apt-get install libgl1-mesa-dev" , configure sad OpenGL yes.

Q2: How can I fix this error?
I had download SDL2-2.0.1.tar.gz, make , make install, OK.
I had download LuaJIT-2.0.2.tar.gz, make , make install, OK.
Run automagic , ok. Run ./configure , ok.
make , after minutes , I get:

Code: Select all

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I. -I./modules -I./libraries -I./libraries/enet/libenet/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I/usr/local/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/local/include/luajit-2.0 -I/usr/include/freetype2 -g -O2 -std=c++0x -MT modules/graphics/opengl/Shader.lo -MD -MP -MF modules/graphics/opengl/.deps/Shader.Tpo -c modules/graphics/opengl/Shader.cpp  -fPIC -DPIC -o modules/graphics/opengl/.libs/Shader.o
In file included from ./common/runtime.h:31:0,
                 from ./modules/thread/Thread.h:25,
                 from ./modules/thread/threads.h:25,
                 from ./modules/image/ImageData.h:27,
                 from ./modules/image/Image.h:28,
                 from modules/graphics/opengl/Canvas.h:25,
                 from modules/graphics/opengl/Shader.cpp:25:
/usr/local/include/luajit-2.0/lua.h:103:9: error: 'ptrdiff_t' does not name a type
/usr/local/include/luajit-2.0/lua.h:147:39: error: ISO C++ forbids declaration of 'lua_Integer' with no type [-fpermissive]
/usr/local/include/luajit-2.0/lua.h:147:39: warning: 'lua_Integer' initialized and declared 'extern' [enabled by default]
/usr/local/include/luajit-2.0/lua.h:147:26: error: 'lua_tointeger' was not declared in this scope
/usr/local/include/luajit-2.0/lua.h:147:41: error: expected ',' or ';' before '(' token
/usr/local/include/luajit-2.0/lua.h:162:48: error: 'lua_Integer' is not a type
In file included from ./common/runtime.h:36:0,
                 from ./modules/thread/Thread.h:25,
                 from ./modules/thread/threads.h:25,
                 from ./modules/image/ImageData.h:27,
                 from ./modules/image/Image.h:28,
                 from modules/graphics/opengl/Canvas.h:25,
                 from modules/graphics/opengl/Shader.cpp:25:
/usr/local/include/luajit-2.0/lauxlib.h:44:42: error: ISO C++ forbids declaration of 'lua_Integer' with no type [-fpermissive]
/usr/local/include/luajit-2.0/lauxlib.h:44:42: warning: 'lua_Integer' initialized and declared 'extern' [enabled by default]
/usr/local/include/luajit-2.0/lauxlib.h:44:42: error: redefinition of 'int lua_Integer'
/usr/local/include/luajit-2.0/lua.h:147:9: error: 'int lua_Integer' previously defined here
/usr/local/include/luajit-2.0/lauxlib.h:44:25: error: 'luaL_checkinteger' was not declared in this scope
/usr/local/include/luajit-2.0/lauxlib.h:45:40: error: ISO C++ forbids declaration of 'lua_Integer' with no type [-fpermissive]
/usr/local/include/luajit-2.0/lauxlib.h:45:40: warning: 'lua_Integer' initialized and declared 'extern' [enabled by default]
/usr/local/include/luajit-2.0/lauxlib.h:45:40: error: redefinition of 'int lua_Integer'
/usr/local/include/luajit-2.0/lua.h:147:9: error: 'int lua_Integer' previously defined here
/usr/local/include/luajit-2.0/lauxlib.h:45:25: error: 'luaL_optinteger' was not declared in this scope
make[3]: *** [modules/graphics/opengl/Shader.lo] Error 1
make[3]: Leaving directory `/usr/src/love-experiments/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/love-experiments/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/love-experiments'
make: *** [all] Error 2
After google, I try to add a line in /usr/local/include/luajit-2.0/lua.h for fix error: ‘ptrdiff_t’ does not name a type

Code: Select all

#include <cstddef>
Not lucky, and try add the same line in common/runtime.h, the same.

I have make love0.9.0 ok in x86, debian wheezy , Luajit-2.0.2. I don't know how to fix this issue.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

When I search cstddef in heads, I just found my X86 PC is gcc-4.7 , and RaspberryPi wheezy use gcc-4.6, mybe the file : cstddef is diff in
libstdc++6-4.6-dev VS libstdc++6-4.7-dev ?
Now I am removing gcc, g++, libstdc++6-4.6-dev and get a newer gcc family of 4.7 for testing.

After apt-get gcc-4.7 etc, nothing changed, maybe I should change some FLAG in some file?

BTW:
I had 2 requited when configure but haven't found dev files name:

Code: Select all

checking for library containing sqrt... none required
...
checking for library containing mpg123_open_feed... -lmpg123
checking for library containing mpg123_seek_64... none required
But I have libmpg123-dev installed.
User avatar
cattail
Citizen
Posts: 56
Joined: Mon Feb 13, 2012 4:11 pm

Re: imageData.h missing when making GLES2-compatibility

Post by cattail »

And when I use the newest Raspbian : 2014-01-07-wheezy-raspbian , test the GLES branch both hg clone and the link in slime post , the same errors , (the GCC version is 4.6.3) what should I do ?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests