fatal error: 'curl/curl.h' file not found building M65 with sysroot

141 views
Skip to first unread message

Marshall Greenblatt

unread,
Mar 7, 2018, 8:22:42 PM3/7/18
to Scott Graham, chromium-packagers
Hi Scott,

I'm building a Chromium-based application at M65 on an Ubuntu 14.04 64-bit host machine with the following GN args:

dcheck_always_on=true
enable_linux_installer=false
is_component_build=false
is_debug=false
is_official_build=true
target_cpu="x64"
use_allocator="none"
use_gtk3=false
use_sysroot=true

In my application target I added a dependency on "//third_party/crashpad/crashpad/client" (because I wanted to use the Annotation::kValueMaxSize/kNameMaxLength values) and I got the following build error:

FAILED: obj/third_party/crashpad/crashpad/util/util/http_transport_libcurl.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/crashpad/crashpad/util/util/http_transport_libcurl.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -Igen/third_party/crashpad/crashpad -I../.. -Igen -I../../third_party/crashpad/crashpad -I../../build/linux/debian_stretch_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_stretch_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/crashpad/crashpad/compat/linux -I../../third_party/crashpad/crashpad/compat/non_win -I../../third_party/zlib -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -flto=thin -fwhole-program-vtables -m64 -march=x86-64 -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fsanitize=cfi-vcall -fsanitize-blacklist=../../tools/cfi/blacklist.txt -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_stretch_amd64-sysroot -fvisibility-inlines-hidden -c ../../third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc -o obj/third_party/crashpad/crashpad/util/util/http_transport_libcurl.o
../../third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc:17:10: fatal error: 'curl/curl.h' file not found
#include <curl/curl.h>
^~~~~~~~~~~~~
1 error generated.

It appears that the dependency on curl was added in https://crrev.com/ec25b510 (did not exist in M64) and that this is the only usage of "#include <curl/curl.h>" in the Chromium source tree. It looks like curl includes aren't included in the "debian_stretch_amd64-sysroot" ("src/build/linux/debian_stretch_amd64-sysroot/usr/include" directory) but I do have the "libcurl4-gnutls-dev" package installed on my host.

Will the curl headers eventually be added in "debian_stretch_amd64-sysroot", presumably after Chromium moves to Crashpad on Linux? Or, is there some other way that curl should be configured in [1] (like by calling `curl-config`)? Or, perhaps we should share the version from "third_party/breakpad/breakpad/src/third_party/curl/curl.h" (maybe move it to a common location) instead of requiring a system install?

Thanks,
Marshall

Scott Graham

unread,
Apr 3, 2018, 2:29:42 PM4/3/18
to Marshall Greenblatt, chromium-packagers, Crashpad-dev
Hi Marshall, sorry for the delay, I've been OOO.

I wrestled with this for a while on the Crashpad side for bots too, in https://bugs.chromium.org/p/crashpad/issues/detail?id=220#c11.

I think the bug here is that that file (third_party/crashpad/crashpad/util/util/http_transport_libcurl.o) is being built at all; it shouldn't be yet for Linux builds. And when it is built, it won't be using libcurl to do uploading.

Reply all
Reply to author
Forward
0 new messages