{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/7618","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/7618/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/7618/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/7618/events","html_url":"https://github.com/nodejs/node/issues/7618","id":164546135,"number":7618,"title":"osx, build: Node v6.3.0 won't build on Clang 3.2 (OSX 10.8 Darwin 12.5.0)","user":{"login":"gibfahn","id":15943089,"avatar_url":"https://avatars.githubusercontent.com/u/15943089?v=3","gravatar_id":"","url":"https://api.github.com/users/gibfahn","html_url":"https://github.com/gibfahn","followers_url":"https://api.github.com/users/gibfahn/followers","following_url":"https://api.github.com/users/gibfahn/following{/other_user}","gists_url":"https://api.github.com/users/gibfahn/gists{/gist_id}","starred_url":"https://api.github.com/users/gibfahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibfahn/subscriptions","organizations_url":"https://api.github.com/users/gibfahn/orgs","repos_url":"https://api.github.com/users/gibfahn/repos","events_url":"https://api.github.com/users/gibfahn/events{/privacy}","received_events_url":"https://api.github.com/users/gibfahn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/build","name":"build","color":"eb6420"},{"url":"https://api.github.com/repos/nodejs/node/labels/os%20x","name":"os x","color":"9944dd"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-07-08T14:43:38Z","updated_at":"2016-09-22T00:17:15Z","closed_at":null,"body":"* **Version**: v6.3.0\r\n* **Platform**: Mac OSX 10.8 (Darwin 12.5.0)\r\n* **Subsystem**: build\r\n\r\nThe build is failing on OSX 10.8 but passing on 10.10. It looks like the problem is due to this commit: 4014ecbfb4a80a7daf1cf07bb8735904abe8020e, which was added in #7157 and backported in #7546. I note that @zbjornson said that:\r\n> Tested with gcc/g++ 4.8.3, clang 3.4 and MSVC 2015 (i.e. something like #4284 shouldn't happen here). \r\n\r\nBut I'm still getting this problem. I assume something similar to #4290 would fix it. @bnoordhuis \r\n\r\n##### Failing machine:\r\n```\r\nDarwin Kernel Version 12.5.0\r\n$ cc --version\r\nApple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)\r\nTarget: x86_64-apple-darwin12.5.0\r\n```\r\n\r\n##### Passing machine:\r\n```\r\nDarwin Kernel Version 14.0.0\r\n$ cc --version\r\nApple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)\r\nTarget: x86_64-apple-darwin14.0.0\r\nThread model: posix\r\n```\r\n\r\n##### Error:\r\n```\r\n../src/node_buffer.cc:1193:19: error: use of undeclared identifier '__builtin_bswap16'\r\n      data16[i] = BSWAP_INTRINSIC_2(data16[i]);\r\n                  ˆ\r\n../src/node_buffer.cc:56:30: note: expanded from macro 'BSWAP_INTRINSIC_2'\r\n#define BSWAP_INTRINSIC_2(x) __builtin_bswap16(x)\r\n                             ˆ\r\n  c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-DNODE_ARCH=\"x64\"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_TAG=\"-IBMBuild-\"' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DHAVE_INSPECTOR=1' '-DV8_INSPECTOR_USE_STL=1' '-DHAVE_OPENSSL=1' '-DHAVE_DTRACE=1' '-D__POSIX__' '-DNODE_PLATFORM=\"darwin\"' '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_CONVERSION=1' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/build/node/out/Release/obj/gen -I../deps/v8_inspector -I../deps/v8_inspector/deps/wtf -I/build/node/out/Release/obj/gen/blink -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/openssl/openssl/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF /build/node/out/Release/.deps//build/node/out/Release/obj.target/node/src/node_file.o.d.raw   -c -o /build/node/out/Release/obj.target/node/src/node_file.o ../src/node_file.cc\r\n1 error generated.\r\nmake[2]: *** [/build/node/out/Release/obj.target/node/src/node_buffer.o] Error 1\r\nmake[2]: *** Waiting for unfinished jobs....\r\nrm _node_deps_v8_inspector_platform_v8_inspector_v8_inspector_gyp_protocol_sources_target_generateV8InspectorProtocolBackendSources.intermediate\r\nmake[1]: *** [node] Error 2\r\nmake: *** [node-v7.0.0-darwin-x64.tar] Error 2\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/248779748","html_url":"https://github.com/nodejs/node/issues/7618#issuecomment-248779748","issue_url":"https://api.github.com/repos/nodejs/node/issues/7618","id":248779748,"user":{"login":"zbjornson","id":469365,"avatar_url":"https://avatars.githubusercontent.com/u/469365?v=3","gravatar_id":"","url":"https://api.github.com/users/zbjornson","html_url":"https://github.com/zbjornson","followers_url":"https://api.github.com/users/zbjornson/followers","following_url":"https://api.github.com/users/zbjornson/following{/other_user}","gists_url":"https://api.github.com/users/zbjornson/gists{/gist_id}","starred_url":"https://api.github.com/users/zbjornson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbjornson/subscriptions","organizations_url":"https://api.github.com/users/zbjornson/orgs","repos_url":"https://api.github.com/users/zbjornson/repos","events_url":"https://api.github.com/users/zbjornson/events{/privacy}","received_events_url":"https://api.github.com/users/zbjornson/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T00:17:14Z","updated_at":"2016-09-22T00:17:14Z","body":"> Is there a way to get to at least the previous performance for aligned 16-bit types? \r\n\r\nSorry, to be clear: #7645 does *not* have a perf regression for aligned 16-bit types on Windows, if that's what you mean. Rather, Ben's PR gives an improvement to this case.\r\n\r\n> Could you explain a little more here?\r\n\r\nI meant, even if someone were to compile node with `-march=native` to allow SSE/AVX, GCC emits MOVBE (which is fast for one element) for the bswap builtin, but it does not vectorize the loop, so you don't see huge perf gains. MSVC vectorizes and ends up a lot faster.\r\n\r\nHere's what the hand-vectorized code looks like:\r\nhttps://github.com/zbjornson/node-bswap/blob/master/src/bswap.cc#L13-L56\r\nand here's how it benchmarks on win and linux:\r\nhttps://github.com/zbjornson/node-bswap#benchmarks\r\nThe node values are equivalent to what we would get from #7645. The bswap.native column is what it could be if we went all-out and risked breaking non-x86 platforms (~30% faster on Windows and 2 to 7x faster on Linux).\r\n\r\nWorking on the halfway PR now that I've figured that stuff out. :)"}}
{"actor":{"display_login":"zbjornson"}}