I have the same scanner and got it working without the drivers from the Canon website or compiling any software myself.
Ubuntu and other Linux distributions use SANE as a back-end to communicate with scanners. Ubuntu 18.04 has an older version of SANE that does not support the CanoScan LiDE 400 yet, but you can use a repository created by Rolf Bensch to easily install the latest release which does support that scanner:
sudo add-apt-repository ppa:rolfbensch/sane-release sudo apt-get update sudo apt-get upgrade
It should update the existing SANE version. After a quick reboot the
Simple Scan program that comes with Ubuntu was able to use the scanner. I
gscan2pdf to create PDF documents from the scanner.