Bug 94805

Summary: Compile Mesa , specific compilation , error: LLVM is required to build Gallium
Product: Mesa Reporter: tele <swojskichlopak>
Component: OtherAssignee: mesa-dev
Status: RESOLVED INVALID QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 11.1   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description tele 2016-04-03 09:21:14 UTC
I'm trying build package 32 bit on 64 bit system,
   and  I have error

#---------------------------------
checking for RADEON... yes
configure: error: LLVM is required to build Gallium R300 on x86 and x86_64
#---------------------------------

I used cor compile :
#----------------------------------------
export LDFLAGS="-L/usr/local/lib/"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure	 --disable-static \
  CC="gcc -m32" CXX="g++ -m32" \
  --build=x86_64-pc-linux-gnu \
  --host=i686-pc-linux-gnu \
  --disable-wayland \
  --with-llvm-prefix=/usr/local/bin
#----------------------------------------

This is my path for llvm *.cmake files    /usr/local/share/llvm/cmake/
This my path for llvm *.h files    /usr/local/include/llvm/
Comment 1 Kenneth Graunke 2016-04-04 06:15:01 UTC
Building a 32-bit version of Mesa requires a 32-bit version of LLVM.  It sounds like you only have the 64-bit version installed.

Alternatively, you can use --disable-gallium-llvm and both --with-gallium-drivers and --with-dri-drivers to specify which drivers you want to build.  If you don't actually need radeon or llvmpipe, then you don't need LLVM.

If you need help, you might try asking on IRC.
Comment 2 tele 2016-04-04 15:39:21 UTC
I build LLVM like this:

#--------------------------------
mkdir build
cd build

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export CC="gcc -m32"
export CXX="g++ -m32"

cmake ..     \
 -DLLVM_BUILD_32_BITS:BOOLEAN=ON \
 -DBUILD_SHARED_LIBS:BOOL=ON

make
#--------------------------------

#---------------------
$ ls /usr/local/bin/
avcenc*           llvm-cov*        llvm-mcmarkup*    loadjpeg*
bugpoint*         llvm-c-test*     llvm-nm*          mpeg2vaenc*
c_rehash*         llvm-cxxdump*    llvm-objdump*     mpeg2vldemo*
h264encode*       llvm-diff*       llvm-pdbdump*     obj2yaml*
jpegenc*          llvm-dis*        llvm-profdata*    openssl*
libtool*          llvm-dsymutil*   llvm-ranlib@      opt*
libtoolize*       llvm-dwarfdump*  llvm-readobj*     putsurface*
llc*              llvm-dwp*        llvm-rtdyld*      sancov*
lli*              llvm-extract*    llvm-size*        vainfo*
llvm-ar*          llvm-lib@        llvm-split*       verify-uselistorder*
llvm-as*          llvm-link*       llvm-stress*      xmlwf*
llvm-bcanalyzer*  llvm-lto*        llvm-symbolizer*  yaml2obj*
llvm-config*      llvm-mc*         llvm-tblgen*
#---------------------

#---------------------------------------------------
$ objdump -p /usr/local/bin/llvm-config | grep format
/usr/local/bin/llvm-config:     file format elf32-i386
#---------------------------------------------------
Comment 3 tele 2016-04-09 16:38:55 UTC
I Re Open, because I need all drivers,
   so I need find way how compile LLVM for Mesa.
Comment 4 Pierre Moreau 2016-04-09 16:49:15 UTC
In your command line for building Mesa, you should change `--with-llvm-prefix=/usr/local/bin` to `--with-llvm-prefix=/usr/local` as it changes where the *root* folder of your llvm installation is, not the folder where it will find the llvm binaries.
Comment 5 tele 2016-04-09 17:20:58 UTC
It working !
  Thanks Pierre !  :D

Problem   SOLVED

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.