Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 22.04 에서 빌드 #115

Open
sayzard opened this issue Apr 4, 2023 · 2 comments
Open

Ubuntu 22.04 에서 빌드 #115

sayzard opened this issue Apr 4, 2023 · 2 comments

Comments

@sayzard
Copy link

sayzard commented Apr 4, 2023

Ubuntu 22.04 에서 빌드해보려니 오류가 나서
issue에 올라온 내용들을 참고하여 다음과 같이 빌드하였습니다.

혹시나 필요하신 분이 있으실까 하여 남깁니다.

gcc-10, g++-10을 설치 안하신 경우

$ sudo apt install g++-10 gcc-10
$ 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
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11

빌드 전에 gcc-10, g++-10 으로 전환합니다.

$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/gcc-11   11        auto mode
* 1            /usr/bin/gcc-10   10        manual mode
  2            /usr/bin/gcc-11   11        manual mode
Press <enter> to keep the current choice[*], or type selection number:
$ sudo update-alternatives --config g++
There are 2 choices for the alternative g++ (providing /usr/bin/g++).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/g++-11   11        auto mode
* 1            /usr/bin/g++-10   10        manual mode
  2            /usr/bin/g++-11   11        manual mode

Press <enter> to keep the current choice[*], or type selection number:

clone하고 feature/101으로 switch합니다.

$ git clone https://github.com/kakao/khaiii.git
$ cd khaiii
$ git switch feature/101

이후 문서의 빌드과정을 진행합니다.

$ mkdir build
$ cd build
$ cmake ..

...
@danjclegg
Copy link

Thanks! I also had this issue and couldn't downgrade easily to 10, but I found this hack worked, I don't know if it's legitimate or not though, beware! Maybe this helps get to the issue for someone.

The error looks like what's described here: https://stackoverflow.com/questions/71296302/numeric-limits-is-not-a-member-of-std

So applied advice:

#vim ../khaiii/src/main/cpp/main.cpp
#vim ~/.hunter/_Base/70287b1/6f60971/dffbc08/Install/include/cxxopts.hpp

#and add "#include " after other includes

built fine on gcc/g++ 11 on Debian bookworm

Feel free to take this down if it's not good advice :)

@hwtheowl
Copy link

정말 감사합니다! 덕분에 잘 진행했습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants