eranif/codelite

[Bug]: Build error using Raspbian Buster 64bit

Closed this issue · 7 comments

What happened?

A bug happened! Building codelite from source on:
Linux raspberrypi BUSTER 5.10.103-v8+ aarch64 GNU/Linux
gcc (Debian 8.3.0-6) 8.3.0

Version

Self compiled

Operating system

Linux

Steps to reproduce

Instructions at this link
https://docs.codelite.org/build/build_from_sources/

Relevant log output

[  3%] Building CXX object submodules/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/ostream_wrapper.cpp.o
In file included from /media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:6:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_q3_K_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:368:27: error: implicit declaration of function ‘vld1q_s8_x4’; did you mean ‘vld1q_s8_x2’? [-Werror=implicit-function-declaration]
 #define ggml_vld1q_s8_x4  vld1q_s8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:6993:48: note: in expansion of macro ‘ggml_vld1q_s8_x4’
             const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8); q8 += 64;
                                                ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:368:27: error: invalid initializer
 #define ggml_vld1q_s8_x4  vld1q_s8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:6993:48: note: in expansion of macro ‘ggml_vld1q_s8_x4’
             const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8); q8 += 64;
                                                ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:368:27: error: invalid initializer
 #define ggml_vld1q_s8_x4  vld1q_s8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:6994:48: note: in expansion of macro ‘ggml_vld1q_s8_x4’
             const ggml_int8x16x4_t q8bytes_2 = ggml_vld1q_s8_x4(q8); q8 += 64;
                                                ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_q5_K_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:368:27: error: invalid initializer
 #define ggml_vld1q_s8_x4  vld1q_s8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:8345:46: note: in expansion of macro ‘ggml_vld1q_s8_x4’
             const ggml_int8x16x4_t q8bytes = ggml_vld1q_s8_x4(q8); q8 += 64;
                                              ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_q6_K_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:366:27: error: implicit declaration of function ‘vld1q_u8_x4’; did you mean ‘vld1q_u8_x2’? [-Werror=implicit-function-declaration]
 #define ggml_vld1q_u8_x4  vld1q_u8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:8968:40: note: in expansion of macro ‘ggml_vld1q_u8_x4’
             ggml_uint8x16x4_t q6bits = ggml_vld1q_u8_x4(q6); q6 += 64;
                                        ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:366:27: error: invalid initializer
 #define ggml_vld1q_u8_x4  vld1q_u8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:8968:40: note: in expansion of macro ‘ggml_vld1q_u8_x4’
             ggml_uint8x16x4_t q6bits = ggml_vld1q_u8_x4(q6); q6 += 64;
                                        ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-cpu-impl.h:368:27: error: invalid initializer
 #define ggml_vld1q_s8_x4  vld1q_s8_x4
                           ^~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:8969:40: note: in expansion of macro ‘ggml_vld1q_s8_x4’
             ggml_int8x16x4_t q8bytes = ggml_vld1q_s8_x4(q8); q8 += 64;
                                        ^~~~~~~~~~~~~~~~
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:8994:21: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8bytes = ggml_vld1q_s8_x4(q8); q8 += 64;
                     ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq2_xxs_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:9636:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq2_xs_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:9957:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq2_s_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:10543:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq3_xxs_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:11009:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq3_s_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:11359:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq1_s_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:11886:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq1_m_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:12234:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
                 ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c: In function ‘ggml_vec_dot_iq4_xs_q8_K’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/submodules/llama.cpp/ggml/src/ggml-quants.c:12704:20: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’
             q8b    = ggml_vld1q_s8_x4(q8); q8 += 64;
                    ^
cc1: some warnings being treated as errors
make[2]: *** [submodules/llama.cpp/ggml/src/CMakeFiles/ggml.dir/build.make:118: submodules/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  3%] Building CXX object submodules/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parse.cpp.o
make[1]: *** [CMakeFiles/Makefile2:1795: submodules/llama.cpp/ggml/src/CMakeFiles/ggml.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Building C object submodules/ctags/CMakeFiles/ctags.dir/main/portable-scandir.c.o
[  3%] Building CXX object submodules/yaml-cpp/CMakeFiles/yaml-cpp.dir/src/parser.cpp.o

....

[ 12%] Building C object submodules/ctags/CMakeFiles/ctags.dir/libreadtags/readtags.c.o
[ 12%] Linking C executable ../../bin/codelite-ctags
[ 12%] Built target ctags
make: *** [Makefile:146: all] Error 2

It is an external code (submodule: https://github.com/ggerganov/llama.cpp)
You might first check with them.

Looks like we need to make the new ChatAI optional in the CMake

Looks like we need to make the new ChatAI optional in the CMake

Thank you @eranif, it would be very useful, especially for those who are not interested in AI integration

You can now pass -DWITH_CHATAI=OFF in the CMake command line build and it will skip the ChatAI plugin

Once again, thank you, it works ...

I encountered a couple of small issues during the building process that a user could solve by itself, but perhaps they are interesting for you.

Codelite: latest source code (master)
OS: Linux

Build error 1:

/media/WORKSPACE/develop/wxw/res/CodeLite/src/Plugin/FileSystemWorkspace/FSConfigPage.cpp: In member function ‘virtual void FSConfigPage::OnBrowseExec(wxCommandEvent&)’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/Plugin/FileSystemWorkspace/FSConfigPage.cpp:291:18: error: ‘::wxFileSelector’ has not been declared; did you mean ‘wxDirSelector’?
  291 |         path = ::wxFileSelector();
      |                  ^~~~~~~~~~~~~~
      |                  wxDirSelector
/media/WORKSPACE/develop/wxw/res/CodeLite/src/Plugin/FileSystemWorkspace/FSConfigPage.cpp: In member function ‘virtual void FSConfigPage::OnBrowseForGDB(wxCommandEvent&)’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/Plugin/FileSystemWorkspace/FSConfigPage.cpp:329:18: error: ‘::wxFileSelector’ has not been declared; did you mean ‘wxDirSelector’?
  329 |         path = ::wxFileSelector();
      |                  ^~~~~~~~~~~~~~
      |                  wxDirSelector
Plugin/CMakeFiles/plugin.dir/build.make:579: recipe for target 'Plugin/CMakeFiles/plugin.dir/FileSystemWorkspace/FSConfigPage.cpp.o' failed
make[2]: *** [Plugin/CMakeFiles/plugin.dir/FileSystemWorkspace/FSConfigPage.cpp.o] Error 1

Applied solution:
at line 19 of FSConfigPage.cpp I added #include <wx/filedlg.h>

Build error 2

/media/WORKSPACE/develop/wxw/res/CodeLite/src/DatabaseExplorer/imageexportdialog.cpp: In member function ‘virtual void ImageExportDialog::OnBowseClick(wxCommandEvent&)’:
/media/WORKSPACE/develop/wxw/res/CodeLite/src/DatabaseExplorer/imageexportdialog.cpp:69:21: error: variable ‘wxFileDialog dlg’ has initializer but incomplete type
   69 |     wxFileDialog dlg(this, _("Export ERD to image..."), path.GetPath(), path.GetFullName(),
      |                     ^
/media/WORKSPACE/develop/wxw/res/CodeLite/src/DatabaseExplorer/imageexportdialog.cpp:72:22: error: ‘wxFD_SAVE’ was not declared in this scope; did you mean ‘wxID_SAVE’?
   72 |                      wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
      |                      ^~~~~~~~~
      |                      wxID_SAVE
/media/WORKSPACE/develop/wxw/res/CodeLite/src/DatabaseExplorer/imageexportdialog.cpp:72:34: error: ‘wxFD_OVERWRITE_PROMPT’ was not declared in this scope; did you mean ‘wxFLP_OVERWRITE_PROMPT’?
   72 |                      wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
      |                                  ^~~~~~~~~~~~~~~~~~~~~
      |                                  wxFLP_OVERWRITE_PROMPT
DatabaseExplorer/CMakeFiles/DatabaseExplorer.dir/build.make:621: recipe for target 'DatabaseExplorer/CMakeFiles/DatabaseExplorer.dir/imageexportdialog.cpp.o' failed
make[2]: *** [DatabaseExplorer/CMakeFiles/DatabaseExplorer.dir/imageexportdialog.cpp.o] Error 1

Applied solution:
at line 28 of imageexportdialog.cpp I added #include <wx/filedlg.h>

Thanks, I will apply the fix and close this issue after

Fixed