gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

Building GPT4all from source - Windows - Qt.dll errors

Open neural-oracle opened this issue 1 year ago • 11 comments

Bug Report

Using QtCreator v. 6.5.3 to build gpt4all I get 20 problems during building and after starting the built chat.exe many Qt6pdf...dll Qt6sql ..dll problems

Example Code

I followed the instructions here: https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-chat/build_and_run.md

Steps to Reproduce

I followed exactly the instructions https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-chat/build_and_run.md

Only difference: Qt Creator v 6.5.0 (as shown in the screenshots of the instructions) is not available. Only v 6.5.3 of Qt Creator and later versions can be installed.

I configured the project as described.

Expected Behavior

No problems while building and no errors while launching the new built chat.exe.

Your Environment

  • Bindings version: Not applicable - source files used to build from here (as instructed): git clone --recurse-submodules https://github.com/nomic-ai/gpt4all

  • Operating System: Windows 11 Home

  • Chat model used (if applicable):

neural-oracle avatar May 20 '24 12:05 neural-oracle

This is not enough information. GPT4All does build without issue in Qt Creator. You should provide:

  • Screenshots of what you have checked in the Qt installer (if you run it again it will remember your settings)
  • A screenshot of the errors you are seeing in Qt Creator

cebtenzzre avatar May 20 '24 14:05 cebtenzzre

Here are the screenshots ... i have tried to install a version (6.5.3) that is as old as in the instructions (6.5.0). Latest release is 6.8. I have Vulkan SDK v138 installed and Visual Studio 2019 distribution (with all updates).

Please find attached the Screenshots:

  • First SS: Configuration of Qt Installation

  • Second SS: Version of Qt Creator

  • Third SS: Screenshot from the Config Page

  • Next SS: Problems during Config and Build run

  • Last SSs: Error when running the new built chat.exe file.

  • I also attached the output of window 9 (general output) into the attached configuration_log.txt

  • I attached the output during build in the the build_log.txt Screenshot 2024-05-20 164007 Screenshot 2024-05-20 164105 Screenshot 2024-05-20 164610 Screenshot Problems Config Run Screenshot Problems Build Run Build_log.txt Configuration_log.txt

neural-oracle avatar May 20 '24 15:05 neural-oracle

here are the screenshots from the errors (I mentioned earlier - but did not attached the error ss): Screenshot 2024-05-20 164433 Screenshot 2024-05-20 164426 Screenshot 2024-05-20 164417 Screenshot 2024-05-20 164407

neural-oracle avatar May 20 '24 15:05 neural-oracle

i solved it: I installed Linux distribution on WSL ubuntu and it works. The CUDA speed on version GPT4all v2.8 is amazing. However, many people have issues on windows.

Therefore I would highly appreciate if you can help me with trying to build successfully from source.

neural-oracle avatar May 20 '24 15:05 neural-oracle

@neural-oracle How are you starting chat.exe? The instructions say to click the play button from the left sidebar. You can also build an offline installer by setting GPT4ALL_OFFLINE_INSTALLER to ON in the CMake configuration, run the package target, and install that. If you try to directly launch chat.exe from the build directory, it will not work as the necessary Qt DLLs are not copied into the directory (as with the installer) or on the PATH (as Qt Creator does when you click the play button).

cebtenzzre avatar May 21 '24 15:05 cebtenzzre

Thy.. I will check tonight and get back to you then... 👍

neural-oracle avatar May 21 '24 16:05 neural-oracle

Have you pressed the "Re-configure with initial parameters" button in CMake build settings? image

ThiloteE avatar May 21 '24 17:05 ThiloteE

The reason ... why on windows chat.exe is opening in the task manager only but not opening the GUI seems to be an interference with AVG Antivirus software. After uninstalling it gpt4all version 2.8 pre opened with CUDA and everything!!

You said there were error dialogs on start. Now you are saying it started but didn't show a window. What changed?

cebtenzzre avatar May 21 '24 20:05 cebtenzzre

I deleted my comment in order not to confuse you or others ... I was just happy that i fixed my OTHER issue not related to this here. The issue presented here with the error screenshot is not solved.

I will check later and get back to you ...

neural-oracle avatar May 21 '24 21:05 neural-oracle

I proceeded as you instructed above by you (@cebtenzzre ) and @ThiloteE and: the GUI opens with 2.8 pre.

But i am pretty sure that this would have not been the case 12 hours ago where I had AVG Antivirus installed.

@cebtenzzre Regarding you quote: "The instructions say to click the play button from the left sidebar. " Thats true, but first the instructions say to click the Build button (which is counterintuitive) but I followed this sequence, and since build failed i did not check the Play button. Maybe it makes sense to change the order of the sequence and first "Play" and then "Build" in the instructions here: https://github.com/nomic-ai/gpt4all/blob/main/gpt4all-chat/build_and_run.md

@cebtenzzre I think you underestimate the interference of Antivirus with Gpt4all. Other users repored IDP alarm of Avast. Worse is , if an antivirus program does interfere without giving a warning. AVG was definetely surpressing the GUI! I have not changed anything but uninstalling AVG. So the problem was not solved by v2.7.5 and not by 2.8. If you close tickets of issues from users with chat.exe launching in task manager but not opening the GUI on Windows you should in my opinion at least state that checking Antivirus interference at least as an option.

So hope this helps. I did the check with GPT4all on Windows and the Qt build today, to help. I decided for myself to run GPT4all on WSL since it seems to be faster on Ubuntu.

neural-oracle avatar May 21 '24 22:05 neural-oracle

I think this issue here can be closed, as it works for you now, right?

ThiloteE avatar May 24 '24 12:05 ThiloteE

@ThiloteE

Yep ... works now on iwndows and on WSL after uninstalling the antivirus software AVG

neural-oracle avatar May 26 '24 16:05 neural-oracle

Thats true, but first the instructions say to click the Build button (which is counterintuitive) but I followed this sequence, and since build failed i did not check the Play button.

I'm really surprised that the error dialogs in https://github.com/nomic-ai/gpt4all/issues/2367#issuecomment-2120644035 are coming from the build process, as the title bars seem to indicate they are coming from chat.exe itself, at runtime. The hammer button is optional but is indeed supposed to be clicked before the play button as the instructions indicate.

We could put a warning somewhere to tell users that some antivirus software may interfere with GPT4All, but I'm sure most users wouldn't read it unless we had a dedicated "troubleshooting" or "common issues" page.

cebtenzzre avatar May 28 '24 14:05 cebtenzzre