Results 1 to 4 of 4

Thread: Help on compiling gles-1.0c on Linux

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    Help on compiling gles-1.0c on Linux

    Hi everyone,

    i have been compiling gles-1.0.c on OpenSuse Linux 11.1

    Code :
    vehbi@linux-awan:~/Desktop/gles-1.0c> make
    if [ -d es ]; then  make -C es ; fi
    make[1]: Entering directory `/home/vehbi/Desktop/gles-1.0c/es'
    gcc -o gentable gentable.c -lm
    ./gentable -s > gl_sin.h
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o gl.o gl.c
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o matrix.o matrix.c
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o light.o light.c
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o math.o math.c
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o vtx.o vtx.c
    vtx.c: In function ‘__gl_array’:
    vtx.c:224: warning: pointer type mismatch in conditional expression
    vtx.c:231: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:237: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:249: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:279: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:308: warning: dereferencing type-punned pointer will break strict-aliasing rules
    vtx.c:343: warning: dereferencing type-punned pointer will break strict-aliasing rules
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o get.o get.c
    get.c: In function ‘glGetString’:
    get.c:141: warning: pointer targets in initialization differ in signedness
    get.c:142: warning: pointer targets in initialization differ in signedness
    get.c:146: warning: pointer targets in initialization differ in signedness
    get.c:150: warning: pointer targets in initialization differ in signedness
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o glras.o glras.c
    glras.c: In function ‘__gl_first_init’:
    glras.c:1477: warning: cast to pointer from integer of different size
    glras.c:1479: warning: cast to pointer from integer of different size
    glras.c:1503: warning: cast to pointer from integer of different size
    glras.c: In function ‘__ddx_createcontext’:
    glras.c:1713: warning: cast to pointer from integer of different size
    glras.c: In function ‘__ddx_makecurrent’:
    glras.c:1735: warning: pointer targets in passing argument 3 of ‘dd->getgeometry’ differ in signedness
    glras.c:1735: warning: pointer targets in passing argument 4 of ‘dd->getgeometry’ differ in signedness
    glras.c: In function ‘__gl_ras_viewport’:
    glras.c:1796: warning: pointer targets in passing argument 3 of ‘((struct __ddif_t *)gl->dd.ddif)->getgeometry’ differ in signedness
    glras.c:1796: warning: pointer targets in passing argument 4 of ‘((struct __ddif_t *)gl->dd.ddif)->getgeometry’ differ in signedness
    gcc -Wall -O3 -fno-inline-functions -fno-builtin -D__lint__ -I..   -c -o debug.o debug.c
    ar ru libGLES_CL.a gl.o matrix.o light.o math.o vtx.o get.o glras.o debug.o
    ld -o libGLES_CL.so -shared gl.o matrix.o light.o math.o vtx.o get.o glras.o debug.o -L/usr/X11R6/lib -lX11 -lm
    [b]ld: gl.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
    gl.o: could not read symbols: Bad value
    make[1]: *** [libGLES_CL.a] Error 1
    make[1]: Leaving directory `/home/vehbi/Desktop/gles-1.0c/es'
    make: *** [es] Error 2[/b]
    vehbi@linux-awan:~/Desktop/gles-1.0c>

    As you may see there is an error, how do i solve this?

    Thanks in advance

  2. #2
    Junior Member
    Join Date
    Oct 2009
    Location
    France
    Posts
    11

    Re: Help on compiling gles-1.0c on Linux

    There're multiple problem, and more since you're trying to build under a x86_64 (amd64) system.
    Unfortunately, code and compilation options are not compatible with this kind of configuration:
    options lack of -DPIC -fPIC, code is trying to convert integer (32bits) to pointer (64bits).

    Hopefully, I have a patch that try to clean up the mess : https://quoi.quest-ce.net/data/openg...0c-patch1.diff.
    This patch apply on top of so called "OpenGL ES 1.0 Linux Sample Reference Implementation" (aka GLESonGL) sources : http://www.khronos.org/opengles/docu.../gles-1.0c.tgz.

    BTW, if you really want to use OpenGL ES under Linux, see Mesa / Gallium 3D.
    If not already done, an OpenGL ES support is going to be added to Mesa / Gallium3D: see http://www.phoronix.com/scan.php?pag...item&px=NzI3Mw

    Regards.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Location
    France
    Posts
    11

    Re: Help on compiling gles-1.0c on Linux

    There's a new version which fixed problems reported by llvm / clang.
    You can found it here: https://quoi.quest-ce.net/data/openg...0c-patch2.diff.

    Regards.

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Posts
    1

    Re: Help on compiling gles-1.0c on Linux

    Thanks for the patch. It compiled fine and the test programm works(using Ubuntuy 9.04 64bit). However, the examples from the redbook wont work. I managed to compile them (with a bit of work on the makefile) but however, execution shows only a black screen.

    Any idea about this ?
    Thanks and best regards
    Anes

Similar Threads

  1. Help on compiling gles-1.0c on Linux
    By goose in forum OpenGL ES 1.X - fixed function hardware
    Replies: 5
    Last Post: 09-27-2011, 05:49 AM
  2. GTK+GLES
    By SMV in forum Cross API and window system integration
    Replies: 0
    Last Post: 04-25-2011, 04:47 AM
  3. Unpack gles-1.0c?
    By francis in forum OpenGL ES general technical discussions
    Replies: 4
    Last Post: 02-06-2004, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •