From aa5e4cc49c15b6af8ac68907459bc5e6812b5253 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 7 Jun 2019 11:36:39 +0200 Subject: [PATCH 1/3] build: don't swallow pkg-config warnings --- configure.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.py b/configure.py index 38ff742e3a76ef..5e3b267c565795 100755 --- a/configure.py +++ b/configure.py @@ -628,18 +628,20 @@ def pkg_config(pkg): Returns ("-l flags", "-I flags", "-L flags", "version") otherwise (None, None, None, None)""" pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') + args = [] # Print pkg-config warnings on first round. retval = () for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L', '--modversion']: + args += [flag, pkg] try: - proc = subprocess.Popen( - shlex.split(pkg_config) + ['--silence-errors', flag, pkg], - stdout=subprocess.PIPE) + proc = subprocess.Popen(shlex.split(pkg_config) + args, + stdout=subprocess.PIPE) val = proc.communicate()[0].strip() except OSError as e: if e.errno != errno.ENOENT: raise e # Unexpected error. return (None, None, None, None) # No pkg-config/pkgconf installed. retval += (val,) + args = ['--silence-errors'] return retval From 1a62bc8056bf813f5825b149ba68696476c39699 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 7 Jun 2019 11:36:39 +0200 Subject: [PATCH 2/3] build: fix icu-i18n pkg-config version check The pkg_config() helper can either return a tuple of None values (no pkg-config installed) and that was what the check was testing for, but it can also return a tuple of empty strings when the package isn't installed. --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 5e3b267c565795..78b52fdf688c21 100755 --- a/configure.py +++ b/configure.py @@ -1348,7 +1348,7 @@ def write_config(data, name): # ICU from pkg-config. o['variables']['v8_enable_i18n_support'] = 1 pkgicu = pkg_config('icu-i18n') - if pkgicu[0] is None: + if not pkgicu[0]: error('''Could not load pkg-config data for "icu-i18n". See above errors or the README.md.''') (libs, cflags, libpath, icuversion) = pkgicu From 167f4b0b2560df6306bb8c8089633e754d7541a5 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 7 Jun 2019 11:36:39 +0200 Subject: [PATCH 3/3] build: unbreak --with-intl=system-icu build Include directories are configured by the tools/icu/icu-*.gyp files. The v8.gyp file doesn't need to add them and in fact the way it did that breaks when building against an external copy of ICU. Fixes: https://github.com/nodejs/node/issues/28052 --- tools/v8_gypfiles/v8.gyp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 58aff1409e25d1..46fb49295f3d82 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -393,13 +393,6 @@ '<(icu_gyp_path):icui18n', '<(icu_gyp_path):icuuc', ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(icu_path)/source/common', - '<(icu_path)/source/i18n', - '<(icu_path)/source/tools/toolutil', - ], - }, }], ], }, # v8_maybe_icu