-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Compatible Visual Studio installation not found. #11635
Comments
It should be possible to use either. I am using 2022 myself. It is difficult to say what the problem is, I would start by using Visual Studio Developer prompt instead of regular cmd. |
Closing, not likely to be PrusaSlicer-related issue. |
CLOSING???? This is something that is happening while I'm following the instructions for setting up PrusaSlicer !!!! It's happening because of a test done within the "How to build - Windows.md" file for PrusaSlicer! Why is it not finding the Visual Studio installation? It's most definitely installed on my computer? Or if it IS finding it how is it determining that it's NOT COMPATIBLE??? You say that you, yourself, are using 2022. And exactly what "prompt" would I use within Visual Studio Developer? And it's not that it's reporting "No Visual Studio installation found.". It's reporting "Compatible Visual Studio installation not found." so it seems to be finding the Visual Studio version I have installed, in fact the ONLY Visual Studio version I have installed, which is indeed Visual Studio 2022, but it's deciding that it's not compatible with the current version of PrusaSlicer!!! The applicable code within the "How to build - Windows.md" file is this: IF DEFINED PS_VERSION ( So, what is it looking at that it finds is indicating NOT COMPATIBLE ?? |
Ok, so only now it is apparent that you are using the
I really have no idea. The script calls
You would open the Developer Command Prompt and run |
OK, I started clean and did the entire process again, again using the git-cmd.exe for the command window, and following the instructions in the "How to build - Windows.md" file. In the git-cmd command window I did: C:\Program Files\Git>cd \ C:>mkdir src Resolving deltas: 100% (176574/176574), done. C:\src>cd PrusaSlicer C:\src\PrusaSlicer>build_win.bat -d=..\PrusaSlicer-deps -r=console C:\src\PrusaSlicer>REM /|/ Copyright (c) 2022 Jebtrix @Jebtrix C:\src\PrusaSlicer>REM /|/ Copyright (c) 2021 Justin Schuh @jschuh C:\src\PrusaSlicer>REM /|/ C:\src\PrusaSlicer>REM /|/ PrusaSlicer is released under the terms of the AGPLv3 or higher C:\src\PrusaSlicer>REM /|/ AND THERE IS IT AGAIN, the ERROR. The applicable section of the build_win.bat file is: This is the section for checking whether Visual Studio exists: REM The officially supported toolchain version is 16 (Visual Studio 2019) IT APPARENTLY SUCCEEDS in finding Visual Studio, since it reports no error from the above code. Later, it does the check for whether or not the found Visual Studio is compatible: IF DEFINED PS_VERSION ( and it is THAT SECTION that reports "ERROR: Compatible Visual Studio installation not found" So, it's finding Visual Studio but then determining that it's not compatible (with PrusaSlicer). So what exactly is wrong? What is it finding that makes it decide that the version of Visual Studio is not compatible, per the above code? |
I looked into it in more detail and you are actually right. It is the We probably should do something about it. My opinion is that since it was provided by the community for the community, it should be the community who maintains it. What we should do is to update the documentation so it explicitly says so. |
It looks like Boost got rolled forward to a supported version sometime during the development of 2.6. I had a script that periodically checked this, but it seems that it broke at some point. Anyway, it's a trivial change, so I can post a PR to update things tomorrow. |
lukasmatena, Thank you for looking more closely at this. Are you sure that it's a -v 17 that should be added to the invocation of the build_win.bat batch file? The -v option is indicated as the "Major version number of MSVC installation to use for build". But the instructions for doing the build indicates (somewhere, I don't recall where) that it requires the 2019 version of Visual Studio. I'm guessing that the '17' would be telling it that it needs the 2017 version. PLUS, what I have installed is the 2022 version of Visual Studio. So, should I specify -v 22 ?? |
@RogerInHawaii The product name is "Visual Studio 2022", but the version number is 17. Similarly, "Visual Studio 2019" is version 16. "Visual Studio 6.0" actually had a matching version number of 6 (but then the product name was off by 1992 years 😉). More generally, you'll find that projects specify a maximum supported toolchain version because newer versions typically introduce incompatibilities due to language, compiler, or library changes—or even just toolchain bugs. It takes time and effort to update the code to resolve those incompatibilities (e.g. Prusa Slicer didn't build in VS 2022 until earlier this year). That's why it's a good idea to stick to a toolchain version that's explicitly listed as supported. |
OK. I started up the batch file, within the Gt CMD window, and included the -v 17 option. It started off pretty good, getting past the point where it previously hit the "cannot find compatible version" error, and it processed for quite some time, displaying updates on what it was doing, but at one point it started reporting warnings, hundreds of warnings, in YELLOW TEXT. It continued on for a long time and then stopped showing any progress for a long time, although I could see from Task Manager that the Git CMD program was still taking up close to 100% CPU time. Finally, after a couple of hours it showed : **ERROR: *** Build process failed at deps step. *** C:\src\PrusaSlicer>** And stopped completely. Any suggestions? Here's a bit of the output, starting with my invocation of the batch file : C:\src\PrusaSlicer>build_win.bat -v 17 -d=..\PrusaSlicer-deps -r=console C:\src\PrusaSlicer>REM /|/ Copyright (c) 2022 Jebtrix @Jebtrix C:\src\PrusaSlicer>REM /|/ Copyright (c) 2021 Justin Schuh @jschuh C:\src\PrusaSlicer>REM /|/ C:\src\PrusaSlicer>REM /|/ PrusaSlicer is released under the terms of the AGPLv3 or higher C:\src\PrusaSlicer>REM /|/ ** Build Config: RelWithDebInfo ** Visual Studio 2022 Developer Command Prompt v17.7.6 Creating deps\build
-- Building dep targets (Debug): dep_Boost_debug;dep_CGAL_debug;dep_CURL_debug;dep_Catch2_debug;dep_Cereal_debug;dep_EXPAT_debug;dep_GLEW_debug;dep_LibBGCode_debug;dep_NLopt_debug;dep_OCCT_debug;dep_OpenVDB_debug;dep_TBB_debug;dep_Blosc_debug;dep_OpenEXR_debug;dep_Qhull_debug;dep_wxWidgets_debug;dep_PNG_debug HERE'S THE FIRST WARNING And lots and lots (hundreds) of Loss of Data warnings: C:\src\PrusaSlicer\deps\build\dep_ZLIB-prefix\src\dep_ZLIB\gzread.c(319,17): warning C4267: '=': conversion from 'size_ and it continued on for page after page of similar warnings and finally it showed . . . ERROR: *** Build process failed at deps step. *** C:\src\PrusaSlicer> |
I can't really say without seeing the actual errors. It's possible you can just do a clean rebuild to fix it. It's also possible you didn't install all of the required Visual Studio components (e.g. if an error says something like "cannot execute" that usually means you're missing a required Visual Studio component). I do know that the script works fine with a proper install of Visual Studio 2022 or 2019, because I tested clean builds with both yesterday before updating the script. Really, all of this is pretty typical build environment setup that should be familiar to anyone who's done Windows C++ development. So, I'd suggest working through it on your own, to ensure you're comfortable with the basics. Because setting up the build environment is by far the easy part, compared to understanding and modifying the code. |
I installed Visual Studio, accepting all the defaults. Are you saying that I need to know exactly what it is that PrusaSlicer expects so that I can make specific selections for the installation of Visual Studio? OK, I now notice that one of the final warnings/errors reported during the processing of the build_win.bat batch file indicates a fatal error: INSUFFICIENT DISK SPACE C:\src\PrusaSlicer\build\src\slic3r\RelWithDebInfo\libslic3r_gui.lib : fatal error LNK1180: insufficient disk space to I'm attempting to clean up as much as I can on my disk. So far I've got it down to 22.5 Gigabytes of free storage. Can you tell me how much space is needed in order to install the PrusaSlicer source code for editing, via the build_win.bat batch file?? Also, if it turns that I cannot free up enough space, is it feasible to put it out on my Windows OneDrive? |
I tried doing the git clone and the build_win.bat so that the output went out to my Microsoft OneDrive, i.e. out to online storage, instead of directly on to my computer. That didn't work because apparently it (OneDrive) defaults everything to being BOTH online AND on the local computer. So once again it maxed out on the disk space on my local computer. SO THEN I cleaned up my local C: drive, resulting in 26 Gigabytes of free space and then did the git clone and the build_win.bat so that the output went out to my C: drive. It ran out of space once again. I realized that I have a D: drive (normally used only for data storage for some reason??) and have over 800 Gigabytes free on it, so I did the git clone and the build_win.bat so that the output went out to that D: drive, and MAYBE it worked. The git clone part worked fine (as it usually does). The build_win.bat ran and ran and ran, a couple of hours. At one point it reported: CMake Warning: But it kept going with: -- Building dep targets (Debug): But then lots of YELLOW warnings started: cmake -E tar : warning : skipping symbolic link "libexpat-R_2_4_3/README.md" -> and hundreds of warnings like these: D:\Prusa Slicer Source Code\src\PrusaSlicer\PrusaSlicer\deps\build\dep_ZLIB-prefix\src\dep_ZLIB\gzread.c(319,17): warni warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data warning C4244: 'return': conversion from 'time_t' to 'double', possible loss of data It looked like it was finding bad code all over the place, in every source file it processed. AFTER those hundreds of warnings it reported: Cleaning build . . . But then showed: 'Slicer' is not recognized as an internal or external command, It then said: -- Building for: Visual Studio 17 2022 And went on to, apparently do a lot of builds. But then reported: Building with Win10 STL fixing service support So, something FAILED. And then: -- Looking for pthread_create in pthreads So, something NOT FOUND. It then processed OK (apparently) for a while, but encountered: -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) More things seemed to go OK for a while. Then : -- Visual Leak Detector (VLD) is not found. Then a bunch of processing that seemed to go OK. It finally got to: -- Build files have been written to: D:/Prusa Slicer Source Code/src/PrusaSlicer/PrusaSlicer/build BUT THEN, it started reporting more YELLOW WARNINGS, lots of t hem, like: **<': signed/unsigned mismatch The contents of are available only with C++23 or later. '==': unsafe mix of type 'char' and type 'const _Ty'** And then it just stopped. No final message like "Done" or anything, no indication that it was actually completed. I watched Task Manager the whole time and it did look like the processing time reduced to zero, so I figured it was finally all done. I looked at the location on the D: drive where it supposedly put everything and, I guess, it looks OK. Is it now ready for me to use Visual Studio to compile and run and potentially MAKE CHANGES to it? |
ONE MORE THING: When I start up Visual Studio 2022 it has an option to Clone a Repository. Does that mean I could have done all of this, including the build_win.bat part, right from within Visual Studio? Would that build have been executed automatically just by choosing the Clone a Repository option, or would I still have had to initiate that manually, somehow, from within Visual Studio? |
This is a nightmare. I just downloaded SuperSlicer and got the error at the top, but this conversation has made me decide to not even bother and find a different slicer program. |
Tylersuard Do be aware that this is an issue ONLY if your intention is to acquire the actual SOURCE code for PrusaSlicer, usually done when your intention is to make modifications or add to the capabilities of PrusaSlicer (which is what I am doing). It has nothing to do with simply USING the PrusaSlicer program itself. |
Description of the bug
I am trying to install the necessary software so that I can look at and make possible modifications to PrusaSlicer.
I'm following the instructions in the "How to build - Windows.md" file for PrusaSlicer.
At one point it says to :
C:\src\PrusaSlicer>git clone https://github.com/prusa3d/PrusaSlicer.git
and it starts off doing it, . . .
Cloning into 'PrusaSlicer'...
remote: Enumerating objects: 224892, done.
remote: Total 224892 (delta 0), reused 0 (delta 0), pack-reused 224892Receiving objects: 100% (224892/224892), 289.56 MiReceiving objects: 100% (224892/224892), 290.75 MiB | 8.06 MiB/s, done.
and so forth.
But at one point is reports:
ERROR: Compatible Visual Studio installation not found.
Previously I had read some instructions that stated that versions of Visual Studio prior to 2019 were incompatible with the requirements of PrusaSlicer, so I went to the Microsoft website and saw that there is an even NEWER version of Visual Studio, namely Microsoft Visual Studio Community 2022, so I installed that instead of the 2019 version.
But now I'm getting that "Compatible Visual Studio installation not found"
So, my question: Is PrusaSlicer ONLY compatible with the 2019 version, NOT with the 2022 version. so it's reporting the error because because of that, and I need to UN-install 2023 and instead install 2019??
OR, is PrusaSlicer actually OK with the 2023 version but the "How to build - Windows.md" file for PrusaSlice is somehow failing to find it on my machine? And if so, how do I get it to find it?
Project file & How to reproduce
I don't know what this is referring to
Checklist of files included above
Version of PrusaSlicer
PRUSA SLicer 2.6.1
Operating system
Windows 10 Home Version 22H2
Printer model
PRUSA i3 MK3
The text was updated successfully, but these errors were encountered: