janhq / cortex.cpp

Run and customize Local LLMs.
https://cortex.so
Apache License 2.0
1.94k stars 108 forks source link

epic: Cortex is compatible with Ubuntu 20.04 (removal of `GLIBCXX_3.4.30` and `CXXABI_1.3.13' #1144

Open AspenEyers opened 5 months ago

AspenEyers commented 5 months ago

Goal

Tasklist

Original Post

Subject: bug: version GLIBCXX_3.4.30' andCXXABI_1.3.13' not found

Describe the bug

Jan uses GLIBCXX_3.4.30 which is a symbol that doesn't exist for standard packages on ubuntu 20.04 libstdc++.so.6.

An extract from the error logs:

jan-data-folder/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by jan-data-folder/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro)

https://github.com/janhq/jan/issues/1732 appears to suggest that the solution is to upgrade to a later version of libstdc++.so.6, which Is a solution I'm not particularly happy with, considering it's a reasonably core package that will make anything I build incompatible with most ubuntu 20.04 systems.

Is there any chance you can compile without these symbols?

Steps to reproduce Steps to reproduce the behavior:

  1. Go to https://jan.ai/
  2. Click on download AppImage 3 . I downloaded Mistral Instruct 7B Q4
  3. write any instruction and check the error logs when it fails.

Similarly I tried the deb package: https://github.com/janhq/jan/releases/download/v0.4.12/jan-linux-x86_64-0.4.12.AppImage

/home/aspen/jan/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/aspen/jan/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro)
/home/aspen/jan/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /home/aspen/jan/extensions/@janhq/inference-nitro-extension/dist/bin/linux-cuda-12-0/nitro)

Environment details

the-vindicar commented 4 months ago

This bug is critical, as it prevents the use of core functionality. Additionally, upgrading libc requires root privileges, and if you lack them, convincing sysop to perform the upgrade is not easy for reasons stated in the post. Is there a version of Jan that can be run on Ubuntu 20.04 without modifications?

imtuyethan commented 1 month ago

Screenshot 2024-08-28 at 10 25 40 PM

dan-homebrew commented 1 month ago

https://github.com/janhq/jan/issues/3489 is likely linked to this as well

dan-homebrew commented 1 month ago

Changing the Issue title to reflect error message.

dan-homebrew commented 3 weeks ago

@0xSage This bug needs a decision on https://github.com/janhq/cortex.cpp/discussions/1125.

dan-homebrew commented 3 weeks ago

Transferring this to Cortex.cpp repo

vansangpfiev commented 3 weeks ago

We are using gcc-11 on ubuntu (20.04 for cortex.cpp, cortex.llamacpp; 22.04 for cortex.tensorrt-llm) to compile our sources.

There are a few things I think need to be considered:

dan-homebrew commented 2 weeks ago

We are using gcc-11 on ubuntu (20.04 for cortex.cpp, cortex.llamacpp; 22.04 for cortex.tensorrt-llm) to compile our sources.

  • gcc-11 is mandatory for cortex.tensorrt-llm
  • we can use gcc-9 for cortex.cpp and cortex.llamacpp

There are a few things I think need to be considered:

  • [ ] Need to rebuild all the runners for cortex.cpp and cortex.llamacpp to use gcc-9 (cc @hiento09)
  • [ ] Users can only use llamacpp engine on Ubuntu 20.04, to use tensorrt-llm engine they need to upgrade glibc cc: @dan-homebrew

@vansangpfiev @hiento09 Let's support gcc-9 as a default for now, and we can reconsider after its EOL in April 2025.

I will create a separate ticket to figure out the UX for upgrading glibc for TensorRT-LLM, and schedule it with the TensorRT-LLM stories.

gabrielle-ong commented 5 hours ago

I'm moving this to sprint 22 for QA