> For the complete documentation index, see [llms.txt](https://docs-ksc.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-ksc.gitbook.io/blog/install/nurion/gcc-8.1.0-install.md).

# gcc v8.1.0 설치

GCC(GNU Compiler Collection)은 GNU 프로젝트의 일환으로 개발되어 널리 쓰이고 있는 컴파일러입니다.

* GCC 공식 홈페이지 : [https://gcc.gnu.org](https://gcc.gnu.org/)

이 문서에서는 gcc 8.1.0 버전을 컴파일 하여 설치 하는 방법에 대해 예시로 소개합니다.

## **가. 설치 환경**

| 구분                      | 내용                                      |
| ----------------------- | --------------------------------------- |
| 대상 시스템                  | 누리온                                     |
| OS Version              | 리눅스 / CentOS 7.9                        |
| CPU                     | <p>Intel Xeon Phi 7250                  |
| <br>Intel Xeon 6148</p> |                                         |
| 컴파일러                    | GCC 4.8.5 (CentOS 7.3 default compiler) |

## **나. 설치 전 환경 설정**

gcc-8.1.0 버전 설치에 필요한 gmp, mpfr, mpc는 누리온 시스템에 미리 설치된 /apps/common 라이브러리들을 사용합니다.\
만약 다른 버전의 gmp, mpfr, mpc 가 필요한 경우는 사용자의 홈 디렉토리(/home01/$USER)에 설치 후 환경설정을 해서 사용하면 됩니다.

\[ 환경 설정 ]

```shell-session
$ export LD_LIBRARY_PATH=/apps/common/gmp/6.1.2/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH=/apps/common/mpfr/4.0.1/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH=/apps/common/mpc/1.1.0/lib:$LD_LIBRARY_PATH
```

## **다. gcc-8.1.0 버전 설치 과정**

설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략합니다.

\[설치과정]

```shell-session
$ tar xvzf gcc-8.1.0.tar.gz
$ cd gcc-8.1.0
$ mkdir build
$ cd build
$ ../configure --prefix=${HOME}/applications/gcc/8.1.0 \
--with-mpc=/apps/common/mpc/1.1.0 \
--with-mpfr=/apps/common/mpfr/4.0.1 \
--with-gmp=/apps/common/gmp/6.1.2 \
--disable-multilib --enable-languages=c,c++,fortran
$ make
$ make install
```

<mark style="color:blue;">※ "--prefix=${HOME}/applications/gcc/8.1.0"는 예시로 설치 희망하는 디렉토리로 명시</mark>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-ksc.gitbook.io/blog/install/nurion/gcc-8.1.0-install.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
