mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-21 13:17:05 +00:00
Consolidate GCC 10 installation steps into single script format
This commit is contained in:
@@ -444,55 +444,36 @@ EOF
|
|||||||
|
|
||||||
#### Installation Steps
|
#### Installation Steps
|
||||||
|
|
||||||
1. **Update and Install Prerequisites:**
|
**Complete installation script:**
|
||||||
```bash
|
```bash
|
||||||
|
# Install prerequisites
|
||||||
dnf -y install wget unzip lbzip2
|
dnf -y install wget unzip lbzip2
|
||||||
dnf -y groupinstall "Development Tools"
|
dnf -y groupinstall "Development Tools"
|
||||||
```
|
|
||||||
|
|
||||||
2. **Download GCC 10 Source Code:**
|
# Download and extract GCC 10 source
|
||||||
```bash
|
|
||||||
cd /usr/local/src
|
cd /usr/local/src
|
||||||
wget https://github.com/gcc-mirror/gcc/archive/refs/heads/releases/gcc-10.zip
|
wget https://github.com/gcc-mirror/gcc/archive/refs/heads/releases/gcc-10.zip
|
||||||
```
|
|
||||||
|
|
||||||
3. **Extract Source Code:**
|
|
||||||
```bash
|
|
||||||
unzip gcc-10.zip
|
unzip gcc-10.zip
|
||||||
cd gcc-releases-gcc-10
|
cd gcc-releases-gcc-10
|
||||||
```
|
|
||||||
|
|
||||||
4. **Download Prerequisites:**
|
# Download GCC prerequisites (GMP, MPFR, MPC, ISL)
|
||||||
```bash
|
|
||||||
contrib/download_prerequisites
|
contrib/download_prerequisites
|
||||||
```
|
|
||||||
|
|
||||||
5. **Create Installation Directory:**
|
# Create build directory and configure
|
||||||
```bash
|
|
||||||
mkdir /usr/local/gcc-10
|
mkdir /usr/local/gcc-10
|
||||||
```
|
|
||||||
|
|
||||||
6. **Configure GCC Build:**
|
|
||||||
```bash
|
|
||||||
cd /usr/local/gcc-10
|
cd /usr/local/gcc-10
|
||||||
/usr/local/src/gcc-releases-gcc-10/configure --disable-multilib
|
/usr/local/src/gcc-releases-gcc-10/configure --disable-multilib
|
||||||
```
|
|
||||||
|
|
||||||
7. **Compile GCC:**
|
# Compile and install (1-2 hours depending on CPU)
|
||||||
```bash
|
|
||||||
make -j $(nproc)
|
make -j $(nproc)
|
||||||
```
|
|
||||||
|
|
||||||
> **Estimated time**: 1-2 hours depending on CPU performance
|
|
||||||
|
|
||||||
8. **Install GCC:**
|
|
||||||
```bash
|
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
9. **Post-Install Configuration:**
|
> **Note**: The compilation step `make -j $(nproc)` will take 1-2 hours depending on your CPU performance. The `$(nproc)` command uses all available CPU cores to speed up compilation.
|
||||||
|
|
||||||
|
**Post-Install Configuration:**
|
||||||
```bash
|
```bash
|
||||||
# Create environment script
|
# Create environment script for library paths
|
||||||
cat > /etc/profile.d/gcc-10.sh << 'EOF'
|
cat > /etc/profile.d/gcc-10.sh << 'EOF'
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# gcc-10.sh - GCC 10 library path configuration
|
# gcc-10.sh - GCC 10 library path configuration
|
||||||
@@ -504,7 +485,7 @@ EOF
|
|||||||
ldconfig
|
ldconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
10. **Verify Installation:**
|
**Verify Installation:**
|
||||||
```bash
|
```bash
|
||||||
/usr/local/bin/gcc --version
|
/usr/local/bin/gcc --version
|
||||||
# Should output: gcc (GCC) 10.x.x
|
# Should output: gcc (GCC) 10.x.x
|
||||||
|
|||||||
Reference in New Issue
Block a user