How to build VA binaries for the Plugin
This is a short HowTo for updating the Linux VA binaries (i.e., libVABase.so and libVANet.so).
- Create a folder on Linux filesystem (e.g. VA_build)
- Clone/copy the CMakeList.txt of VA into it.
- Copy/clone VANet and VABase in the appropriate versions to this folder (e.g., both at tag v2020.a)
* best useclang
, so e.g. domodule load clang
(and potentiallymodule unload gcc
before) - To not have .so and .so.1.0.0 and .so.1 files, edit
VABase/CMakeLists.txt
andVANet/CMakeLists.txt
and addset_target_properties(VABase PROPERTIES NO_SONAME 1)
andset_target_properties(VANet PROPERTIES NO_SONAME 1)
respectively mkdir build
cd build
ccmake ..
- hit
c
for configure (ignore errors for now) - deactivate
ITA_VA_WITH_BINDING_CS
- toogle to advanced with
t
and then add toCMAKE_CXX_FLAGS
:-std=c++11 -nostdinc++ -I "/home/av006de/Unreal/UnrealEngine_4_26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1/"
ODER DOCH-static-libstdc++
(or the respective Unreal Version you are building for). This way it links against the standard runtime library shipped with Unreal. - hit
g
for generate make -j
- Now in the build/lib folder the libraries can be found, copy those to
unreal-va-plugin\Source\VALibrary\lib
.
You will have to set the ViSTA build tools to be setup correctly:
- clone VistaCMakeCommon
export VISTA_CMAKE_COMMON=[path to cloned VistaCMakeCommon]
- also clone ViSTA and build it, of it VistaBase, VistaAspects and VistaInterProcComm is needed.
Troubleshoots:
- If some
auto```constructs generate compiler warnings: add
-std=c++11to
CMAKE_CXX_FLAGS`` - If string symbols are undefined, link against Unreal's stdlib: add
-nostdinc++ -I "/home/av006de/Unreal/UnrealEngine_4_26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1/"
toCMAKE_CXX_FLAGS
- If
libstdc++.so
cannot be loaded at cooking: add-static-libstdc++
toCMAKE_CXX_FLAGS
- If
dlopen failed: ../lib/libVABase.so
occurs you need to:- Check with
readelf -d libVANet.so | grep NEEDED
whetherlibVABase.so
is not linked directly intolibVANet.so
but as../lib/libVABase.so
which cannot be found for packaged builds. - To change that on Windows, e.g., get https://github.com/david942j/patchelf.rb for Ruby
patchelf --replace-needed "../lib/libVABase.so","libVABase.so" libVANet.so
- Check with