Invalid file descriptor to ICU data received

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Invalid file descriptor to ICU data received

Postby serge » Fri Sep 02, 2022 7:59 am

Hello

I have a program that works fine from CEF #4606 branch, in ubuntu:20.04 container.
Now, I had to migrate to ubuntu:22.04, and so I picked #5112 branch, and compiled it on 22.04.

After the compilation, I run my program and get this error right away, in CefInitialize:

[0902/142514.664356:ERROR:icu_util.cc(225)] Invalid file descriptor to ICU data received.

I ensured that the program is running from the folder it is compiled in:

(cd /home/user/myprogram/build/bin/Debug && pwd && ./myprogram --no-sandbox --gpu-disabled ...)

And the folder contains all CEF resources:

Code: Select all
chrome-sandbox          libXfixes.so.3          libbrotlidec.so.1  libexpat.so.1        libgnutls.so.30      liblz4.so.1        libpcre2-8.so.0   libthai.so.0            locales
chrome_100_percent.pak  libXi.so.6              libbsd.so.0        libffi.so.8          libgobject-2.0.so.0  liblzma.so.5       libpixman-1.so.0  libunistring.so.2       resources.pak
chrome_200_percent.pak  libXrandr.so.2          libc.so.6          libfontconfig.so.1   libgpg-error.so.0    libm.so.6          libplc4.so        libuuid.so.1            myprogram
icudtl.dat              libXrender.so.1         libcairo.so.2      libfreetype.so.6     libgraphite2.so.3    libmd.so.0         libplds4.so       libvk_swiftshader.so    snapshot_blob.bin
libEGL.so               libasound.so.2          libcap.so.2        libfribidi.so.0      libgssapi_krb5.so.2  libmount.so.1      libpng16.so.16    libvulkan.so.1          v8_context_snapshot.bin
libGLESv2.so            libatk-1.0.so.0         libcef.so          libgbm.so.1          libharfbuzz.so.0     libnettle.so.8     libpthread.so.0   libwayland-server.so.0  vk_swiftshader_icd.json
libX11.so.6             libatk-bridge-2.0.so.0  libcom_err.so.2    libgcc_s.so.1        libhogweed.so.6      libnspr4.so        libresolv.so.2    libxcb-render.so.0
libXau.so.6             libatspi.so.0           libcups.so.2       libgcrypt.so.20      libidn2.so.0         libnss3.so         libselinux.so.1   libxcb-shm.so.0
libXcomposite.so.1      libavahi-client.so.3    libdatrie.so.1     libgio-2.0.so.0      libk5crypto.so.3     libnssutil3.so     libsmime3.so      libxcb.so.1
libXdamage.so.1         libavahi-common.so.3    libdbus-1.so.3     libglib-2.0.so.0     libkeyutils.so.1     libp11-kit.so.0    libstdc++.so.6    libxkbcommon.so.0
libXdmcp.so.6           libblkid.so.1           libdl.so.2         libgmodule-2.0.so.0  libkrb5.so.3         libpango-1.0.so.0  libsystemd.so.0   libz.so.1
libXext.so.6            libbrotlicommon.so.1    libdrm.so.2        libgmp.so.10         libkrb5support.so.0  libpcre.so.3       libtasn1.so.6     libzstd.so.1


All files come from #5112 distribution, via cmake copy, I do not have #4606 branch references on the system.

Is there anything else I can try?

Thanks
Serge
serge
Newbie
 
Posts: 8
Joined: Tue Feb 15, 2022 9:20 am

Re: Invalid file descriptor to ICU data received

Postby magreenblatt » Fri Sep 02, 2022 10:44 am

Does the icudtl.dat build type (Debug vs Release) match the libcef.so build type?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Invalid file descriptor to ICU data received

Postby serge » Mon Sep 05, 2022 2:47 am

Hello Marshall

This is my CMakeLists.txt

Code: Select all
...

if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
    set (LIBCEF "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/Release/libcef.so")
    set (CEF_BIN "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/Release")
else()
    set (LIBCEF "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/Debug/libcef.so")
    set (CEF_BIN "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/Debug")
endif()

set (CEF_RESOURCES "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/Resources")
set (LIBCEF_DLL_WRAPPER "${EXTERNAL_FOLDER}/cef/chromium/src/cef/binary_distrib/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64/build/libcef_dll_wrapper/libcef_dll_wrapper.a")

target_link_libraries(myprogram
    pthread
    ${LIBCEF}
    ${LIBCEF_DLL_WRAPPER}
)

...

set (OUT_BIN_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/myprogram)
set (OUT_BIN_FLDR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

#copy all shared libs
set (EXECUTE_COMMAND_0 "ldd ${OUT_BIN_PATH} | grep '=> /' | awk '{print $3}' | xargs -I '{}' /bin/cp -rfuv -L '{}' ${OUT_BIN_FLDR}")

add_custom_command(TARGET myprogram POST_BUILD
    COMMAND bash "-c" "${EXECUTE_COMMAND_0}"
    VERBATIM
    COMMAND bash "-c" "/bin/cp -r ${CEF_RESOURCES}/* ${OUT_BIN_FLDR}"
    COMMAND bash "-c" "/bin/cp -r ${CEF_BIN}/* ${OUT_BIN_FLDR}"
 )

/Resources folder also contains icudtl.dat, but it is overwritten by a copy from [Release/Debug]/libcef.so location.
The reason I included /Resources is because it also contains /locales and *.pak files, which all test applications also carry along.
The only location of libcef_dll_wrapper.a is in /build/libcef_dll_wrapper folder (no Release or Debug).

I also tried to copy all files from [Release/Debug] of one compiled CEF test application. It did not help unfortunately.

Thanks
Serge
serge
Newbie
 
Posts: 8
Joined: Tue Feb 15, 2022 9:20 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 56 guests