{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/1787","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/1787/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/1787/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/1787/events","html_url":"https://github.com/nodejs/io.js/issues/1787","id":80256877,"number":1787,"title":"iojs 2.1.0 & pkg-config output issues","user":{"login":"alferpal","id":799202,"avatar_url":"https://avatars.githubusercontent.com/u/799202?v=3","gravatar_id":"","url":"https://api.github.com/users/alferpal","html_url":"https://github.com/alferpal","followers_url":"https://api.github.com/users/alferpal/followers","following_url":"https://api.github.com/users/alferpal/following{/other_user}","gists_url":"https://api.github.com/users/alferpal/gists{/gist_id}","starred_url":"https://api.github.com/users/alferpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alferpal/subscriptions","organizations_url":"https://api.github.com/users/alferpal/orgs","repos_url":"https://api.github.com/users/alferpal/repos","events_url":"https://api.github.com/users/alferpal/events{/privacy}","received_events_url":"https://api.github.com/users/alferpal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/build","name":"build","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-24T20:04:50Z","updated_at":"2015-05-25T06:23:12Z","closed_at":null,"body":"Platform: Arch Linux which as some of you will know defaults to python 3.\r\n\r\nTo solve that, before using configure we use this in our packages to change references from python to python2 \r\n\r\n```bash\r\n  find -type f -exec sed \\\r\n    -e 's_^#!/usr/bin/env python$_&2_' \\\r\n    -e 's_^\\(#!/usr/bin/python2\\).[45]$_\\1_' \\\r\n    -e 's_^#!/usr/bin/python$_&2_' \\\r\n    -e 's_^\\( *exec \\+\\)python\\( \\+.*\\)$_\\1python2\\2_'\\\r\n    -e 's_^\\(.*\\)python\\( \\+-c \\+.*\\)$_\\1python2\\2_'\\\r\n    -e \"s_'python'_'python2'_\" -i {} \\;\r\n  find test/ -type f -exec sed 's_python _python2 _' -i {} \\;\r\n\r\n./configure \\\r\n    --prefix=/usr \\\r\n    --shared-openssl \\\r\n    --shared-zlib \\\r\n    --with-intl=system-icu \\\r\n    --without-npm \r\n  make\r\n```\r\n\r\nThis used to work with 2.0.x and now this is thrown:\r\n\r\n```bash\r\ncreating  ./icu_config.gypi\r\n{ 'target_defaults': { 'cflags': [],\r\n                       'default_configuration': 'Release',\r\n                       'defines': [],\r\n                       'include_dirs': [],\r\n                       'libraries': [ '-L/usr/lib',\r\n                                      '-lz',\r\n                                      '-lssl',\r\n                                      '-lcrypto',\r\n                                      '',\r\n                                      '-licui18n',\r\n                                      '-licuuc',\r\n                                      '-licudata']},\r\n  'variables': { 'host_arch': 'x64',\r\n                 'icu_gyp_path': 'tools/icu/icu-system.gyp',\r\n                 'icu_small': 'false',\r\n                 'node_install_npm': 'false',\r\n                 'node_prefix': '/usr',\r\n                 'node_shared_http_parser': 'false',\r\n                 'node_shared_libuv': 'false',\r\n                 'node_shared_openssl': 'true',\r\n                 'node_shared_zlib': 'true',\r\n                 'node_tag': '',\r\n                 'node_use_dtrace': 'false',\r\n                 'node_use_etw': 'false',\r\n                 'node_use_lttng': 'false',\r\n                 'node_use_openssl': 'true',\r\n                 'node_use_perfctr': 'false',\r\n                 'openssl_no_asm': 0,\r\n                 'python2': '/usr/bin/python2',\r\n                 'target_arch': 'x64',\r\n                 'uv_parent_path': '/deps/uv/',\r\n                 'uv_use_dtrace': 'false',\r\n                 'v8_enable_gdbjit': 0,\r\n                 'v8_enable_i18n_support': 1,\r\n                 'v8_no_strict_aliasing': 1,\r\n                 'v8_optimized_debug': 0,\r\n                 'v8_random_seed': 0,\r\n                 'v8_use_snapshot': 1,\r\n                 'want_separate_host_toolset': 0}}\r\ncreating  ./config.gypi\r\ncreating  ./config.mk\r\nTraceback (most recent call last):\r\n  File \"tools/gyp_node.py\", line 57, in <module>\r\n    run_gyp(gyp_args)\r\n  File \"tools/gyp_node.py\", line 18, in run_gyp\r\n    rc = gyp.main(args)\r\n  File \"./tools/gyp/pylib/gyp/__init__.py\", line 526, in main\r\n    return gyp_main(args)\r\n  File \"./tools/gyp/pylib/gyp/__init__.py\", line 502, in gyp_main\r\n    params, options.check, options.circular_check)\r\n  File \"./tools/gyp/pylib/gyp/__init__.py\", line 129, in Load\r\n    params['parallel'], params['root_targets'])\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 2736, in Load\r\n    variables, includes, depth, check, True)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 386, in LoadTargetBuildFile\r\n    includes, True, check)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 258, in LoadOneBuildFile\r\n    aux_data, includes, check)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 296, in LoadBuildFileIncludesIntoDict\r\n    subdict_path, include)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 2131, in MergeDicts\r\n    MergeDicts(to[k], v, to_file, fro_file)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 2191, in MergeDicts\r\n    MergeLists(to[list_base], v, to_file, fro_file, is_paths, append)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 2048, in MergeLists\r\n    to_item = MakePathRelative(to_file, fro_file, item)\r\n  File \"./tools/gyp/pylib/gyp/input.py\", line 2023, in MakePathRelative\r\n    if item[-1] == '/':\r\nIndexError: 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\r\n```\r\n\r\nI'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.\r\n\r\nAny hint?\r\n\r\nSorry if this is not the kind of thing to ask. And thank you in advance"},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/105138917","html_url":"https://github.com/nodejs/io.js/issues/1787#issuecomment-105138917","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/1787","id":105138917,"user":{"login":"alferpal","id":799202,"avatar_url":"https://avatars.githubusercontent.com/u/799202?v=3","gravatar_id":"","url":"https://api.github.com/users/alferpal","html_url":"https://github.com/alferpal","followers_url":"https://api.github.com/users/alferpal/followers","following_url":"https://api.github.com/users/alferpal/following{/other_user}","gists_url":"https://api.github.com/users/alferpal/gists{/gist_id}","starred_url":"https://api.github.com/users/alferpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alferpal/subscriptions","organizations_url":"https://api.github.com/users/alferpal/orgs","repos_url":"https://api.github.com/users/alferpal/repos","events_url":"https://api.github.com/users/alferpal/events{/privacy}","received_events_url":"https://api.github.com/users/alferpal/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T06:23:12Z","updated_at":"2015-05-25T06:23:12Z","body":"Your patch solves the problem. I can get past configure with the icu flag. "}}