getnamo / SocketIOClient-Unreal

Socket.IO client plugin for the Unreal Engine.
Other
888 stars 239 forks source link

Packaging Fails when packaging for Linux #271

Open KarthikHebbarMN opened 3 years ago

KarthikHebbarMN commented 3 years ago

error.txt

Successfully packages for Windows. But fails for Linux. The Environemnt Set up

  1. BP project with C++ support as some of the logic is in C++.
  2. Installed Plugin by downloading from Github. (using version 1.6.0)
  3. Running on UE 4.26
  4. Windows 10 OS.
  5. Have all C++ SDK's installed.

Also tried using a older version of the Plugin (1.5.5), I faced the issue of the socket not at all connecting saying SockrtIO Invalid failed to connect. Hence reverted back to lastest version.

if SIO_TLS

UATHelper: Packaging (Linux): ^ PackagingResults: Error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef] UATHelper: Packaging (Linux): D:\Work\Projects\Unreal Projects\MVP_Project_Updated\Plugins\Plugins\socketio-client-ue4\Source\SocketIOLib\Private\internal\sio_client_impl.cpp(252,5): error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef] PackagingResults: Error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef] UATHelper: Packaging (Linux): #if SIO_TLS UATHelper: Packaging (Linux): ^ UATHelper: Packaging (Linux): D:\Work\Projects\Unreal Projects\MVP_Project_Updated\Plugins\Plugins\socketio-client-ue4\Source\SocketIOLib\Private\internal\sio_client_impl.cpp(629,5): error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef] UATHelper: Packaging (Linux): #if SIO_TLS UATHelper: Packaging (Linux): ^ UATHelper: Packaging (Linux): In file included from D:/Work/Projects/Unreal Projects/MVP_Project_Updated/Plugins/Plugins/socketio-client-ue4/Intermediate/Build/Linux/B4D820EA/UE4/Development/SocketIOLib/Module.SocketIOLib.cpp:5: UATHelper: Packaging (Linux): D:\Work\Projects\Unreal Projects\MVP_Project_Updated\Plugins\Plugins\socketio-client-ue4\Source\SocketIOLib\Private\sio_socket.cpp(34,5): error: 'DEBUG' is not defined, evaluates to 0 [-Werror,-Wundef] UATHelper: Packaging (Linux): #if DEBUG || _DEBUG UATHelper: Packaging (Linux): ^ UATHelper: Packaging (Linux): D:\Work\Projects\Unreal Projects\MVP_Project_Updated\Plugins\Plugins\socketio-client-ue4\Source\SocketIOLib\Private\sio_socket.cpp(34,14): error: '_DEBUG' is not defined, evaluates to 0 [-Werror,-Wundef] PackagingResults: Error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef] UATHelper: Packaging (Linux): #if DEBUG || _DEBUG UATHelper: Packaging (Linux): ^

Any pointers are greatly appreciated.

Thanks

getnamo commented 3 years ago

v 1.5.5 requires an older socket.io server (v1 or v2)

For newer version, looks like linux crosscompiler needs SIO_TLS and _DEBUG explicitly defined at some point in the project

KarthikHebbarMN commented 3 years ago

Thanks for the answer. Looking forward to the next patch release :). Meanwhile, anything I can add to make it work and raise a PR?

getnamo commented 3 years ago

largely an issue of ensuring SIO_TLS is defined with by using #Ifdef wrappers in addition to #if for each type. The correct combination that passes all platform compilers is not always clear, recent changes broke that

fcallet commented 3 years ago

Hello, same problem here, I cannot connect to my python socket.io server with the version 1.5.5 of the plugin. I am obliged to do it with version 1.6.0 as it is the latest version with support for Socket.IO v3&v4 servers. It is not possible to use Python socket.io servers v1 or 2 (https://python-socketio.readthedocs.io/en/latest/intro.html#version-compatibility) so I'm obliged to exclude the plugin from the compilation of my ue4 LinuxServer. Will this issue be solved soon ?

Edit : I noticed that the packaging for Linux doesn't fail with the early v1.7.0 release version of socket.io plugin, even with UE 4.26. I am now using this version as it works for me