Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Under Linux, CEF 95 cannot find [swiftshader/]libEGL.so and [swiftshader/]libGLESv2.so via LD_LIBRARY_PATH #3206

Closed
magreenblatt opened this issue Oct 29, 2021 · 4 comments
Labels
bug Bug report

Comments

@magreenblatt
Copy link
Collaborator

Original report by Henri Beauchamp (Bitbucket: Henri Beauchamp).


Up to v94 included, CEF had no trouble finding its libEGL.so/libGLESv2.so libraries when along libcef.so or via the standard LD_LIBRARY_PATH mechanism under Linux.

With CEF95, the libraries (including the the swiftshader/ sub-directory) must be placed in the same directory as the host process of CEF (even though libcef.so itself is elsewhere and properly loaded by this host process via LD_LIBRARY_PATH).

This is extremely annoying and breaks the Linux/POSIX standards.

Please, revert libraries loading to CEF94’s mechanism.

@magreenblatt
Copy link
Collaborator Author

This functionality is implemented in Chromium. The code that we’re currently patching doesn’t appear to have changed.

What command-line flags are you running with? Can you identify where in the code the libraries are being loaded for you?

@magreenblatt
Copy link
Collaborator Author

Original comment by Henri Beauchamp (Bitbucket: Henri Beauchamp).


You can get a package of the Second Life third party viewer I am maintaining from here: http://sldev.free.fr/

CEF is used as a library for the web plugin (Dullahan) in Second Life viewers. The web plugin is started as follow:

  • Like any viewer plugin, an SLPlugin executable is launched by the viewer and gets passed the plugin to load (e.g. CEF, gstreamer or VLC).
  • The SLPlugin executable loads the plugin shared object (media_plugin_cef.so for Dullahan under Linux).
  • The shared object (which is linked at build time against static libraries: libcef_dll_wrapper.a and libdullahan.a) instantiates Dullahan.
  • Dullahan’s instantiation causes the dullahan_host executable to be launched; it is itself linked against libcef.so, which is then loaded via the standard shared ELF library loading mechanism, involving the Linux' loader default configuration and the LD_LIBRARY_PATH env variable override: in the case of the viewer, LD_LIBRARY_PATH is used (via the viewer wrapper/starter script) to point to the installation sub-directory where the libraries bundled with the viewer can be found, among which are all the CEF libraries.

I use the following layout for CEF libraries and files:

  • All libraries are in /lib/ (libcef.so and [swiftshader/]libEGL.so and [swiftshader/]libGLESv2.so): this directory is added as the first entry in LD_LIBRARY_PATH by the wrapper/starter script.
  • The SLPlugin executable, the shared plugin objects and the dullahan_host executable are in /bin/llplugin/. The corresponding full path for dullahan_host is also passed to CEF via the browser_subprocess_path setting by Dullhahan.
  • The CEF locales/ directory, the icudtl.dat and *.pak files are also in /lib/ and the corresponding /lib/locales path is passed to CEF by Dullahan via the locales_dir_path setting.

This worked perfectly with CEF v80 (or so) to v94.

With v95, CEF complains that it cannot load the /bin/llplugin/[swiftshader/]libEGL.so (and libGLESv2.so) libraries, i.e., instead of looking for them in the directory from which libcef.so was loaded, or from LD_LIBRARY_PATH, it looks in the host executable directory… Moving the libraries there (or symlinking them), CEF v95 starts fine.

@magreenblatt
Copy link
Collaborator Author

Duplicate of #3213.

@magreenblatt
Copy link
Collaborator Author

  • changed state from "new" to "duplicate"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant