Skip to content
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

5.2.1 - ERROR - Does not match the generator used previously: Visual Studio 17 2022 #17

Open
Quicksymphony opened this issue Jul 24, 2023 · 5 comments

Comments

@Quicksymphony
Copy link

Quicksymphony commented Jul 24, 2023

I noticed an error which comes up for the 5.2.1 packaging steps.

UATHelper: Packaging (Linux): CMake Error: Error: generator : Unix Makefiles
UATHelper: Packaging (Linux): Does not match the generator used previously: Visual Studio 17 2022
UATHelper: Packaging (Linux): Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

also:

PackagingResults: Error: Error: generator : Unix Makefiles
UATHelper: Packaging (Linux): Failed to create ConsoleBuf!
setActiveInputCodepage failed!Failed to create ConsoleBuf!
setActiveInputCodepage failed!
CMake Error: Error: generator : Unix MakefilesDoes not match the generator used previously: Visual Studio 17 2022
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
UATHelper: Packaging (Linux): Cannot configure CMake project. Exited with code: 1

How can I switch this in the main project?
Running on the Cross Compile Toolchain from the Unreal Linux Development Requirement.

Visual Studio 2022 is becoming the standard so I was wondering about switching this manually.

@Quicksymphony
Copy link
Author

Quicksymphony commented Jul 24, 2023

There's a compile reference here which seems to be causing conflicts.

case WindowsCompiler.VisualStudio2017:

@caseymcc
Copy link
Owner

caseymcc commented Jul 24, 2023

Without the code it will not generate on 5+ as VS2017 (which is VS15 not 17) is no longer supported. You should be able to remove the cmake build directory and run again, however I am not sure about your setup. Are you on linux cross compiling for windows or the other way around? I would have assumed on linux cross compiling for windows that it would use clang either way and Windows cross compiling for linux I would assume clang as well so not sure how VS is being engaged at all (but I have not cross compiled either way)

@Quicksymphony
Copy link
Author

Quicksymphony commented Jul 24, 2023

Without the code it will not generate on 5+ as VS2017 (which is VS15 not 17) is no longer supported. You should be able to remove the cmake build directory and run again, however I am not sure about your setup. Are you on linux cross compiling for windows or the other way around? I would have assumed on linux cross compiling for windows that it would use clang either way and Windows cross compiling for linux I would assume clang as well so not sure how VS is being engaged at all (but I have not cross compiled either way)

https://docs.unrealengine.com/5.2/en-US/linux-development-requirements-for-unreal-engine/

build chain for 5.2.1:
-v21 clang-15.0.1-based

Using the exe provided adds the cross compile toolchain to your environment variables, to it'll be callable in unreal engine under platforms.

you can set it up for the toolchain and package linux from windows platform pretty much, but yeah.

I'm building from windows side using the provided toolchain.

@caseymcc
Copy link
Owner

I think I need to set the build directory based on the target os, https://github.com/caseymcc/UE4CMake/blob/76db68259430c2ecdd0763402a467fd15091c760/Source/CMakeTarget.Build.cs#L268C57-L268C73

I think what is happening is the cross compile is trying to use the build folder that VS already built to and now that you are using clang to build cmake is confused.

@Quicksymphony
Copy link
Author

I think I need to set the build directory based on the target os, https://github.com/caseymcc/UE4CMake/blob/76db68259430c2ecdd0763402a467fd15091c760/Source/CMakeTarget.Build.cs#L268C57-L268C73

I think what is happening is the cross compile is trying to use the build folder that VS already built to and now that you are using clang to build cmake is confused.

Makes the most sense. haha, I can look at some options, but let me know if there's a quick fix for 5.2.1 and I can check the branch.

5.2.1 added many items to different modules or directories. So i'm trying to resolve the solutions at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants