Does gio support staticly linking fully?

I’m working with gio library, use it to monitor and read file changes.For running in different system, such as centos6 and centos7,etc,I want to build my program with gio staticly.But appears not work:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f58af7fe700 (LWP 199793)]
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: debuginfo-install gamin-0.1.10-9.el6.x86_64 glib2-2.28.8-10.el6.x86_64 glibc-2.12-1.212.el6_10.3.x86_64 libselinux-2.0.94-7.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007f58a43ddb6d in __pthread_initialize_minimal_internal () from /lib64/libpthread.so.0
#2  0x00007f58a43dd309 in _init () from /lib64/libpthread.so.0
#3  0x00007f5800000000 in ?? ()
#4  0x00000000009f355e in _dl_init ()
#5  0x00000000009d9d3e in dl_open_worker ()
#6  0x00000000009d7e79 in _dl_catch_error ()
#7  0x00000000009d952d in _dl_open ()
#8  0x000000000097195c in dlopen_doit ()
#9  0x00000000009d7e79 in _dl_catch_error ()
#10 0x0000000000971b80 in _dlerror_run ()
#11 0x00000000009718de in __dlopen ()
#12 0x0000000000515d50 in g_module_open ()
#13 0x0000000000494a17 in g_io_module_load_module ()
#14 0x0000000000542f91 in g_type_module_use ()
#15 0x000000000049404d in g_io_extension_point_get_extensions ()
#16 0x00000000004959f8 in _g_io_module_get_default_type ()
#17 0x0000000000474258 in g_local_file_monitor_new ()
#18 0x00000000004749d6 in g_local_file_monitor_new_for_path ()
#19 0x000000000041bbb6 in g_file_monitor_file ()
#20 0x0000000000403f05 in im_file_run ()
#21 0x000000000040906a in log_collect_run ()
#22 0x000000000040972c in work_pool_func ()
#23 0x00000000005a7609 in g_thread_pool_thread_proxy ()
#24 0x00000000005a671d in g_thread_proxy ()
#25 0x0000000000937844 in start_thread ()
#26 0x00000000009c3979 in clone ()

My environment is in centos6 docker,glib version is 2.68.0, and use meson _build --default-library=both --buildtype=release --prefix=${PREFIX_DIR} -Dtests=false to compile glib.

I have tried many times to build my program and doesn’t work,could anyone help me?

Or may be GIO library dlopen mechanism which even I static link the library, it will call other library?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.