Results 1 to 6 of 6

Thread: Help on compiling gles-1.0c on Linux

  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Help on compiling gles-1.0c on Linux

    Hi all

    As per subject line, I get the following error:
    Code :
    $ make
    if [ -d es ]; then  make -C es ; fi
    make[1]: Entering directory
    `/mnt/sda1/home/lelanthran/old/lmanickum/src/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:222: error: lvalue required as increment operand
    vtx.c:222: error: lvalue required as increment operand
    vtx.c:229: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:235: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:247: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:277: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:280: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:306: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    vtx.c:341: warning: dereferencing type-punned pointer will break
    strict-aliasing rules
    make[1]: *** [vtx.o] Error 1
    make[1]: Leaving directory
    `/mnt/sda1/home/lelanthran/old/lmanickum/src/gles-1.0c/es'
    make: *** [es] Error 2
    $

    A google search turned up no one else with this problem, so I'm
    inclined to suspect that it may be my system that is the problem.

    My system is as follows:
    Code :
    $ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=8.10
    DISTRIB_CODENAME=intrepid
    DISTRIB_DESCRIPTION="Ubuntu 8.10"
    $ uname 
    Linux lmanickum-ds2 2.6.27-7-server #1 SMP Fri Oct 24 07:37:55 UTC 2008
    i686 GNU/Linux
    $ gcc -v
    Using built-in specs.
    Target: i486-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu
    4.3.2-1ubuntu11' --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 --enable-checking=release
    --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
    Thread model: posix
    gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)
    $

    Any help would be appreciated,
    Kind Regards

  2. #2
    Junior Member
    Join Date
    Dec 2008
    Location
    Oslo, Norway
    Posts
    25

    Re: Help on compiling gles-1.0c on Linux

    I get the same error, so it's not just your setup.

    Anyway, the issue seems to be the way indices is updated, where the cast seems to prevent indices from being an l-value (which makes sense to me). Here's a quick patch I've done to avoid this issue:
    Code :
    222c222,223
    <     j = type == 0 ? *((__gl_ub*)indices)++ : *((__gl_us*)indices)++;
    ---
    >     j = type == 0 ? *((__gl_ub*)indices) : *((__gl_us*)indices);
    >     indices = type == 0 ? *((__gl_ub*)indices + 1) : *((__gl_us*)indices + 1);
    I hope this helps.
    Erik "kusma" Faye-Lund

  3. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Re: Help on compiling gles-1.0c on Linux

    Thanks, that works wonderfully

    Kind Regards

  4. #4
    Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Re: Help on compiling gles-1.0c on Linux

    I think my variant is better:

    Code :
    <     j = type == 0 ? *((__gl_ub*)indices)++ : *((__gl_us*)indices)++;
    ---
    >                     j = type == 0 ? *((__gl_ub*)indices) : *((__gl_us*)indices);
    >                     indices = type == 0 ? (__gl_ub*)indices + 1 : (__gl_us*)indices + 1;

    The kusma's variant causes a crash when 'glDrawElements' method is being called.

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

    Re: Help on compiling gles-1.0c on Linux

    I've made a patch on gles-1.0c to fix multiple problems in the package in order to build it on x86_64.

    See this post: viewtopic.php?p=5488#p5488

  6. #6
    Junior Member
    Join Date
    Sep 2011
    Posts
    1

    Re: Help on compiling gles-1.0c on Linux

    Seems like the code of vtx.c is borked up. This is not a OpenGL problem, but a problem of the software to compile. I take the compilation log, and bug the code maintainer about it.

Similar Threads

  1. GTK+GLES
    By SMV in forum Cross API and window system integration
    Replies: 0
    Last Post: 04-25-2011, 04:47 AM
  2. Help on compiling gles-1.0c on Linux
    By veb61 in forum OpenGL ES 1.X - fixed function hardware
    Replies: 3
    Last Post: 01-25-2010, 07:04 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
  •