- Official Post
OSError: ./lib/libmoonlight-common.so: undefined symbol: EVP_CIPHER_CTX_new
urgs, souds like openssl is missing somehow
will try if i see some failure at buildtime
OSError: ./lib/libmoonlight-common.so: undefined symbol: EVP_CIPHER_CTX_new
urgs, souds like openssl is missing somehow
will try if i see some failure at buildtime
Hello!
I was debuging addon.py and it's seems like the kodi crash happens when the code reach xbmcplugin.endOfDirectory(addon_handle)
script.moonlight/addon.py at master · dead/script.moonlight · GitHub (line 69)
I don't really understand what's going on, i have debuged and it's connect to moonlight, fetch the apps, posters, etc So maybe that EVP_CIPHER_CTX_new not relevant at all, since when kodi calls addon.py it doesn't throw that error.
Anyway, if the gs.connect_server() called, it works, but at the end, kodi crashes. So I removed from the addon all references to LibGameStream and manually added just one item, that way it works. So maybe it's really some compiling issue.. At this point i am going to give up and live with this workaround.
Seems moonlight-embedded needs to use this patch
--- a/libgamestream/CMakeLists.txt 2017-09-07 20:15:39.000000000 +0200
+++ b/libgamestream/CMakeLists.txt 2017-09-16 09:11:24.090887894 +0200
@@ -27,7 +27,7 @@ set_target_properties(moonlight-common P
target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LIBUUID_INCLUDE_DIRS})
target_include_directories(moonlight-common PRIVATE ../third_party/moonlight-common-c/reedsolomon ${ENET_INCLUDE_DIRS})
target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LIBUUID_LIBRARIES})
-target_link_libraries(moonlight-common ${ENET_LIBRARIES})
+target_link_libraries(moonlight-common ${ENET_LIBRARIES} ${OPENSSL_LIBRARIES})
target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
and PKG_DEPENDS_TARGET for openssl then libmoonlight-common.so has dependencies for required ssl and crypto library
LibreELEC:~/.kodi/addons/script.moonlight # ldd lib/libmoonlight-common.so
linux-vdso.so.1 (0x00007ffea8b3d000)
libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f6e489e6000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f6e4864e000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6e4844a000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f6e48c5a000)
and python is happy loading library
Python 2.7.13 (default, Sep 15 2017, 21:26:44)
[GCC 6.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.cdll.LoadLibrary("lib/libmoonlight-common.so")
<CDLL 'lib/libmoonlight-common.so', handle 1eff390 at 7fc2fea65c50>
>>>
I bet addon will now work as expected. I assume one kodi thread crashed because of missing symbol(s).
Index of /addons/8.2/moonlight/RPi2/
pls try if v2 and/or v3 works
Thanks guys!
I was trying v3 and well, it way much better than was. I was able to open the app list serveral times before it's crashes. I tought this will solve the crash too but it's seems like it's still happens but much rearly. I tired loading the lib with python and now it's successfuly loads. So that OpenSSL problem is gone.
Here is a gdb output as vpeter suggested yesterday when the crash happens: WCYF
@seo and vpeter found the solution on IRC.
Moonlight.py had to be updated to reflect the changes made in moonlight:
diff --git a/script.moonlight/lib/moonlight.py b/script.moonlight/lib/moonlight.py
index 7edae39..154521b 100644
--- a/script.moonlight/lib/moonlight.py
+++ b/script.moonlight/lib/moonlight.py
@@ -10,6 +10,14 @@ GS_WRONG_STATE = -4
GS_IO_ERROR = -5
GS_NOT_SUPPORTED_4K = -6
+class DISPLAY_MODE(ctypes.Structure):
+ pass
+
+DISPLAY_MODE._fields_ = [("height", ctypes.c_int),
+ ("width", ctypes.c_int),
+ ("refresh", ctypes.c_int),
+ ("next", ctypes.POINTER(DISPLAY_MODE))]
+
class SERVER_INFORMATION(ctypes.Structure):
_fields_ = [("address", ctypes.c_char_p),
("serverInfoAppVersion", ctypes.c_char_p),
@@ -20,8 +28,11 @@ class SERVER_DATA(ctypes.Structure):
("gpuType", ctypes.c_char_p),
("paired", ctypes.c_bool),
("supports4K", ctypes.c_bool),
+ ("unsupported", ctypes.c_bool),
("currentGame", ctypes.c_int),
("serverMajorVersion", ctypes.c_int),
+ ("gsVersion", ctypes.c_char_p),
+ ("modes", DISPLAY_MODE),
("serverInfo", SERVER_INFORMATION)]
class APP_LIST(ctypes.Structure):
Display More
The SSL patch still needed.
I will update the addon.py in the next following days to include the new parameters and remove the controller mapping section and check pairing too.
Thank you all the help you guys provided.
CvH: Also script.moonlight/moonlight.py at master · dead/script.moonlight · GitHub should be bumped to .2 and correct library shipped (not all 3). Credit also to @seo
Someone PR the required changes to GitHub pls.
hdkiller pls try script.moonlight-8.2.107.zip at the folder ^^^^
this should work
would pr moonlight: update addon · CvH/LibreELEC.tv@ea610ed · GitHub if it works
It works!! Thanks a lot!
I was trying v3 and well, it way much better than was
did you v2 as well ? did it worked like v3 ?
Honestly i dont remember what is the difference between those?
Your latest one is flawless so far 107
i dont remember what is the difference
could you test if script.moonlight-8.2.107-v2.zip still works ?
Yes I can test later today. I will let you know.
v2 also works.
ok tx
Maybe someone can help here with the moonlight addon.