d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
619 stars 43 forks source link

Build error on OpenSuse linux #58

Closed artur-shaik closed 2 years ago

artur-shaik commented 2 years ago

Hello, here what I have when trying to build nchat:

[ 14%] Building CXX object CMakeFiles/nchat.dir/src/uicontroller.cpp.o
In file included from /home/ash/Soft/nchat/src/uicontroller.cpp:8:
/home/ash/Soft/nchat/src/uicontroller.h:21:10: error: ‘wint_t’ does not name a type; did you mean ‘uint8_t’?
   21 |   static wint_t GetKey(int p_TimeOutMs);
      |          ^~~~~~
      |          uint8_t
/home/ash/Soft/nchat/src/uicontroller.cpp:23:1: error: ‘wint_t’ does not name a type; did you mean ‘uint8_t’?
   23 | wint_t UiController::GetKey(int p_TimeOutMs)
      | ^~~~~~
      | uint8_t
make[2]: *** [CMakeFiles/nchat.dir/build.make:146: CMakeFiles/nchat.dir/src/uicontroller.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:457: CMakeFiles/nchat.dir/all] Ошибка 2
make[1]: *** Ожидание завершения заданий…
[ 14%] Linking CXX shared library ../libduchat.so
[ 14%] Built target duchat
[ 14%] Built target cgowm
make: *** [Makefile:136: all] Ошибка 2
build failed, exiting.
d99kris commented 2 years ago

Hi @artur-shaik - thanks for reporting the issue. I've pushed a fix which I think should fix the openSUSE build problem.

I used the following steps to test the fix on openSUSE Leap 15.3 on a 16-threaded system (adjust -sj16 as needed):

Pre-req

zypper install ccache cmake gperf help2man
zypper install ncurses-devel # select option 1 to downgrade
zypper install readline-devel libopenssl-devel zlib-devel
zypper install sqlite3-devel # select option 1 to downgrade
zypper install file-devel
zypper install gcc gcc-c++

Build

git clone git@github.com:d99kris/nchat.git
cd nchat
mkdir build
cd build
cmake -DHAS_DUMMY=ON .. 
make -sj16
artur-shaik commented 2 years ago

Actually, I just rerun ./make.sh after pulling your commit. And it was built successfully. Thank you.

d99kris commented 2 years ago

Ok great!