Building Headless CEF Without DRM/DRI Dependencies

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Building Headless CEF Without DRM/DRI Dependencies

Postby aleitner » Tue Dec 05, 2023 10:26 am

I'm running into a snag building CEF for a headless setup on Linux. Even after setting GN_DEFINES to disable non-headless features, I’ve got pkg-config probing for DRM/DRI during the "Generating CEF project files" step, causing the build to fail due to those missing packages.

My current GN_DEFINES look like this:
Code: Select all
GN_DEFINES="use_ozone=true \
            is_official_build=true \
            is_debug=false \
            use_sysroot=true \
            symbol_level=1 \
            is_cfi=false \
            use_thin_lto=false \
            use_vaapi=false \
            use_allocator=none \
            ozone_auto_platforms=false \
            ozone_platform=headless \
            ozone_platform_headless=true \
            ozone_platform_x11=false \
            ozone_platform_wayland=false \
            ozone_platform_cast=false \
            ozone_platform_drm=false \
            ozone_platform_flatland=false \
            ozone_platform_scenic=false"


I'm aiming for a CEF build that doesn't hinge on any direct display access—no X11, DRM, or the like. Have I missed a flag or step that would cut out these checks completely from the build process?

Appreciate any pointers you or anyone else can offer!
aleitner
Techie
 
Posts: 49
Joined: Fri Jun 16, 2023 12:05 pm

Re: Building Headless CEF Without DRM/DRI Dependencies

Postby magreenblatt » Tue Dec 05, 2023 10:59 am

I suggest familiarizing yourself with Chromium’s GN build system. You will need to identify the target that introduces the pkg-config dependency and see if an option exists for disabling it. https://www.chromium.org/developers/gn- ... iguration/
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building Headless CEF Without DRM/DRI Dependencies

Postby aleitner » Tue Dec 05, 2023 2:45 pm

It seems like if the build automatically detects what's present on the system and includes/excludes optional support depending on what it finds. I removed libdrm from my system along with other video related libraries, and now I am able to build cef without checking for those libraries
aleitner
Techie
 
Posts: 49
Joined: Fri Jun 16, 2023 12:05 pm


Return to CEF Discussion

Who is online

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