-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build node against system libraries with python 2.6 #6711
Labels
build
Issues and PRs related to build files or the CI.
Comments
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
|
thefourtheye
added a commit
to thefourtheye/io.js
that referenced
this issue
May 12, 2016
Python 2.6 does not have `subprocess.check_output`, as it was introduced only in Python 2.7. This patch uses `subprocess.Popen` to get the data written to stdout by the `pkg-config` program. Fixes: nodejs#6711
2 tasks
Yep, works fine, thank you and sorry for late response. |
Filed #6874, thanks for following up. |
bnoordhuis
added a commit
to bnoordhuis/io.js
that referenced
this issue
May 20, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: nodejs#6711 PR-URL: nodejs#6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Fishrock123
pushed a commit
that referenced
this issue
May 23, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
rvagg
pushed a commit
that referenced
this issue
Jun 2, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 11, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 11, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 12, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 12, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 14, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins
pushed a commit
that referenced
this issue
Jul 14, 2016
Commit 2b1c01c ("build: refactor pkg-config for shared libraries") from May 2015 introduced python 2.7-specific code. It mainly affects people building on old RHEL platforms where the system python is 2.6. Seemingly a dying breed because the issue went unnoticed (or at least unreported) for a whole year. Fixes: #6711 PR-URL: #6874 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: