Re: problem compiling mesa library

Artem Pylypchuk <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
On 03/07/2012 02:10 AM, محمد ارشد فرحان wrote:
> Dear All,
> i'm trying to compile *Xcrysden_1.5.24_src_all* from the source code.
> & it gave me lots of errors.
>
> i tried the manual explicit compilation of Mesa library & the error i
> got is :
>
> "gcc -c -I../../../include -I../../../src/mapi -Wall
> -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -O3
> -g -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE
> -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_XSHM
> -DHAVE_POSIX_MEMALIGN -I/usr/X11R6/include -std=c99 -ffast-math
> -fno-strict-aliasing -DMAPI_ABI_HEADER=\"vgapi/vgapi_tmp.h\"
> ../../../src/mapi/mapi/mapi.c -o mapi.o
> ../../../src/mapi/mapi/mapi.c:39: error: ‘MAPI_TABLE_NUM_STATIC’
> undeclared here (not in a function)
> ../../../src/mapi/mapi/mapi.c:39: error: ‘MAPI_TABLE_NUM_DYNAMIC’
> undeclared here (not in a function)
> make: *** [mapi.o] Error 1
> "

> Which version of Mesa are you using?

> How are you compiling Mesa?  That is, what arguments to ./configure?

> -Brian


This is a python-related problem, since Mesa build tree uses the python2 wrapper to generate a necessary header executing src/mapi/mapi_abi.py, if the python installation is broken or version is low, an error similar to this may be produced, resulting in an incomplete header file:

gmake[3]: Entering directory `/mnt/rom/juicee/builds/Mesa-9.2.3/src/mapi/shared-glapi'
  GEN      glapi_mapi_tmp.h
  File "../../../src/mapi/mapi_abi.py", line 72
    sep = '' if t.endswith('*') else ' '
              ^
SyntaxError: invalid syntax


on the second run, the compilation will fail with the messages mentioned.

I'm not a guru in Python, but experiments with eselect (a Gentoo utility) have shown that the mentioned syntax will fail in Python 2.4, while in Python 2.5 & 2.6 it would work.

Yet another problem exists in src/glsl/builtins/tools/generate_builtins.py

  GEN      builtin_function.cpp
Traceback (most recent call last):
  File "./builtins/tools/generate_builtins.py", line 291, in <module>
    check += ' && {0}state->es_shader'.format('' if is_es else '!')
AttributeError: 'str' object has no attribute 'format'
  CXX      builtin_function.lo
g++: builtin_function.cpp: No such file or directory
g++: no input files

again with syntax failing for Python <= 2.5.


Furthermore, problems with generating an invalid version of src/mapi/glapi/glapitable.h or some other files exist, resulting in errors of the kind

  CC       api_arrayelt.lo
../../src/mesa/main/api_arrayelt.c:98:7: error: '_gloffset_Color3bv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:99:7: error: '_gloffset_Color3ubv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:100:7: error: '_gloffset_Color3sv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:101:7: error: '_gloffset_Color3usv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:102:7: error: '_gloffset_Color3iv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:103:7: error: '_gloffset_Color3uiv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:104:7: error: '_gloffset_Color3fv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:105:7: error: '_gloffset_Color3dv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:108:7: error: '_gloffset_Color4bv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:109:7: error: '_gloffset_Color4ubv' undeclared here (not in a function)
../../src/mesa/main/api_arrayelt.c:110:7: error: '_gloffset_Color4sv' undeclared here (not in a function)
<...>

and similar (for other files).


But, hey, none of these exist for Mesa-10.0.0-rc1, which builds smoothly (although it requires automake/autoconf-1.12 unlike the higher 1.14 requirement for Mesa-9.2.3 - I actually simply made a symlink to 1.14, but lots of automake warnings were produced)
 - so heads up for releasing it soon.


ps: I built both Mesa-9.2.3 (which never completed) & Mesa-10.0.0-rc1 (smoothly) with ./configure --prefix=/usr --with-llvm-prefix=/mnt/rom/juicee/builds/polly-3.3.src/llvm_build --enable-gles2, compilers were gcc-4.2.4 & gcc-4.8.2. My system is rather old and a little bit messy, but it doesn't explain, why the release candidate buids better than current stable.

-- реклама -----------------------------------------------------------
Поторопись зарегистрировать самый короткий почтовый адрес @i.ua
http://mail.i.ua/reg - и получи 1Gb для хранения писем
_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.