Error building Chrome: glib.h not found in libsecret/secret.h

75 views
Skip to first unread message

Simon Que

unread,
Sep 8, 2016, 8:54:57 PM9/8/16
to Chromium-dev
I'm building Chrome using GN with the following options:
   is_component_build = false
   use_goma = true
   goma_dir = "/usr/local/ssd/cros/chromium/.cros_cache/common/goma+2/"
   use_ozone = true

I'm getting the following error:
In file included from ../../chrome/browser/password_manager/native_backend_libsecret.cc:5:
In file included from ../../chrome/browser/password_manager/native_backend_libsecret.h:17:
In file included from ../../components/os_crypt/libsecret_util_linux.h:8:
../../third_party/libsecret/libsecret/secret.h:18:10: fatal error: 'glib.h' file not found
#include <glib.h>

See full command and error here: http://pastebin.com/atUJZkCt

I see that this error was fixed in http://crrev.com/1934193002, and the GN file (components/os_crypt/BUILD.gn) has been changed since then. The glib dependency is now behind a "if (use_glib)" conditional.

use_glib is set to false if use_ozone = true (see GN args), which is probably the cause of this error:

But setting use_ozone = true shouldn't break the build.

Simon

Lei Zhang

unread,
Sep 8, 2016, 9:45:22 PM9/8/16
to Simon Que, Chromium-dev
The conditional build rule that decides whether to build
native_backend_libsecret.cc probably needs to add && use_glib, or be
just use_glib. Can you file a bug and CC me/vabr/cfroussios ?
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

Antonio Gomes

unread,
Sep 14, 2016, 2:12:47 PM9/14/16
to Lei Zhang, Simon Que, Chromium-dev
I uploaded a quick CL for it here: https://codereview.chromium.org/2341773004/
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
>



--
--Antonio Gomes
Reply all
Reply to author
Forward
0 new messages