JetBrains / UnrealLink

Apache License 2.0
128 stars 24 forks source link

Failed to build rider link plugin (Mac) #242

Closed ssypi closed 1 year ago

ssypi commented 1 year ago

Everything was fine previously just a day ago, but now Rider is unable to build RiderLink. I re-installed UE and Rider and created a new blank project and error still persists.

I'm on M1 Mac and UE 5.1.

Maybe this is just a coincidence, but this error repeats a lot and that file (to_string.h) seems to be changed in the latest commit

/private/var/folders/nn/r8xcn5xx50z54spd1vc7s4740000gn/T/UnrealLink/Pedymil/HostProject/Plugins/RiderLink/Source/RD/src/rd_core_cpp/src/main/std/to_string.h:48:7: warning: 'wstring_convert<rd::detail::codecvt<wchar_t, char, __mbstate_t>>' is deprecated [-Wdeprecated-declarations]
        std::wstring_convert<convert_type> converter;
             ^

/private/var/folders/nn/r8xcn5xx50z54spd1vc7s4740000gn/T/UnrealLink/Pedymil/HostProject/Plugins/RiderLink/Source/RD/src/rd_core_cpp/src/main/std/to_string.h:48:7: error: 'wstring_convert<rd::detail::codecvt<wchar_t, char, __mbstate_t>>' is deprecated [-Werror,-Wdeprecated-declarations]
        std::wstring_convert<convert_type> converter;
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:3621:28: note: 'wstring_convert<rd::detail::codecvt<wchar_t, char, __mbstate_t>>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))

Build ends with


[65/67] Link UnrealEditor-RiderBlueprint.dylib cancelled
[66/67] Link UnrealEditor-RiderLogging.dylib cancelled
[67/67] WriteMetadata UnrealEditor.target cancelled
CompilationResultException: Error: OtherCompilationError
   at UnrealBuildTool.ActionGraph.ExecuteActions(BuildConfiguration BuildConfiguration, List`1 ActionsToExecute, List`1 TargetDescriptors, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/System/ActionGraph.cs:line 387
   at UnrealBuildTool.BuildMode.Build(TargetMakefile[] Makefiles, List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/Modes/BuildMode.cs:line 628
   at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments, ILogger Logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/Modes/BuildMode.cs:line 242
   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.cs:line 648
WriteFileIfChanged() wrote 69 changed files of 69 requested writes.
Timeline:

And

RunUAT ERROR: AutomationTool was unable to run successfully. Exited with code: 6
Failed to build RiderLink plugin for /Users/Shared/Epic Games/UE_5.1
Failed to build RiderLink plugin

Full Log https://pastebin.com/raw/ELA1x79q

ssypi commented 1 year ago

Built riderlink from the latest sources and the error went away so it seems to be fixed already, just not yet in the current release.

andreyrd commented 1 year ago

@ssypi can you point to us to how you built RiderLink manually? The instructions in this repo are very unclear and just basically say "it's part of Rider already!".

Edit: I see that there's a manual download available for a new release of Rider released yesterday, but it's not showing up in JetBrains Toolbox yet.

DecoyRS commented 1 year ago

@andreyrd I presume ssypi has simply copied the RiderLink sources to their repo. In short, you need to take latest:

derekmtran commented 1 year ago

Figured out the solve. It's broken if you have the latest version of Xcode (14.3). If you do, you can download 14.2 here: https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.2/Xcode_14.2.xip

You will need to have a Apple developer account (you can sign up for a free one these days I think...) After you do that, unzip the .xip file, rename the Xcode.app file to Xcode14_2.app. Put it in your Applications folder. Launch Terminal and type: sudo xcode-select -switch /Applications/Xcode14_2.app

Restart Rider. In your Editor Settings > Build, Execution, Deployment > Apple Platforms, you should now see it say Xcode path: Default (14.2).

Try building now and you should be good!

ssypi commented 1 year ago

@ssypi can you point to us to how you built RiderLink manually? The instructions in this repo are very unclear and just basically say "it's part of Rider already!".

Edit: I see that there's a manual download available for a new release of Rider released yesterday, but it's not showing up in JetBrains Toolbox yet.

@andreyrd I used the instructions in the SETUP.md (mentioned in readme at the "setup development environment" part). Basically it symlinks the downloaded sources to the project folder so Rider uses those to install RiderLink instead.

I had to manually put my project folder in the Build.gradle file tho because it was unable to read it from the .txt file for some reason, possibly because the path had spaces in it.

Yes I also found out later that the error came with xcode 14.3, xcode 14.2 worked fine with the current riderlink. Sorry for not elaborating on that more when I closed the ticket.

jeffkasunic commented 1 year ago

Not sure why this is closed? As of today, 4/22, I am seeing the above same error. Latest Xcode, MacOS.

willardjansen commented 1 year ago

Not sure why this is closed? As of today, 4/22, I am seeing the above same error. Latest Xcode, MacOS.

Look two comments above. You need to get Xcode 14.2

DecoyRS commented 1 year ago

Sorry for not getting back and closing the issue, the fix is available in UnrealLink version 2023.1.0.281 available in the marketplace. Rider > Settings > Plugins > Installed > UnrealLink > Update