Cannot package on mac - FIOSPlatformAffinity::GetNoAffinityMask not found

Hi,

When I try to package Airsim Blocks Simulation environment (a simulation environment for drones build on unreal engine. See source), I am getting the following error

Undefined symbols for architecture x86_64:
UATHelper: Packaging (Mac):     "FIOSPlatformAffinity::GetNoAffinityMask()", referenced from:
UATHelper: Packaging (Mac):         FRecordingThread::FRecordingThread() in UE4-AirSim.a(Module.AirSim.cpp.o)
UATHelper: Packaging (Mac):   ld: symbol(s) not found for architecture x86_64
UATHelper: Packaging (Mac):   clang: error: linker command failed with exit code 1 (use -v to see invocation)

This happens only when trying to package the environment. I am able to run it inside unreal editor without any problem.

Full log:

UATHelper: Packaging (Mac): Running AutomationTool...
UATHelper: Packaging (Mac): Setting up Mono
UATHelper: Packaging (Mac): Start UAT: mono AutomationTool.exe -ScriptsForProject=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -cook -stage -archive -archived
irectory=/Volumes/UR/Blocks -package -clientconfig=Development -ue4exe=UE4Editor -clean -compressed -pak -prereqs -nodebuginfo -targetplatform=Mac -build -utf8output
UATHelper: Packaging (Mac): Parsing command line: -ScriptsForProject=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -cook -stage -archive -archivedirectory=/Vol
umes/UR/Blocks -package -clientconfig=Development -ue4exe=UE4Editor -clean -compressed -pak -prereqs -nodebuginfo -targetplatform=Mac -build -utf8output
UATHelper: Packaging (Mac): Setting up ProjectParams for /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject
UATHelper: Packaging (Mac): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Mac): Running: mono "/Volumes/UR/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe" Blocks Mac Development -Project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -clean /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -remot
eini="/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks" -skipdeploy -nobuilduht -nocreatestub -NoHotReload
UATHelper: Packaging (Mac): Took 1.698663s to run mono, ExitCode=0
UATHelper: Packaging (Mac): Running: mono "/Volumes/UR/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe" Blocks Mac Development -Project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject  /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -remoteini="
/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks" -skipdeploy -flushmac -noxge -generatemanifest -nocreatestub -NoHotReload -ignorejunk
UATHelper: Packaging (Mac): Took 2.729641s to run mono, ExitCode=0
UATHelper: Packaging (Mac): Running: mono "/Volumes/UR/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe" Blocks Mac Development -Project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject  /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakefiles  -remoteini="
/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks" -skipdeploy -flushmac -noxge -nocreatestub -NoHotReload -ignorejunk
UATHelper: Packaging (Mac):   Parsing headers for Blocks
UATHelper: Packaging (Mac):     Running UnrealHeaderTool "/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject" "/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Intermediate/Build/Mac/Blocks/Development/Blocks.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended
 -WarningsAsErrors -installed
UATHelper: Packaging (Mac):   Reflection code generated for Blocks in 8.0537416 seconds
UATHelper: Packaging (Mac):   Performing 12 actions (8 in parallel)
UATHelper: Packaging (Mac):   [3/12] Compile SharedPCH.Engine.h
UATHelper: Packaging (Mac):   [2/12] Compile Module.AirSim.gen.cpp
UATHelper: Packaging (Mac):   [1/12] Compile Module.AirSim.cpp
UATHelper: Packaging (Mac):   [4/12] Compile PCH.UELinkerFixups.h
UATHelper: Packaging (Mac):   [5/12] Compile UELinkerFixups.cpp
UATHelper: Packaging (Mac):   [6/12] Compile Blocks.cpp
UATHelper: Packaging (Mac):   [7/12] Link UE4-AirSim.a
UATHelper: Packaging (Mac):   [8/12] Link Blocks
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkNode.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkVehicle.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(AdHocConnection.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkConnection.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkFindSerialPorts.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkMessageBase.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(Semaphore.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(client.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(dispatcher.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(server.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkMessages.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(format.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkNodeImpl.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkVehicleImpl.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(AdHocConnectionImpl.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(MavLinkConnectionImpl.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(client_error.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(server_session.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(response.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(rpc_error.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(SerialPort.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(TcpClientPort.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(UdpClientPort.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(this_server.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(this_handler.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/rpclib/lib/librpc.a(this_session.cc.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(wifi.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   ld: warning: object file (/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Plugins/AirSim/Source/AirLib/deps/MavLinkCom/lib/libMavLinkCom.a(SocketInit.cpp.o)) was built for newer OSX version (10.14) than being linked (10.11)
UATHelper: Packaging (Mac):   Undefined symbols for architecture x86_64:
UATHelper: Packaging (Mac):     "FIOSPlatformAffinity::GetNoAffinityMask()", referenced from:
UATHelper: Packaging (Mac):         FRecordingThread::FRecordingThread() in UE4-AirSim.a(Module.AirSim.cpp.o)
UATHelper: Packaging (Mac):   ld: symbol(s) not found for architecture x86_64
UATHelper: Packaging (Mac):   clang: error: linker command failed with exit code 1 (use -v to see invocation)
UATHelper: Packaging (Mac):   error: /Applications/Xcode9.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Binaries/Mac/Blocks.app/Contents/MacOS/Blocks (No such file or directory)
UATHelper: Packaging (Mac):   error: /Applications/Xcode9.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Binaries/Mac/Blocks.app/Contents/MacOS/Blocks (No such file or directory)
UATHelper: Packaging (Mac):   ERROR: UBT ERROR: Failed to produce item: /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Binaries/Mac/Blocks.app/Contents/MacOS/Blocks
UATHelper: Packaging (Mac):   Total build time: 128.42 seconds (Local executor: 0.00 seconds)
UATHelper: Packaging (Mac): Took 128.89198s to run mono, ExitCode=5
UATHelper: Packaging (Mac): ERROR: Command failed (Result:5): /Volumes/UR/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe Blocks Mac Development -Project=/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject  /Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks/Blocks.uproject -NoUBTMakef
iles  -remoteini="/Users/sreejithkrishnanr/Robotics/tools/AirSim/Unreal/Environments/Blocks" -skipdeploy -flushmac -noxge -nocreatestub -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2019.01.15-00.33.20.txt' 
UATHelper: Packaging (Mac):        (see /Users/sreejithkrishnanr/Library/Logs/Unreal Engine/LocalBuildLogs/UAT_Log.txt for full exception trace)
UATHelper: Packaging (Mac): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Mac): RunUAT ERROR: AutomationTool was unable to run successfully.
PackagingResults: Error: Unknown Error

Ever figure out what was going on?