Repository navigation
GNU C Library (glibc) 2.36
GNU C Library (glibc) 2.36 builds for x86_64 and aarch64 architectures.
Built from source with the following configuration:
- Libraries: Both static (.a) and shared (.so) libraries included
- Architectures: x86_64 (native), aarch64 (native ARM64)
- Features: Full glibc functionality with static linking support
- Type: Native compilation on respective architectures
- Optimization: Optimized build without debug symbols for reduced size
- Compatibility: Supports kernel 3.2+ (covers all modern Linux distributions)
What is glibc?
The GNU C Library (glibc) is the standard C library for GNU/Linux systems. It provides:
- Core C runtime functions (malloc, printf, etc.)
- POSIX system call wrappers
- Thread support (pthreads)
- Mathematical functions (libm)
- Network and socket functions
- Locale and internationalization support
Libraries Included
Core Libraries:
libc.a/libc.so- Main C library with standard functionslibm.a/libm.so- Mathematical functions (sin, cos, log, etc.)libpthread.a/libpthread.so- POSIX threads supportlibdl.a/libdl.so- Dynamic loading supportlibrt.a/librt.so- Real-time extensionslibutil.a/libutil.so- System utility functions
Additional Libraries:
libresolv.a/libresolv.so- DNS resolver functionslibnss_*.a/libnss_*.so- Name Service Switch moduleslibcrypt.a/libcrypt.so- Password encryption functionslibanl.a/libanl.so- Asynchronous name lookup
Use Cases
Static Linking:
Use the static libraries (.a files) to create fully self-contained binaries:
gcc -static -L/path/to/glibc/lib program.c -o programCustom Runtime Environment:
Use as a complete libc replacement in containers or embedded systems:
export LD_LIBRARY_PATH=/path/to/glibc/lib:$LD_LIBRARY_PATHCross-Compilation Sysroot:
Use as a sysroot for cross-compilation environments.
Files
glibc-2.36-x86_64.tar.gz: glibc build for x86_64 architectureglibc-2.36-aarch64.tar.gz: glibc build for aarch64 architecture
Installation
Extract the appropriate archive:
tar -xzf glibc-2.36-<arch>.tar.gzUsage Examples
Static Linking:
# Extract glibc
tar -xzf glibc-2.36-x86_64.tar.gz
# Compile with static glibc
gcc -static -L$PWD/glibc-2.36-x86_64/lib program.c -o programDynamic Linking:
# Set up environment
export LD_LIBRARY_PATH=$PWD/glibc-2.36-x86_64/lib:$LD_LIBRARY_PATH
# Compile and run
gcc program.c -o program
./programIntegration with Other Builds:
This glibc can be used with the GCC, binutils, and other tool builds from this repository:
# Extract all tools
tar -xzf glibc-2.36-<arch>.tar.gz
tar -xzf gcc-<version>-<arch>.tar.gz
tar -xzf binutils-<version>-<arch>.tar.gz
# Set up complete toolchain
export PATH=$PWD/gcc-<version>-<arch>/bin:$PWD/binutils-<version>-<arch>/bin:$PATH
export LD_LIBRARY_PATH=$PWD/glibc-2.36-<arch>/lib:$LD_LIBRARY_PATH
# For static linking
gcc -static -L$PWD/glibc-2.36-<arch>/lib program.c -o programCompatibility Notes
- glibc 2.41 (Default): Latest stable version with newest features and security fixes
- glibc 2.36: Stable LTS-style version, good balance of features and compatibility
- Ubuntu 22.04: Ships with glibc 2.35 (between our two versions)
- Forward Compatibility: Programs built with older glibc run on systems with newer glibc
- Backward Compatibility: Programs built with newer glibc may not run on systems with older glibc
- Kernel Requirements: Built with kernel 3.2+ support (covers all modern distributions)
Version Selection Guide:
- Use 2.41: For latest features, security fixes, and forward-looking builds
- Use 2.36: For maximum compatibility with existing systems and containers
Choose based on your target deployment environment and compatibility requirements.