Bug 208467 - www/node-devel www/node012 www/node4: Fix build with libc++ 3.8.0
Summary: www/node-devel www/node012 www/node4: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on: 208756
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-02 16:46 UTC by Dimitry Andric
Modified: 2016-04-14 11:09 UTC (History)
3 users (show)

See Also:
bhughes: maintainer-feedback+


Attachments
Fix several std::map declarations in www/node-devel (3.12 KB, patch)
2016-04-02 16:46 UTC, Dimitry Andric
no flags Details | Diff
Fix several std::map declarations in www/node012 (892 bytes, patch)
2016-04-02 16:47 UTC, Dimitry Andric
no flags Details | Diff
Fix several std::map declarations in www/node4 (3.08 KB, patch)
2016-04-02 16:47 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-04-02 16:46:43 UTC
Created attachment 168898 [details]
Fix several std::map declarations in www/node-devel

Follow-up to bug 208270: during the exp-run in bug 208158, it was found that www/node-devel, www/node012 and www/node4 give errors with libc++ 3.8.0 [1]:

/usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type"
    static_assert((is_same<typename allocator_type::value_type, value_type>::value),
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/compiler/js-type-feedback.h:41:21: note: in instantiation of template class 'std::__1::map<unsigned int, v8::internal::TypeFeedbackId, std::__1::less<unsigned int>, v8::internal::zone_allocator<v8::internal::TypeFeedbackId> >' requested here
  TypeFeedbackIdMap type_feedback_id_map_;
                    ^

This is because libc++ 3.8.0 has added these sanity checks for custom std::map allocators, which *must* be of the type std::pair<const Key, Value>.  I fixed the few std::map instances in the node source by adding this to their allocator types.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2016-04-02 16:47:18 UTC
Created attachment 168899 [details]
Fix several std::map declarations in www/node012
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2016-04-02 16:47:49 UTC
Created attachment 168900 [details]
Fix several std::map declarations in www/node4
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2016-04-12 17:41:53 UTC
Bradley, can you have a look at this and approve ?
Comment 4 Bradley T. Hughes freebsd_committer freebsd_triage 2016-04-12 20:17:04 UTC
Looks good to me. The node-devel port is seriously outdated, and I've created a PR to have it removed in PR 208756.
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2016-04-14 11:09:07 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-04-14 11:09:32 UTC
A commit references this bug:

Author: pi
Date: Thu Apr 14 11:08:53 UTC 2016
New revision: 413257
URL: https://svnweb.freebsd.org/changeset/ports/413257

Log:
  www/node012 www/node4: Fix build with libc++ 3.8.0

  PR:		208467
  Submitted by:	dim
  Approved by:	Bradley T. Hughes <bradleythughes@fastmail.fm> (maintainer)

Changes:
  head/www/node012/files/patch-deps_v8_src_compiler_instruction.h
  head/www/node4/files/
  head/www/node4/files/patch-deps_v8_src_compiler_instruction.h
  head/www/node4/files/patch-deps_v8_src_compiler_js-type-feedback.h
  head/www/node4/files/patch-deps_v8_src_zone-containers.h