No bin directory after make command [SOLVED]

OS: Ubuntu 20.04
Tried to follow build documentation to build main branch, a few issues occurred:

  • GCC version installed was 9.4.0. Add new package repo to get GCC 11.
  • GCC 11 not recognized by make, used update-alternatives to attempt to force correct GCC version
obelisk@Obelisk:~/blender-git/blender$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
update-alternatives: using /usr/bin/gcc-11 to provide /usr/bin/gcc (gcc) in auto mode
obelisk@Obelisk:~/blender-git/blender$ gcc --version
gcc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Did not work. Deviated from build instructions and used make with this command

obelisk@Obelisk:~/blender-git/blender$ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error at CMakeLists.txt:13 (message):
  CMake generation for blender is not allowed within the source directory!

   Remove "/home/obelisk/blender-git/blender/CMakeCache.txt" and try again from another folder, e.g.:
   
   rm -rf CMakeCache.txt CMakeFiles
   cd ..
   mkdir cmake-make
   cd cmake-make
   cmake ../blender
   
   Alternately define WITH_IN_SOURCE_BUILD to force this option (not recommended!)


-- Configuring incomplete, errors occurred!

Followed error instructions. Build completed, blender-git/build_linux/bin directory not created
Raw Console from pastebin. EDIT: Pastebin nuked my paste. see follow up comment for raw console
Edit 2: NVM,i also broke forum rules, if someone needs it, i can just send them the txt file

Note, I am new to linux.

For building with a different GCC version I usually replace the make command with:

CXX=/usr/bin/g++-11 CC=/usr/bin/gcc-11 make

This way you can follow the quick setup instructions as usual.

If you still wanted to do manual CMake setup, there are instructions here (click to expand).
https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu#Manual_CMake_Setup

That lead me down the right path!

using a custom cmake operation with your arguments got the build started, so fingers crossed that everything completes

CXX=/usr/bin/g++-11 CC=/usr/bin/gcc-11 cmake ../blender

Build eventually ended up working. Leaving this here in hopes that someone else in the future doing the same thing doesn’t end up as confused as I was:

Ubuntu 20.04 repo stops at gcc-10, so i need a new repository to get gcc

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt upgrade

That got me gcc-11. In order to use gcc-11 i hade to use the custom cmake command like so:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

afterwards, the normal install steps worked.