On 13.09.2016 21:27, Romain Failliot wrote:
Thanks a lot! I'll try that tonight!

I have a 64-bit distrib, I don't think so but do I need to compile the 32-bit
version of llvm as well (is it because Steam is using 32-bit libraries?).

Yes, you likely need both 64-bit and 32-bit LLVM and Mesa. 32-bit libraries are needed for Steam itself but some games launched from Steam seem to use 64-bit ones.

For this reason, I am now actually building both 64-bit and 32-bit versions for our Linux distro, ROSA.

I do not know whether it is possible to get away with only 64-bit versions somehow.

By the way, many thanks to Marek Olšák for the build instructions!

Regards,
Evgenii


2016-09-13 13:53 GMT-04:00 Marek Olšák <mar...@gmail.com>:
LLVM 64-bit:

mkdir -p build
cd build
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/x86_64-linux-gnu
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=O
                   -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \
                   -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG
-fno-omit-frame-pointer" \
                   -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG
-fno-omit-frame-pointer".
ninja
sudo ninja install


LLVM 32-bit:

mkdir -p build32
cd build32
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/llvm/i386-linux-gnu
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON
                   -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \
                   -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG
-fno-omit-frame-pointer" \
                   -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG
-fno-omit-frame-pointer" \
                   -DLLVM_BUILD_32_BITS=ON
ninja
sudo ninja install
# then add /usr/llvm/x86_64-linux-gnu and /usr/llvm/i386-linux-gnu to
ld.conf


Mesa configure helper script, it will overwrite the /usr/lib/ files on
Ubuntu (run as-is for 64-bit, or use "-32" for 32-bit):

if test x$1 = x-32; then
     dir=i386-linux-gnu
     build=i686-linux-gnu
     export CFLAGS="-m32 -O2 -g"
     export CXXFLAGS="$CFLAGS"
     export LDFLAGS="-L/usr/lib/$dir"
     export PKG_CONFIG_PATH="/usr/lib/$dir/pkgconfig"
else
     dir=x86_64-linux-gnu
     build=$dir
fi

./autogen.sh \
  --build=$build --prefix=/usr --libdir=/usr/lib/$dir
--with-llvm-prefix=/usr/llvm/$dir \
  --enable-glx-tls --enable-texture-float --enable-debug --enable-vdpau \
  --disable-xvmc --disable-va --enable-nine --with-sha1=libnettle \
  --with-gallium-drivers=radeonsi,r600,swrast --with-dri-drivers= \
  --with-egl-platforms=x11,drm --enable-gles1 --enable-gles2

make -j4
sudo make install

You'll probably want to delete /usr/lib/$dir/*mesa*/*. That's Ubuntu's
invention that will prevent you from using installed libGL and libEGL.

It's all kind of a mess, but I don't know of a better way.

Marek



On Tue, Sep 13, 2016 at 7:33 PM, Romain Failliot
<romain.faill...@foolstep.com> wrote:
2016-09-13 12:41 GMT-04:00 Marek Olšák <mar...@gmail.com>:

BTW, If you update LLVM to a newer version, you also have to re-build
Mesa, because the LLVM version used by Mesa is determined while Mesa
is being built.

Also, the chance to rage-quit while building LLVM+Mesa is pretty high
if you've never done it before.

I see, is there a tutorial somewhere maybe on how to do that?
I know how to compile projects, that's not a problem. It's more about the
little details to make everything work once it's compiled.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to