adamrehn / conan-ue4cli

Integrate third-party libraries into the Unreal Engine with Conan
https://docs.adamrehn.com/conan-ue4cli/
MIT License
87 stars 20 forks source link

generate command fails UE 4.24.3 ERROR: Environment variable 'BinaryOutputDir' is not defined #5

Closed bmahlbrand closed 4 years ago

bmahlbrand commented 4 years ago

When I attempt to run ue4 conan generate, the following error occurs. I'm pointing to a source tree for ue4.24.3, on win10.

PS E:\workspace\autotoon\newplugin> ue4 conan generate
Using user-specified engine root: E:\workspace\UnrealEngine
Removing the "ue4" Conan profile if it already exists...
Removing any previous versions of profile base packages...
Creating "ue4" Conan profile using autodetected settings...
Installing profile base packages...
Retrieving thirdparty library list from UBT...
Traceback (most recent call last):
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\shift_000\AppData\Local\Programs\Python\Python38\Scripts\ue4.exe\__main__.py", line 9, in <module>
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\cli.py", line 216, in main
    SUPPORTED_COMMANDS[command]['action'](manager, args)
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\conan_ue4cli\main.py", line 34, in main
    SUBCOMMANDS[subcommand]['function'](manager, args[1:])
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\conan_ue4cli\generate.py", line 203, in generate
    libs = [lib for lib in manager.listThirdPartyLibs() if lib != 'libc++']
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\UnrealManagerBase.py", line 178, in listThirdPartyLibs
    return interrogator.list(self.getPlatformIdentifier(), configuration, self._getLibraryOverrides())
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\UE4BuildInterrogator.py", line 20, in list
    modules = self._getThirdPartyLibs(platformIdentifier, configuration)
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\UE4BuildInterrogator.py", line 156, in _getThirdPartyLibs
    self.runUBTFunc('UE4Editor', platformIdentifier, configuration, args)
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\UnrealManagerBase.py", line 663, in <lambda>
    ubtLambda = lambda target, platform, config, args: self._runUnrealBuildTool(target, platform, config, args, True)
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\UnrealManagerBase.py", line 655, in _runUnrealBuildTool
    return Utility.capture(arguments, cwd=self.getEngineRoot(), raiseOnError=True)
  File "c:\users\shift_000\appdata\local\programs\python\python38\lib\site-packages\ue4cli\Utility.py", line 125, in capture
    raise Exception(
Exception: child process ['E:\\workspace\\UnrealEngine\\Engine\\Build\\BatchFiles\\Build.bat', 'UE4Editor', 'Win64', 'Development', '-Mode=JsonExport', '-OutputFile=C:\\Users\\SHIFT_~1\\AppData\\Local\\Temp\\tmpxhgrayox\\ubt_output.json'] failed with exit code 5
stdout: "Writing C:\Users\shift_000\AppData\Local\Temp\tmpxhgrayox\ubt_output.json...
ERROR: Environment variable 'BinaryOutputDir' is not defined (referenced by E:\workspace\UnrealEngine\Engine\Plugins\Experimental\AlembicImporter\Source\ThirdParty\Alembic\AlembicLib.Build.cs)
"
stderr: ""

Anything obvious I missed?

adamrehn commented 4 years ago

This is a bug in Unreal Engine 4.24 that was previously reported here and has been fixed in Unreal Engine 4.25. You will need to patch your version of UnrealBuildTool using the fix from the ue4-docker project and then rebuild UnrealBuildTool by running GenerateProjectFiles.bat.