Closed jacoobes closed 7 months ago
should be fixed. @drasticactions used this script which worked for me. It bruteforced and retried until it worked (wtf?) https://github.com/drasticactions/gpt4all.net.Runtime/commit/1ba1022dcf135a3b2d25105b71d6523a02723736
Yeah, I have same experience. Lookup ninja subcommand failed on google and you can see many projects apparently experience this and it is inexplicable. Typical windows quality
Take what I report with a grain of salt because I'm not very familiar with CMake and stuff.
After following a chain of issues spread among many repos, what I've found is that the combination of the following does not work well (if it works at all):
/GL
flag in MSVC)export.def
s)This comment gives an in-depth explanation of the possible root cause.
As far as I understand, if it is not feasible to manually define the exports (aka using WINDOWS_EXPORT_ALL_SYMBOLS
is necessary), the only alternative to brute-forcing the build is to disable IPO while building with MSVC. I imagine this is not an option because it will produce a suboptimal build.
With IPO enabled the first run seems to produce empty exports.def
for the failing libraries, not sure why the second time works but the logs may give additional information.
TL;DR
The combination of WINDOWS_EXPORT_ALL_SYMBOLS
and INTERPROCEDURAL_OPTIMIZATION
seems to have issues with MSVC, see the issue below for more detail.
For reference:
Error MSB3073 The command "setlocal
cd (path)
if %errorlevel% neq 0 goto :cmEnd
C:
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake\bin\cmake.exe" -E create_def (path)/runtimes/win-x64/mpt-avxonly.dir/RelWithDebInfo/exports.def (path)/runtimes/win-x64/mpt-avxonly.dir/RelWithDebInfo//objects.txt
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code -1073741819.
Yes, this looks familiar.
The first option is to try to build it twice. But I've "fixed" this for me by disabling 'whole program optimisation' (/GL
). See edit2 & edit4 here: https://github.com/nomic-ai/gpt4all/pull/746#issuecomment-1573546380
I didn't find all the extra info there, @mvenditto. Interesting, thanks for sharing.
I just pushed a fix by disabling IPO until someone figures out how to enable it.
I don't think that is going to happen since MSVC can't link if it can't see the symbols. There was a good writeup in previous from mvenditto. I read the links and looked at the MS page for /GL. Can this be reviewed and closed? I would try building if I knew how to pull it.
I don't think that is going to happen since MSVC can't link if it can't see the symbols. There was a good writeup in previous from mvenditto. I read the links and looked at the MS page for /GL. Can this be reviewed and closed? I would try building if I knew how to pull it.
What do you mean? /GL
is disabled right now to work around this problem, so it's building fine.
Yes, I am suggesting this move forward
On Sun, Jun 18, 2023, 1:55 AM cosmic-snow @.***> wrote:
I don't think that is going to happen since MSVC can't link if it can't see the symbols. There was a good writeup in previous from mvenditto. I read the links and looked at the MS page for /GL. Can this be reviewed and closed? I would try building if I knew how to pull it.
What do you mean? /GL is disabled right now to work around this problem, so it's building fine.
— Reply to this email directly, view it on GitHub https://github.com/nomic-ai/gpt4all/issues/841#issuecomment-1595996275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXAKDZMV5LETH633HCUSDXL2Q4XANCNFSM6AAAAAAY2NYKCY . You are receiving this because you commented.Message ID: @.***>
There are still some things that can be done:
Also, I guess it's not a priority to close this issue.
I thought it was holding up gpu
On Sun, Jun 18, 2023, 8:33 AM cosmic-snow @.***> wrote:
There are still some things that can be done:
- Check what the performance impact actually is between having it on and dealing with build errors, or turning it off completely.
- There's a related flag, I forgot its name. Maybe that could be used instead?
- Maybe it could be enabled partially, in one or a few of the subprojects.
Also, I guess it's not a priority to close this issue.
— Reply to this email directly, view it on GitHub https://github.com/nomic-ai/gpt4all/issues/841#issuecomment-1596149652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXAKFAVS32MKVATGOK4LDXL37T5ANCNFSM6AAAAAAY2NYKCY . You are receiving this because you commented.Message ID: @.***>
No that's not it. It's an optimisation that when turned on is causing build problems. So the workaround was to turn it off until maybe someone can look into it a bit more.
That's the part I was saying wasn't likely to happen based on the links provided previously.
On Sun, Jun 18, 2023, 9:23 AM cosmic-snow @.***> wrote:
No that's not it. It's an optimisation that when turned on is causing build problems. So the workaround was to turn it off until maybe someone can look into it a bit more.
— Reply to this email directly, view it on GitHub https://github.com/nomic-ai/gpt4all/issues/841#issuecomment-1596166712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXAKGN76JSQUNFF3D7MR3XL4FMLANCNFSM6AAAAAAY2NYKCY . You are receiving this because you commented.Message ID: @.***>
System Info
Windows 10 Processor AMD Ryzen 3 3100 4-Core Processor 3.60 GHz Installed RAM 16.0 GB System type 64-bit operating system, x64-based processor Pen and touch No pen or touch input is available for this display Visual Studio 17 2022 MSVC v143 x64/x86 Windows 10 SDK 10.0.20348.0 CMake 3.26.4
Information
Related Components
Reproduction
Building the backend with this script , (ensure you're in the right directory)
You may also use visual studio 2022 IDE:
I generated the cmake build and then opened the solution from there.
Error code is -1073741819, which is a filesystem error.
I investigated and found out I can successfully compile the rest of the application by editing the command line arguments generated by CMake:
When building with cmake, these defines specified on the command line cause the MSVC compiler to believe it is a file or directory, and
no such file or directory exists
(hence the filesystem error) However, I attempted to fix the generation of cmake defines, to no avail.Expected behavior
The DLLs to compile successfully on windows. Running dumpbin /EXPORTS (dll file) should properly export the symbols
is_g4a_implementation....
and friends