[Mesa-users] Cross-compiling on IBM Blue Gene/P

J. P. Bernstein astro at anl.gov
Thu Mar 8 08:58:37 PST 2012


Thanks for the tip, Daniel. That got me further down the line.

The 7.10.3 build ultimately fails with::

mklib: Making Linux static library:  libmesa.a
ar: creating libmesa.a
mpixlc_r -c -o state_tracker/st_atom.o state_tracker/st_atom.c   -I../../include -I../../src/glsl -I../../src/mesa -I../../src/mapi -I../../src/gallium/include -I../../src/gallium/auxiliary  -g -O2 -DIBM -DNOUNDERSCORE -c -qarch=450d -qtune=450
"../../src/gallium/include/pipe/p_compiler.h", line 228.2: 1506-205 (S) #error "Unsupported compiler"
"../../src/gallium/include/pipe/p_compiler.h", line 245.2: 1506-948 (W) #warning "Unsupported compiler"
make[3]: *** [state_tracker/st_atom.o] Error 1
make[3]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.10.3/src/mesa'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.10.3/src'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.10.3'
make: *** [bluegenep-xlc-osmesa] Error 2
116.658u 31.798s 2:30.94 98.3%	0+0k 0+103552io 0pf+0w

Did you see that one? Any advice, Brian? Is there a fix for that in later versions of Mesa that is compatible with 7.10.3?

Looks like the error and warning are coming from this part f the code:

--------------------
#if (__GNUC__ > 4 || (__GNUC__ == 4 &&__GNUC_MINOR__>1)) && !defined(PIPE_ARCH_X86_64)
#define PIPE_ALIGN_STACK __attribute__((force_align_arg_pointer))
#else
#define PIPE_ALIGN_STACK
#endif

#elif defined(_MSC_VER)

/* See http://msdn.microsoft.com/en-us/library/83ythb65.aspx */
#define PIPE_ALIGN_TYPE(_alignment, _type) __declspec(align(_alignment)) _type
#define PIPE_ALIGN_VAR(_alignment) __declspec(align(_alignment))

#define PIPE_ALIGN_STACK

#elif defined(SWIG)

#define PIPE_ALIGN_TYPE(_alignment, _type) _type
#define PIPE_ALIGN_VAR(_alignment)

#define PIPE_ALIGN_STACK

#else

#error "Unsupported compiler"

#endif


#if defined(__GNUC__)

#define PIPE_READ_WRITE_BARRIER() __asm__("":::"memory")

#elif defined(_MSC_VER)

void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
#define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier()

#else

#warning "Unsupported compiler"
#define PIPE_READ_WRITE_BARRIER() /* */

#endif
--------------------

Best,

Joe

On Mar 7, 2012, at 10:37 PM, Daniel Fuster wrote:

