Build Linux binaries
NangiDev opened this issue · 3 comments
NangiDev commented
The steps in the instructions does not build the binaries properly
Building steps
git clone --depth=1 git@github.com:Superwaitsum/GDSercomm.git
cd GDSercomm/
git clone --depth=1 git@github.com:GodotNativeTools/godot_headers.git
git clone --depth=1 git@github.com:ingeniamc/sercomm.git
cd sercomm/
cmake -H. -Bbuild
cmake --build build
cd ..
cp sercomm/build/config.h sercomm/include/public/sercomm/
mkdir lib
cp sercomm/build/libsercomm.so lib/
scons p=platform
cp lib/libsercomm.so bin/
cp bin/libsercomm.so /usr/lib
ldconfig
lddtree output
dev@dev-vm:~/Documents/GDSerCommPlugin/addons/GDSerCommDock/bin$ lddtree libGDSercomm.so
libGDSercomm.so => ./libGDSercomm.so (interpreter => none)
libsercomm.so => /usr/lib/libsercomm.so
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
ld-linux-x86-64.so.2 => /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
Log from Godot
dev@dev-vm:~/Downloads$ ./Godot_v3.2.1-stable_x11.64
Godot Engine v3.2.1.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: llvmpipe (LLVM 9.0, 128 bits)
Running project: /home/dev/Documents/GDSerCommPlugin (::home::dev::Documents::GDSerCommPlugin)
Godot Engine v3.2.1.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: llvmpipe (LLVM 9.0, 128 bits)
ERROR: open_dynamic_library: Can't open dynamic library: /home/dev/Documents/GDSerCommPlugin/addons/GDSerCommDock/bin/libGDSercomm.so. Error: /usr/lib/libsercomm.so: undefined symbol: udev_new
At: drivers/unix/os_unix.cpp:424.
ERROR: get_symbol: No valid library handle, can't get symbol from GDNative object
At: modules/gdnative/gdnative.cpp:483.
ERROR: init_library: No nativescript_init in "res://addons/GDSerCommDock/bin/libGDSercomm.so" found
At: modules/gdnative/nativescript/nativescript.cpp:1506.
SCRIPT ERROR: _ready: Attempt to call function 'new' in base 'NativeScript' on a null instance.
At: res://addons/GDSerCommDock/MenuLogic.gd:5.
NangiDev commented
NangiDev commented
I managed to build sercomm as a static library .a file, but could not get GDSercomm to include the sercomm.a file when building with Scons.
NangiDev commented
Not a prio any more.