Repository navigation
Unable to build node against system libraries with python 2.6 #6711
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
Description
Activity
- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on May 12, 2016 It looks pretty straightforward to fix. Can you try this patch?
diff --git a/configure b/configure index 983ae07..92ca239 100755 --- a/configure +++ b/configure @@ -1,4 +1,6 @@ #!/usr/bin/env python + +import errno import optparse import os import pprint @@ -435,19 +437,16 @@ def b(value): def pkg_config(pkg): pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') - args = '--silence-errors' + args = ['--silence-errors'] retval = () for flag in ['--libs-only-l', '--cflags-only-I', '--libs-only-L']: try: - val = subprocess.check_output([pkg_config, args, flag, pkg]) - # check_output returns bytes - val = val.encode().strip().rstrip('\n') - except subprocess.CalledProcessError: - # most likely missing a .pc-file - val = None - except OSError: - # no pkg-config/pkgconf installed - return (None, None, None) + proc = subprocess.Popen(shlex.split(pkg_config) + args + [flag, pkg], + stdout=subprocess.PIPE) + val = proc.communicate()[0].strip().rstrip('\n') + except OSError, e: + if e.errno != errno.ENOENT: raise e # Unexpected error. + return (None, None, None) # No pkg-config/pkgconf installed. retval += (val,) return retval
- added a commit that references this issue
on May 12, 2016 Yep, works fine, thank you and sorry for late response.
Filed #6874, thanks for following up.
- added a commit that references this issue
on May 23, 2016 - added a commit that references this issue
on Jun 2, 2016 - added 6 commits that reference this issue
on Jul 11, 2016
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
Version: 4.4.2
OS: CentOS6 / RHEL6
When I try to run
./configure --shared-openssl --shared-http-parser --shared-libuv --shared-zlib
it fails with
Traceback (most recent call last):
File "./configure", line 1112, in
configure_library('zlib', output)
File "./configure", line 758, in configure_library
(pkg_libs, pkg_cflags, pkg_libpath) = pkg_config(lib)
File "./configure", line 399, in pkg_config
val = subprocess.check_output([pkg_config, args, flag, pkg])
AttributeError: 'module' object has no attribute 'check_output'
I understand you're probably not going to fix this, but maybe there should be a note in docs that it is not possible to use these options with python 2.6