british-choi / EmuELEC

EmuELEC의 한글판 patch 작업실
36 stars 10 forks source link

Ubuntu 18.04에서 compile error 발생. #27

Open british-choi opened 1 year ago

british-choi commented 1 year ago

우분투 18.04에는 GCC 7.5.0이 기본 compiler임. cmake를 build하기 위해서는 GCC 10 버전이 필요함.

GCC10을 추가설치하고 필요에 따라 7과 10을 switching 해서 써야함. EmuELEC은 GCC10으로 넘어가는 것 같음.

Build compiler 버전 확인하기 (10이 아니라면 10설치하고 기본 compiler로 지정 필요함) g++ --version

컴파일러 설치를 위해 아래 지침을 따를것. sudo apt install build-essential

GCC new version은 기본 repository에서 지원하지 않으므로 repository 추가하고 설치 필요함.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt install g++-10

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

아래 명령으로 GCC 버전을 선택할 수 있음. (EmuELEC build에는 GCC 10을 사용할 것) update-alternatives --config g++

hehaaa-eee commented 9 months ago

make[1]: Leaving directory '/home/ddd/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/qemu-7.2.0/.x86_64-linux-gnu' FAILURE: scripts/build qemu:host during make_host (default) FAILED COMMAND make ${PKG_MAKE_OPTS_HOST}


FAILURE: scripts/build qemu:host has failed!

The following log for this failure is available: /home/ddd/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/.threads/logs/90.log

qemu:host seq 90 >>> [087/635] [FAIL] build qemu:host

The following log for this failure is available: /home/ddd/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/.threads/logs/90.log

우분투에서 빌드중인데 이런 에러가 emuelec 브랜치에서도 뜨고 여기에서도 똑같이 뜨네요 ㅠ.ㅠ. 어떻게 해결해야 할까요?

british-choi commented 9 months ago

제 환경은 18.04에서 Build하고 g++ 10을 사용하고 있습니다. branch는 dev를 사용하구요.. 제 repository에 emuelec branch가 있나요? 20.04나 22.04로 시도해 보세요. 현재 20.04가 공식 build 환경인 것 같은데.. OS한번 바꾸려면.. 일이 많아서 아직 18.04로 유지하고 있습니다.

hehaaa-eee commented 9 months ago

혹시 오류뜨는지 시험해주실수 있나요? 윈도우 wsl에서 우분투깔고 g++ 10 변경해서 도 한번 해봤는데 계속 FAILURE: scripts/build qemu:host has failed! 이렇게 떠서 ㅠ.ㅠ.

british-choi commented 9 months ago

Linux를 별도의 computer에 설치하시길 바랍니다. 가상환경에서 build가 정상적이지 않습니다. 저의 환경(18.04)에서는 정상 Build 됩니다.

hehaaa-eee commented 9 months ago

아 그렇군요 감사합니다. 일단 정상 build 되는거면 리눅스를 깔아야 겠군요 으헉..