Open crafteke opened 3 years ago
github releases only have binaries for windows, all other platforms need to include the plugin source and then recompile plugin. Marketplace releases should have binaries for all the platforms that they support. This is largely a maintenance mitigation effort, it takes time to compile and make a release for each new engine version and this approach is the most sane one I've come up with.
Makes sense. Any idea why UE cannot recompile when I include source?
If you cloned, make sure you clone with recurse submodules as the repo uses submodules, see https://github.com/getnamo/socketio-client-ue4/#via-git-clone
If you used a release it should have all the required files though and points to something else. Are you placing plugin in project or engine? I recommend placing in project
Hello,
I'm back on this, and have still no idea how to compile on linux... I git cloned with submodule, into Plugins folder of the project. I tried the following compile script:
#!/bin/bash
UNREAL_PATH=/home/hachpai/epic/UnrealEngine-4.26;
RANDNUM=$(( ( RANDOM % 1000 ) + 1000 ));
CURR_DIR=`pwd`;
PROJ_NAME=$(basename ./*.uproject .uproject);
PROJ_NAME_MODULE="${PROJ_NAME},${RANDNUM}";
${UNREAL_PATH}/Engine/Build/BatchFiles/Linux/RunMono.sh ${UNREAL_PATH}/Engine/Binaries/DotNET/UnrealBuildTool.exe -ModuleWithSuffix=$PROJ_NAME_MODULE Linux Development -TargetType=Editor -Project="${CURR_DIR}/${PROJ_NAME}.uproject" -canskiplink "${CURR_DIR}/${PROJ_NAME}.uproject" -progress
And it gave me:
Running Mono...
Fixing inconsistent case in filenames.
Setting up Mono
~/epic/UnrealEngine-4.26/Engine ~/Documents/Unreal Projects/socketiotest
Using 'git status' to determine working set for adaptive non-unity build (/home/hachpai/epic/UnrealEngine-4.26).
Creating makefile for UE4Editor (command line arguments changed)
@progress push 5%
@progress 'Generating code...' 0%
@progress 'Generating code...' 67%
@progress 'Generating code...' 100%
@progress pop
------- Build details --------
Using toolchain located at '/home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '10.0.1' (string), 10 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).
------------------------------
Building UE4Editor...
Performing 7 actions (12 in parallel)
@progress 'Compiling C++ source code...' 0%
[1/7] Link (lld) libUE4Editor-CoreUtility-0001.so
[2/7] Compile Module.SocketIOLib.cpp
@progress 'Compiling C++ source code...' 12%
[3/7] Link (lld) libUE4Editor-SIOJson-0001.so
ld.lld: error: unable to find library -lUE4Editor-CoreUtility
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
@progress 'Compiling C++ source code...' 25%
@progress 'Compiling C++ source code...' 38%
In file included from /home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/SocketIOLib/Module.SocketIOLib.cpp:2:
In file included from /home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/internal/sio_client_impl.cpp:28:
/home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/internal/sio_client_impl.h:207:5: error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef]
#if SIO_TLS
^
In file included from /home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/SocketIOLib/Module.SocketIOLib.cpp:2:
/home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/internal/sio_client_impl.cpp:59:9: error: field 'm_reconn_made' will be initialized after field 'm_path' [-Werror,-Wreorder-ctor]
m_reconn_made(0),
^
/home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/internal/sio_client_impl.cpp:77:5: error: 'SIO_TLS' is not defined, evaluates to 0 [-Werror,-Wundef]
#if SIO_TLS
^
/home/hachpai/Documents/Unreal Projects/socketiotest/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]
#if SIO_TLS
^
/home/hachpai/Documents/Unreal Projects/socketiotest/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]
#if SIO_TLS
^
In file included from /home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/SocketIOLib/Module.SocketIOLib.cpp:5:
/home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/sio_socket.cpp:34:5: error: 'DEBUG' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEBUG || _DEBUG
^
/home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Source/SocketIOLib/Private/sio_socket.cpp:34:14: error: '_DEBUG' is not defined, evaluates to 0 [-Werror,-Wundef]
#if DEBUG || _DEBUG
^
7 errors generated.
@progress 'Compiling C++ source code...' 75%
@progress 'Compiling C++ source code...' 88%
I just also noticed in the loginit:
LogInit: Warning: Incompatible or missing module: SocketIOClient
LogInit: Warning: Incompatible or missing module: SIOJson
LogInit: Warning: Incompatible or missing module: SocketIOLib
LogInit: Warning: Incompatible or missing module: CoreUtility
LogInit: Warning: Incompatible or missing module: SIOJEditorPlugin
I think the git clone was ok:
hachpai@crftk42:~/Documents/Unreal Projects/socketiotest$ ls Plugins/socketio-client-ue4/Source/
CoreUtility SIOJEditorPlugin SIOJson SocketIOClient SocketIOLib ThirdParty
If I try to build in unreal ide, I got those logs:
Running /home/hachpai/epic/UnrealEngine-4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project="/home/hachpai/Documents/Unreal Projects/socketiotest/socketiotest.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Running Mono...
Fixing inconsistent case in filenames.
Setting up Mono
~/epic/UnrealEngine-4.26/Engine ~/epic/UnrealEngine-4.26/Engine/Binaries/Linux
Using 'git status' to determine working set for adaptive non-unity build (/home/hachpai/epic/UnrealEngine-4.26).
Creating makefile for UE4Editor (command line arguments changed)
@progress push 5%
@progress pop
------- Build details --------
Using toolchain located at '/home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '10.0.1' (string), 10 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /home/hachpai/epic/UnrealEngine-4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink circularly dependent libraries (no FixDeps).
------------------------------
Deleted hot-reload file: /home/hachpai/Documents/Unreal Projects/socketiotest/Plugins/socketio-client-ue4/Binaries/Linux/libUE4Editor-CoreUtility-0001.so
ERROR: Building would modify the following engine files:
/home/hachpai/epic/UnrealEngine-4.26/Engine/Binaries/Linux/Android/UE4Editor.modules
/home/hachpai/epic/UnrealEngine-4.26/Engine/Binaries/Linux/Linux/UE4Editor.modules
/home/hachpai/epic/UnrealEngine-4.26/Engine/Binaries/Linux/UE4Editor.modules
Thanks for your help!
I got the 1.60 source working on our Linux source build (UE4.25 in our instance) by fixing up the mixture of #if checks, eg replacing all occurrences of #if <define>
with #if defined(<define>)
. I had to do this in the following files:
#if defined(SIO_TLS)
] *1.#if defined(DEBUG) || defined(_DEBUG)
]1. The same goes for the #if PLATFORM_WINDOWS
checks - but this seems to be set 'on' in Linux builds too (and so 'fixing' the line, then breaks the Linux build as it tries to include Windows files).. so for the time being I just local #undef it in this file)
2. I also had to fixup the initialisation order of client_impl::client_impl()
[line 51], moving the m_path("socket.io") line to be first in this init list
To remove the editor/build warnings when using the V1.60 sourced plugin in a UE4.25 build (rather than UE4.26), I just changed the SocketIOClient.uplugin [line 5] file's "EngineVersion"
entry to "4.25.0"
(instead of "4.26.0")
When importing the plugin in linux, the editor launch fails.
The dialog box talk about building from IDE, any idea? Why the release does not include the binaries for linux?
Thanks