> Hello Joe
> 
> Afer introducing the correction Brian suggested, I managed to compile osmesa libraries (vers 7.10.3) in a IBM Blue Gene/P
> 
> Maybe you could try this version and see if that works for you
> 
> best
> Daniel
> 
> 2012/2/27 J. P. Bernstein <astro at anl.gov>
> OK, found the PYTHON2 variable. Set that to python2.6. That seems to have moved past the syntax error. Now I get:
> 
> Regenerating builtin_function.cpp...
> /usr/bin/python2.6 -t -O -O builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
> Traceback (most recent call last):
>  File "builtins/tools/generate_builtins.py", line 192, in <module>
>    write_profiles()
>  File "builtins/tools/generate_builtins.py", line 103, in write_profiles
>    write_profile(filename, profile)
>  File "builtins/tools/generate_builtins.py", line 75, in write_profile
>    (proto_ir, returncode) = run_compiler([filename])
>  File "builtins/tools/generate_builtins.py", line 62, in run_compiler
>    p = Popen(command, 1, stdout=PIPE, shell=False)
>  File "/usr/lib64/python2.6/subprocess.py", line 633, in __init__
>    errread, errwrite)
>  File "/usr/lib64/python2.6/subprocess.py", line 1139, in _execute_child
>    raise child_exception
> OSError: [Errno 2] No such file or directory
> mpixlcxx_r  -c -I. -I../mesa -I../mapi -I../../include  -g -O2 -DIBM -DNOUNDERSCORE -c -qarch=450 -qtune=auto -qcache=auto -qmaxmem=16384 -D_FILE_OFFSET_BITS=64   builtin_function.cpp -o builtin_function.o
> bgxlC_r: 1501-228 (W) input file builtin_function.cpp not found
> 
> On Feb 27, 2012, at 2:15 PM, J. P. Bernstein wrote:
> 
> > That helped in that the mesa build is now trying to make the glsl lib. Now I get the built-in failure that I sent before when I tried the manual glsl make:
> >
> > python -t -O -O builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
> >  File "builtins/tools/generate_builtins.py", line 28
> >    with open(filename) as f:
> >            ^
> > SyntaxError: invalid syntax
> > mpixlcxx_r  -c -I. -I../mesa -I../mapi -I../../include  -g -O2 -DIBM -DNOUNDERSCORE -c -qarch=450 -qtune=auto -qcache=auto -qmaxmem=16384 -D_FILE_OFFSET_BITS=64   builtin_function.cpp -o builtin_function.o
> > bgxlC_r: 1501-228 (W) input file builtin_function.cpp not found
> > make[3]: *** [builtin_function.o] Error 252
> > make[3]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2/src/glsl'
> > make[2]: *** [subdirs] Error 1
> > make[2]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2/src'
> > make[1]: *** [default] Error 1
> > make[1]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2'
> > make: *** [bluegenep-xlc-osmesa] Error 2
> >
> > I suspect this is because python2.4 is being used, but have not been able to figure out how to tell the build to use the non-default python2.6. How does one do that?
> >
> > Best,
> >
> > Joe
> >
> > P.S. The autoconf fails due to:
> >
> > checking for GLPROTO... no
> > configure: error: Package requirements (glproto >= 1.4.11) were not met:
> >
> > No package 'glproto' found
> >
> > Consider adjusting the PKG_CONFIG_PATH environment variable if you
> > installed software in a non-standard prefix.
> >
> > Alternatively, you may set the environment variables GLPROTO_CFLAGS
> > and GLPROTO_LIBS to avoid the need to call pkg-config.
> > See the pkg-config man page for more details.
> >
> > Have yet to dig into that.
> >
> >
> > On Feb 27, 2012, at 2:03 PM, Brian Paul wrote:
> >
> >> Try editing configs/bluegene-xlc-osmesa and change this line:
> >>
> >> SRC_DIRS = mesa glu
> >>
> >> to read:
> >>
> >> SRC_DIRS = glsl mapi/glapi mesa glu
> >>
> >> Note that the static configuration files in the configs/ directory will probably be going away in the future.  The bluegen configs haven't been touched in years.  You might also try building with autoconf (i.e. "./configure ; make") but specifying your compiler, etc.
> >>
> >> -Brian
> >>
> >> On 02/27/2012 12:58 PM, J. P. Bernstein wrote:
> >>> Hello Brian,
> >>>
> >>> The library you referenced does not exist. I thought I was build as part of the mesa build. Is that not correct? In any case, I tried a manual make in src/glsl/ and got the following error:
> >>>
> >>> python -t -O -O builtins/tools/generate_builtins.py ./builtin_compiler>  builtin_function.cpp || rm -f builtin_function.cpp
> >>>  File "builtins/tools/generate_builtins.py", line 28
> >>>    with open(filename) as f:
> >>>            ^
> >>> SyntaxError: invalid syntax
> >>> mpixlcxx_r  -c -I. -I../mesa -I../mapi -I../../include  -g -O2 -DIBM -DNOUNDERSCORE -c -qarch=450 -qtune=auto -qcache=auto -qmaxmem=16384 -D_FILE_OFFSET_BITS=64   builtin_function.cpp -o builtin_function.o
> >>> bgxlC_r: 1501-228 (W) input file builtin_function.cpp not found
> >>> make: *** [builtin_function.o] Error 252
> >>> On Feb 27, 2012, at 1:40 PM, Brian Paul wrote:
> >>>
> >>> Might that be due to the fact that the default python on my system is 2.4 and the tool above needs 2.6? If so, can you please tell me how to set the version of python used? Can't seem to find it.
> >>>
> >>> Best,
> >>>
> >>> Joe
> >>>
> >>>
> >>>> On 02/23/2012 03:12 PM, J. P. Bernstein wrote:
> >>>>> Greetings,
> >>>>>
> >>>>> I am trying to cross-compile mesa for the compute nodes on a IBM Blue Gene/P. I got around a build failure in querymatrix.c by commenting out the fpclassify code. The build is now failing as follows:
> >>>>>
> >>>>> mpixlcxx_r  -c -o program/sampler.o program/sampler.cpp   -I../../include -I../../src/glsl -I../../src/mesa -I../../src/mapi -I../../src/gallium/include -I../../src/gallium/auxiliary  -g -O2 -DIBM -DNOUNDERSCORE -c -qarch=450 -qtune=auto -qcache=auto -qmaxmem=16384 -D_FILE_OFFSET_BITS=64
> >>>>> make[3]: *** No rule to make target `../../src/glsl/libglsl.a', needed by `libmesa.a'.  Stop.
> >>>>> make[3]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2/src/mesa'
> >>>>> make[2]: *** [subdirs] Error 1
> >>>>> make[2]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2/src'
> >>>>> make[1]: *** [default] Error 1
> >>>>> make[1]: Leaving directory `/gpfs/home/jpbernst/Code/Mesa-7.11.2'
> >>>>> make: *** [bluegenep-xlc-osmesa] Error 2
> >>>>> 222.520u 60.959s 4:53.06 96.7%    0+0k 40+307416io 0pf+0w
> >>>>>
> >>>>> My config is file is attached (it is based on the Blue Gene/L config file named bluegene-xlc-osmesa that came with the src; I just updated the compiler and flags). I added glsl to SRC_DIRS in an attempt to solve the error above to no avail. My other attempts at a fix failed as well. Any help would be much appreciated.
> >>>>
> >>>> From the error, it looks like the glsl compiler didn't get built. Can you check if src/glsl/libglsl.a exists or not?
> >>>>
> >>>> If not, were there errors earlier when the glsl compiler was being built?
> >>>>
> >>>> -Brian
> >>>
> >>
> >
> > _______________________________________________
> > mesa-users mailing list
> > mesa-users at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-users
> 
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-users
> 
> 
> 
> -- 
> www.danielfuster.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20120308/3154d1cf/attachment-0001.htm>


More information about the mesa-users mailing list