Closed pedroleal11 closed 1 week ago
when running as dynamic, I get symbol errors from libcef.so (localtime, localtime64, localtime_r, localtime64_r)
These functions are part of the Standard C library (libc). What does ldd show for libcef.so?
This is its output (ldd ./libcef.so):
linux-vdso.so.1 (0x00007ffef855c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ced8b709000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ced8b704000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ced8b6a4000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ced7dec6000)
libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x00007ced7dd95000)
libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x00007ced8b66f000)
libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x00007ced8b645000)
libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007ced7dd55000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007ced7dd07000)
libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007ced8b61b000)
libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007ced7dccf000)
libcups.so.2 => /lib/x86_64-linux-gnu/libcups.so.2 (0x00007ced7dc31000)
libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007ced7dc1b000)
libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007ced7da41000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007ced7d901000)
libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007ced8b614000)
libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007ced8b60f000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007ced7d8ec000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ced7d8e4000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007ced7d8d7000)
libgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007ced7d8c6000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ced7d895000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ced7d86b000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007ced7d824000)
libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007ced7d7bd000)
libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007ced7d695000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007ced7d66b000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007ced7d568000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ced7d481000)
libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007ced7d445000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ced7d425000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ced7d1fc000)
/lib64/ld-linux-x86-64.so.2 (0x00007ced8b718000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007ced7d1ef000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ced7d179000)
libplc4.so => /lib/x86_64-linux-gnu/libplc4.so (0x00007ced7d172000)
libplds4.so => /lib/x86_64-linux-gnu/libplds4.so (0x00007ced7d16b000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007ced7d0a4000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007ced7d050000)
libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007ced7d042000)
libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007ced7d02e000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007ced7ce41000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ced7ce25000)
libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ced7ce1e000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007ced7cdda000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ced7cdae000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ced7cd9f000)
libwayland-server.so.0 => /lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007ced7cd89000)
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007ced7cd76000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007ced7cd70000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ced7cd68000)
libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007ced7cd4a000)
libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007ced7cd3f000)
libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007ced7cc70000)
libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007ced7cbc5000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ced7cb7b000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ced7cab3000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007ced7ca78000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007ced7ca71000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007ced7ca62000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007ced7ca4e000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ced7ca23000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007ced7c954000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007ced7c932000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007ced7c927000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007ced7c7e9000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007ced7c71e000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007ced7c6ef000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007ced7c6e9000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007ced7c6d9000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007ced7c59e000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007ced7c57d000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007ced7c3d3000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007ced7c3bb000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007ced7c375000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007ced7c32b000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007ced7c2a9000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007ced7c272000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007ced7c1db000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ced7c1c3000)
libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007ced7c1b8000)
libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007ced7c191000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ced7c188000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007ced7c17a000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007ced7c154000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007ced7c14b000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ced7c137000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007ced7c12a000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007ced7c107000)
So, both your cef_demo and libcef.so load the same version of libc. What version of libc is your main application loading?
This one: ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35
I don't see that this is a CEF issue. The libcef.so correctly links libc which should provide the specified symbols. I don't know why your application is having difficulty loading them but I suspect it's something to do with your main application's LD environment.
Describe the bug I created a lib that uses CEF as a dependency (via binary), which will be used to create rust bindings. So in order to achieve that, our lib has to be dynamic (which is causing problems) and not static as used in cef-project examples (e.g. minimal). When I build my lib as static, all my test demos work, however when running as dynamic, I get symbol errors from libcef.so (localtime, localtime64, localtime_r, localtime64_r) and consequently, my demos don`t work as expected.
To Reproduce Steps to reproduce the behavior: In CMakeLists.txt I defined my lib: