(Almost) Static build script for Bear - ʕ·ᴥ·ʔ Build EAR with both 32-bit and 64-bit support
Bear is an excellent tool for collecting compiler flags and information and producing helpful information for IDE to provide suggestions. I faced a problem when cross-compiling programs on other platforms using a 32-bit compiler, which will need a 32-bit version of the shared library in Bear, thus creating the script to generate it.
The build is not static linking glibc, and they still need basic glibc library >=2.31 to work. According to Repology, common & possibly working distributions are:
- Ubuntu 20.04+
- Debian 11+
- Fedora 32+
- OpenSUSE 15.3+
Pre-built binaries are on the Release page, and the version maps to the Bear version.
- Clone the repo
- Build the docker image with
Dockerfile
:sudo docker build -t nagi1999a/calmbear .
- Start the container:
sudo docker run -it -v ./:/docker
- Inside the container, run the build script:
bash build.sh
- After building, built files will be in
output
folder, and you can close the container now:exit
- Install 32-bit
libc
andlibstdc++
and copy all files inoutput
folder to the desired path.- For Debian-based distribution, just run
sudo bash debian-install.sh
. - For other distributions, manually put the libraries and executables will be needed.
- For Debian-based distribution, just run