Skip to content

iojs 2.1.0 & pkg-config output issues #1787

Closed
@alferpal

Description

@alferpal

Platform: Arch Linux which as some of you will know defaults to python 3.

To solve that, before using configure we use this in our packages to change references from python to python2

  find -type f -exec sed \
    -e 's_^#!/usr/bin/env python$_&2_' \
    -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \
    -e 's_^#!/usr/bin/python$_&2_' \
    -e 's_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\
    -e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\
    -e "s_'python'_'python2'_" -i {} \;
  find test/ -type f -exec sed 's_python _python2 _' -i {} \;

./configure \
    --prefix=/usr \
    --shared-openssl \
    --shared-zlib \
    --with-intl=system-icu \
    --without-npm 
  make

This used to work with 2.0.x and now this is thrown:

creating  ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': [ '-L/usr/lib',
                                      '-lz',
                                      '-lssl',
                                      '-lcrypto',
                                      '',
                                      '-licui18n',
                                      '-licuuc',
                                      '-licudata']},
  'variables': { 'host_arch': 'x64',
                 'icu_gyp_path': 'tools/icu/icu-system.gyp',
                 'icu_small': 'false',
                 'node_install_npm': 'false',
                 'node_prefix': '/usr',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'true',
                 'node_shared_zlib': 'true',
                 'node_tag': '',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_lttng': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'openssl_no_asm': 0,
                 'python2': '/usr/bin/python2',
                 'target_arch': 'x64',
                 'uv_parent_path': '/deps/uv/',
                 'uv_use_dtrace': 'false',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 1,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_random_seed': 0,
                 'v8_use_snapshot': 1,
                 'want_separate_host_toolset': 0}}
creating  ./config.gypi
creating  ./config.mk
Traceback (most recent call last):
  File "tools/gyp_node.py", line 57, in <module>
    run_gyp(gyp_args)
  File "tools/gyp_node.py", line 18, in run_gyp
    rc = gyp.main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 526, in main
    return gyp_main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 502, in gyp_main
    params, options.check, options.circular_check)
  File "./tools/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'], params['root_targets'])
  File "./tools/gyp/pylib/gyp/input.py", line 2736, in Load
    variables, includes, depth, check, True)
  File "./tools/gyp/pylib/gyp/input.py", line 386, in LoadTargetBuildFile
    includes, True, check)
  File "./tools/gyp/pylib/gyp/input.py", line 258, in LoadOneBuildFile
    aux_data, includes, check)
  File "./tools/gyp/pylib/gyp/input.py", line 296, in LoadBuildFileIncludesIntoDict
    subdict_path, include)
  File "./tools/gyp/pylib/gyp/input.py", line 2131, in MergeDicts
    MergeDicts(to[k], v, to_file, fro_file)
  File "./tools/gyp/pylib/gyp/input.py", line 2191, in MergeDicts
    MergeLists(to[list_base], v, to_file, fro_file, is_paths, append)
  File "./tools/gyp/pylib/gyp/input.py", line 2048, in MergeLists
    to_item = MakePathRelative(to_file, fro_file, item)
  File "./tools/gyp/pylib/gyp/input.py", line 2023, in MakePathRelative
    if item[-1] == '/':
IndexError: string index out of range while reading includes of /dev/shm/iojs/src/iojs-v2.1.0/node.gyp while trying to load /dev/shm/iojs/src/iojs-v2.1.0/node.gyp

I've been trying to look at the commits on the project, changes on the tools directory and so but I can't find what can trigger this because my knowledge of python and the whole build tool-chain are almost 0. I don't know how all the files call each other and where to track this.

Any hint?

Sorry if this is not the kind of thing to ask. And thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions