Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

Static build kurento-media-server problems #113

Closed fengcc closed 4 years ago

fengcc commented 8 years ago

I have a big problem that confused me many weeks. For project needs, I have to rebuild the kurento-media-server with statically libraries. I rebuild all dependent libraries statically and modified some cmakelist.txt, and finally I rebuild it successful. But when I run it use command /usr/bin/kurento-media-server -d . an error occurred and show :

$ /usr/bin/kurento-media-server -d .
(process:72544): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(process:72544): GLib-CRITICAL **: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
**
GLib:ERROR:gquark.c:60:g_quark_init: assertion failed: (quark_seq_id == 0)
Aborted

I use gdb to debug it :

(gdb) run -d .
Starting program: /usr/bin/kurento-media-server -d .
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(process:72889): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(process:72889): GLib-CRITICAL **: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
**
GLib:ERROR:gquark.c:60:g_quark_init: assertion failed: (quark_seq_id == 0)

Program received signal SIGABRT, Aborted.
0x00007ffff73451c8 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff73451c8 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff734664a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x0000000000ed27e7 in g_assertion_message ()
#3  0x0000000000ed2863 in g_assertion_message_expr ()
#4  0x0000000000ebbb48 in g_quark_init ()
#5  0x0000000000ea7206 in glib_init ()
#6  0x0000000000e709d7 in gobject_init ()
#7  0x0000000000e70bed in gobject_init_ctor ()
#8  0x000000000108921d in __libc_csu_init ()
#9  0x00007ffff73326bf in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000b3e679 in _start ()
(gdb) 

and there are the rest of dynamic libraries :

$ ldd /usr/bin/kurento-media-server 
    linux-vdso.so.1 (0x00007ffe4e37d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7667912000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f766770e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7667409000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7667068000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f7667b2f000)

This is the final linker command that I copied from console output, it's different from the original because I modified the CMakeList.txt :

$ /usr/bin/c++    -g -Wall -Werror -std=c++11 -static-libgcc -static-libstdc++ -Wno-deprecated-declarations -DGST_DISABLE_DEPRECATED -fPIC    CMakeFiles/kurento-media-server.dir/main.cpp.o CMakeFiles/kurento-media-server.dir/version.cpp.o CMakeFiles/kurento-media-server.dir/ServerMethods.cpp.o CMakeFiles/kurento-media-server.dir/ResourceManager.cpp.o CMakeFiles/kurento-media-server.dir/RequestCache.cpp.o CMakeFiles/kurento-media-server.dir/CacheEntry.cpp.o CMakeFiles/kurento-media-server.dir/logging.cpp.o CMakeFiles/kurento-media-server.dir/modules.cpp.o CMakeFiles/kurento-media-server.dir/loadConfig.cpp.o CMakeFiles/kurento-media-server.dir/death_handler.cpp.o  -o kurento-media-server -rdynamic /usr/local/lib/libboost_log.a /usr/local/lib/libboost_thread.a /usr/local/lib/libboost_unit_test_framework.a /usr/local/lib/libboost_program_options.a /usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_system.a /usr/local/lib/libboost_regex.a transport/libtransport.a -lpthread -ldl -Wl,-Bstatic -lkmselementsinterface -lkmscoreimpl -lkmscoreinterface -lkmsgstcommons -lkmsutils -lkmsrefstruct -lkmssdpagent -lsdputils -ljsonrpc -lkmselementsinterface -lkmscoreimpl -lkmscoreinterface -lkmsgstcommons -lkmsutils -lkmsrefstruct -lkmssdpagent -lsdputils -ljsonrpc -Wl,-Bdynamic /usr/local/lib/libboost_log.a /usr/local/lib/libboost_thread.a /usr/local/lib/libboost_unit_test_framework.a /usr/local/lib/libboost_program_options.a /usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_system.a /usr/local/lib/libboost_regex.a transport/websocket/libwebsocketTransport.a -Wl,-Bstatic -lkmsjsoncpp -lgstvideo-1.5 -lgstaudio-1.5 -lgstsdp-1.5 -lgstrtp-1.5 -lgsttag-1.5 -lgstbase-1.5 -lgstpbutils-1.5 -lgstreamer-1.5 -lgthread-2.0 -lsigc-2.0 -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lssl -lcrypto -lffi -lstdc++ -lrt -luuid -lz -lpcre -lresolv -lm -Wl,-Bdynamic

KMS Version:

(I show this messages use dynamic build version, my static version show the same error as mentioned above when I run /usr/bin/kurento-media-server -v)

Version: 6.5.1~6.gd13f82e Found modules: Module: 'core' version '6.5.1~7.g57c337d' Module: 'elements' version '6.5.1~7.g57c337d' Module: 'filters' version '6.5.1~1.ge5b1703'

Other libraries versions:

Because I build and install libraries from source code, dpkg -l | egrep -i "kurento|gst.*1.5|nice" won't show libraries informations. I list all my source code below :

Platform information

$ uname -a
Linux nts30 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt25-2~bpo70+1 (2016-04-12) x86_64 GNU/Linux

Can someone help me fix this runtime error ? Thank you for all your assistance. (My English is very poor, I am very sorry if I have any English grammar error.)

j1elo commented 4 years ago

Closing old issues. I don't know if this is still a problem with newer versions of Kurento (current version: 6.14). Please comment if you want to add more information.