You are not logged in.

#1 2012-07-20 05:08:41

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Compiling error mesa-full-inteli915g

Currently, I'm a bit of a gamer bogged down by the setback of being stuck with an old intel 965 GMA for the foreseeable future, so I'm currently in the process of configuring my system to squeeze every lick of performance out of this underpowered chip that I can. I've already done many of the adjustments outlined in the Intel wiki page and the graphics portion of the Maximizing Performance wiki page. In the process of my research on optimizing intel chipset performance, I encountered this thread which indicated I might get a 3d performance increase from using the Gallium mesa library in the AUR. Although there were some who experienced the opposite, the reported results were compelling enough for me to give it a try. My attempt to compile resulted in a build error.

I don't know a lot about compiling software from source (the AUR packages do a pretty good job of automating all of this), so I don't know if the problem is with my machine, the source, or the build flags I'm using. I'm building for a core 2 duo processor (T7250) with my OS built on i686 architecture using the following build flags:

CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
MAKEFLAGS="-j2"

I tried building the package both with and without the -pipe CXX/C flag, but both times received the following error output:

gbm.c: In function 'gallium_screen_create':
gbm.c:54:4: error: implicit declaration of function 'pipe_loader_drm_probe_fd' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [gbm.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc -c -o pipe_swrast.o pipe_swrast.c -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_GALAHAD -I../../../../include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/include -I../../../../src/gallium/winsys -I/usr/include/libdrm   -DGALLIUM_LLVMPIPE -march=i686 -mtune=generic -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -march=i686 -mtune=generic -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2  -fPIC  -D_GNU_SOURCE -DPTHREADS -DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XEXTPROTO_71 -DHAVE_LLVM=0x0301 -fvisibility=hidden
/bin/sh ../../../../bin/mklib -o pipe_i915.so -noprefix -linker 'g++' \
        -ldflags '-L../../../../lib -Wl,--no-undefined -L/usr/lib/llvm  -lpthread -lffi -ldl -lm  -Wl,-O1,--sort-common,--as-needed,-z,relro' \
         pipe_i915.o \
        -Wl,--start-group ../../../../src/gallium/drivers/identity/libidentity.a ../../../../src/gallium/drivers/galahad/libgalahad.a ../../../../src/gallium/drivers/trace/libtrace.a ../../../../src/gallium/drivers/rbug/librbug.a ../../../../src/gallium/auxiliary/libgallium.a ../../../../src/gallium/winsys/i915/drm/libi915drm.a ../../../../src/gallium/drivers/i915/libi915.a -Wl,--end-group \
        -ldrm   -lm -lpthread -ldl -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86Disassembler -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -ldrm_intel
mklib: Making Linux shared library:  pipe_i915.so
/bin/sh ../../../../bin/mklib -o pipe_swrast.so -noprefix -linker 'g++' \
        -ldflags '-L../../../../lib -Wl,--no-undefined -L/usr/lib/llvm  -lpthread -lffi -ldl -lm  -Wl,-O1,--sort-common,--as-needed,-z,relro' \
         pipe_swrast.o \
        -Wl,--start-group ../../../../src/gallium/drivers/identity/libidentity.a ../../../../src/gallium/drivers/galahad/libgalahad.a ../../../../src/gallium/drivers/trace/libtrace.a ../../../../src/gallium/drivers/rbug/librbug.a ../../../../src/gallium/auxiliary/libgallium.a ../../../../src/gallium/drivers/llvmpipe/libllvmpipe.a -Wl,--end-group \
        -ldrm   -lm -lpthread -ldl -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86Disassembler -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport 
mklib: Making Linux shared library:  pipe_swrast.so
make[4]: Leaving directory `/home/james-arch/builds/mesa-full-i915g/src/mesa-build/src/gallium/targets/pipe-loader'
make[3]: Leaving directory `/home/james-arch/builds/mesa-full-i915g/src/mesa-build/src/gallium/targets/gbm'
make[2]: *** [default] Error 1
make[2]: Leaving directory `/home/james-arch/builds/mesa-full-i915g/src/mesa-build/src/gallium/targets'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/james-arch/builds/mesa-full-i915g/src/mesa-build/src'
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build()

If anyone can help me with this error, or knows of a better way to build the mesa library with gallium support, your help would be greatly apppreciated!

Offline

#2 2012-07-20 10:55:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Compiling error mesa-full-inteli915g

I've adapted the code for my mesa-r600g-git package (that builds fine for r600/r300 ) to build i915 gallium and get the same error.

That strongly suggests the error is in the upstream intel-gallium code.

I suggest you search the mesa bugtracker, https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa

Also don't forget to post something about this in the aur comments.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2012-07-22 12:43:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Compiling error mesa-full-inteli915g

That error means the function was used without a prototype - generally meaning a header file is missing.

In this case the appropriate header file is included, but that header (/mesa-build/src/gallium/auxiliary/pipe-loader/pipe_loader.h) has the definition for that function in a conditional compile block

#ifdef HAVE_PIPE_LOADER_DRM
...

Aside from waiting for it to be fixed upstream, there are three possible solutions:
1) Remove that preprocessor condition (the #ifdef and the associated #endif) - probably not a great solution
2) Add -DHAVE_PIPE_LOADER_DRM to the compilation options for that group
3) Add a similar conditional preprocessor block around the function that is causing the error.

Without knowing more about what piper-loader-drm is, it's hard to say which is best.  If you know what this is and you have/want it, then option 2 should work like a charm, option 1 would have the same effect, just in a more 'hackish' way and with possible side-effects.  If you know what this pipe loader is and you know you don't want/have it, then option three would be advised, though I don't know just how much of that file should be included in the conditional block, or whether other elements are missing a similar conditional.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-07-27 21:14:28

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Re: Compiling error mesa-full-inteli915g

Trilby wrote:

That error means the function was used without a prototype - generally meaning a header file is missing.

In this case the appropriate header file is included, but that header (/mesa-build/src/gallium/auxiliary/pipe-loader/pipe_loader.h) has the definition for that function in a conditional compile block

#ifdef HAVE_PIPE_LOADER_DRM
...

Aside from waiting for it to be fixed upstream, there are three possible solutions:
1) Remove that preprocessor condition (the #ifdef and the associated #endif) - probably not a great solution
2) Add -DHAVE_PIPE_LOADER_DRM to the compilation options for that group
3) Add a similar conditional preprocessor block around the function that is causing the error.

Without knowing more about what piper-loader-drm is, it's hard to say which is best.  If you know what this is and you have/want it, then option 2 should work like a charm, option 1 would have the same effect, just in a more 'hackish' way and with possible side-effects.  If you know what this pipe loader is and you know you don't want/have it, then option three would be advised, though I don't know just how much of that file should be included in the conditional block, or whether other elements are missing a similar conditional.

I found the header file you referred to, and found the compile block you were referring to... but I was windering where I can find the compilation options for the group, so I can add this option and try to recompile. Thanks for your help!

Offline

#5 2012-07-29 09:50:13

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Compiling error mesa-full-inteli915g

Trilby wrote:

Aside from waiting for it to be fixed upstream, there are three possible solutions:

Is upstream aware of the problem? I didn't see anything in the bugtracker.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#6 2012-07-29 11:45:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Compiling error mesa-full-inteli915g

I have no idea if this has been reported upstream.  I don't use this package - I hardly know what it is.  I'm just looking at compilation errors.  I'll leave it to those who want this to work to file the bug reports.

OakRaider, to enable that option you can modify the PKGBUILD by editting one line and adding two new ones as seen in this excerpt

   --enable-gbm \
   --enable-gallium-gbm \
   --enable-gallium-g3dvl \
   --enable-gallium-loader \
   --enable-gallium-drm-loader || return 1


   make || return 1
   make DESTDIR="${pkgdir}" install || return 1

The gallium-loader and gallium-drm-loader lines were added.

Edit: Again, I have no idea what these options do, and I don't know if they'd conflict with other selected options.  But they will 'fix' the compilation error above.  Others may surface though.

Last edited by Trilby (2012-07-29 11:47:22)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2012-08-01 07:34:13

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Compiling error mesa-full-inteli915g


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

Board footer

Powered by FluxBB