Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552232 - net-libs/iojs-2.3.0 fails to merge w/ 'ssl' USE flag set and 'bundled-libs' flag unset (also affects 2.{1,2}.\d)
Summary: net-libs/iojs-2.3.0 fails to merge w/ 'ssl' USE flag set and 'bundled-libs' f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-15 22:30 UTC by Robin Kauffman
Modified: 2015-06-25 18:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against io.js 2.3.0 sources to fix configuration w/ --shared-openssl flag set. (iojs-2.3.0-fix-shared-openssl.patch,2.06 KB, patch)
2015-06-15 22:30 UTC, Robin Kauffman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Kauffman 2015-06-15 22:30:34 UTC
Created attachment 405206 [details, diff]
Patch against io.js 2.3.0 sources to fix configuration w/ --shared-openssl flag set.

Hi-
    When attempting to merge iojs 2.3.0, GAF spits this out near the end of the src_configure() phase:
creating  icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [['/usr/kerberos/include']],
                       'libraries': [ '-L/usr/lib64',
                                      '-lz',
                                      '-lhttp_parser',
                                      '-luv',
                                      '-lrt',
                                      '-lpthread',
                                      '-lnsl',
                                      '-ldl',
                                      '-lssl',
                                      '-lcrypto']},
  'variables': { 'host_arch': 'x64',
                 'icu_small': 'false',
                 'node_install_npm': 'true',
                 'node_prefix': '/usr',
                 'node_shared_http_parser': 'true',
                 'node_shared_libuv': 'true',
                 '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_fips': '',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python2.7',
                 'target_arch': 'x64',
                 'uv_parent_path': '/deps/uv/',
                 'uv_use_dtrace': 'false',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 0,
                 '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 511, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./tools/gyp/pylib/gyp/generator/make.py", line 2162, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "./tools/gyp/pylib/gyp/generator/make.py", line 795, in Write
    self.Pchify))
  File "./tools/gyp/pylib/gyp/generator/make.py", line 1212, in WriteSources
    includes = map(Sourceify, map(self.Absolutify, includes))
  File "./tools/gyp/pylib/gyp/generator/make.py", line 1906, in Absolutify
    return os.path.normpath(os.path.join(self.path, path))
  File "/usr/lib64/python2.7/posixpath.py", line 68, in join
    if b.startswith('/'):
AttributeError: 'list' object has no attribute 'startswith'

The offending ${S}/configure invocation was:
/usr/bin/python2.7 configure --prefix=/usr --dest-cpu=x64 --without-dtrace --shared-openssl --shared-libuv --shared-http-parser --shared-zlib

After playing around a bit I discovered that the problem was the --shared-openssl flag.  Chatting with io.js developers on IRC and GitHub suggested that the fact that pkg-config doesn't return -L flags if the specified directory is in the search path might have been a slight problem for this version and configuration of GAF.

Ben Noordhuis suggested applying the following commit:
https://github.com/bnoordhuis/io.js/commit/778c3dc8b60748a117908369b290808c212b2775
referenced from this pull request:
https://github.com/nodejs/io.js/pull/1986

I tried applying it against the v2.3.0 source, and it worked perfectly.  Attached is the diff cherry-picked from Ben's fix-issue-1985 branch while the v2.3.0 tag is checked out.

The upstream bug I filed is at:
https://github.com/nodejs/io.js/issues/1985

Hopefully the fix will be merged back into mainline, until then, this patch should work on 2.3.0 and should be fairly easy to make work with v2.{1.2}.x.
Comment 1 Johan Bergström 2015-06-15 22:43:27 UTC
I'm looking into this.
Comment 2 Johan Bergström 2015-06-18 01:49:42 UTC
Since we're baking 2.3.1 upstream I'll hold off until that lands (discussion here: https://github.com/nodejs/io.js/issues/1996).
Comment 3 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2015-06-18 23:07:59 UTC
Johan, can you add "epatch_user" at the end of the src_prepare next time you'll bump iojs ebuild, please? :)
Comment 4 Johan Bergström 2015-06-18 23:49:24 UTC
(In reply to Vadim A. Misbakh-Soloviov (mva) from comment #3)
> Johan, can you add "epatch_user" at the end of the src_prepare next time
> you'll bump iojs ebuild, please? :)

Sure
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-25 18:45:20 UTC
+*iojs-2.3.1 (25 Jun 2015)
+
+  25 Jun 2015; Michał Górny <mgorny@gentoo.org> +iojs-2.3.1.ebuild:
+  Version bump with upstream fix for bug #552232. https://github.com/gentoo
+  /gentoo-portage-rsync-mirror/pull/153 by jbergstroem.