Repository navigation
Can't build stuff (using gyp) on FreeBSD 11.1 (or clang 4.0) #14076
Copy link
Copy link
Closed
Labels
addonsIssues and PRs related to native addons.Issues and PRs related to native addons.buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.freebsdIssues and PRs related to the FreeBSD platform.Issues and PRs related to the FreeBSD platform.
Description
- Version: v8.1.3
- Platform: FreeBSD 11.1-RC1
- Subsystem: ?
The flag added here breaks the above FreeBSD version because it uses clang 4.0 which doesn't need it anymore (or something). It's removed in ports (depending on clang version) but when building node-sass, it uses the unpatched version (downloads https://nodejs.org/download/release/v8.1.3/node-v8.1.3-headers.tar.gz ). Modifying common.gypi in ~/.node-gyp fixes it.
node-sass$ sudo pkg install -y node npm
node-sass$ npm install
...stuff...
gmake: Entering directory '/home/edho/git/node-sass/build'
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.0.beta.2"' -I/home/edho/.node-gyp/8.1.3/include/node -I/home/edho/.node-gyp/8.1.3/src -I/home/edho/.node-gyp/8.1.3/deps/uv/include -I/home/edho/.node-gyp/8.1.3/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 -O3 -fno-omit-frame-pointer -std=gnu++0x -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
In file included from ../src/libsass/src/ast.cpp:1:
In file included from ../src/libsass/src/sass.hpp:46:
In file included from ../src/libsass/include/sass/base.h:19:
In file included from /usr/include/c++/v1/stddef.h:40:
/usr/include/c++/v1/__config:73:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
^
1 error generated.
gmake: *** [src/libsass.target.mk:144: Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
gmake: Leaving directory '/home/edho/git/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/edho/git/node-sass/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System FreeBSD 11.1-RC1
gyp ERR! command "/usr/local/bin/node" "/home/edho/git/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/edho/git/node-sass
gyp ERR! node -v v8.1.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/edho/.npm/_logs/2017-07-04T18_31_33_467Z-debug.log
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addonsIssues and PRs related to native addons.Issues and PRs related to native addons.buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.freebsdIssues and PRs related to the FreeBSD platform.Issues and PRs related to the FreeBSD platform.
Activity
bnoordhuis commentedon Jul 4, 2017
See #12784 for context. If there is a way to make it work with both freebsd 10 and 11, file a pull request and I'll review it. You can probably branch on
llvm_version>="4.0"in common.gypi.nanaya commentedon Jul 4, 2017
Looks like there's no llvm_version variable though and I don't know any good way to generate it (short of doing shell script monstrosity).
bnoordhuis commentedon Jul 4, 2017
The configure script sets it if it detects that CC is clang. You should see it in config.gypi.
nanaya commentedon Jul 4, 2017
Doesn't seem to be used when building node-sass though. Also the value is 0 in
~/.node-gypbecause it's downloaded and not generated.tools: skip workaround for newer llvm
tools: skip workaround for newer llvm
tools: skip workaround for newer llvm
tools: skip workaround for newer llvm
Jehops commentedon Aug 3, 2017
Assuming these node-sass build issues are fixed after 8.2.1 (we're still seeing them in 8.2.1 on FreeBSD 11.1 amd64; see below) would it be possible to roll a new v8 release?
refack commentedon Aug 3, 2017
@Jehops seems like it will be in
node@8.3.0(#14594), available now as RC https://nodejs.org/download/rc/v8.3.0-rc.0/net-im/mastodon: Work around www/node (node version 8) bug [1] on Fre…
net-im/mastodon: Work around www/node (node version 8) bug [1] on Fre…
oschonrock commentedon Nov 30, 2017
I still have problems building node-sass (under gyp) on FBSD11.1.
In order to get the fix in mat813/freebsd-ports@cea3aae now, I updated to latest packages:
and then
but still
also documented here: sass/node-sass#2153 (comment)
oschonrock commentedon Dec 2, 2017
@saper
I solved it. It was to do with how the binary node8 package was being built in the FreeBSD pack build infrastructure. TLDR; it was being built under FBSD 11.0 (clang3.8.0), and if you then run it on a FBSD11.1 (clang 4.0.0) machine the gyp build (of eg node-sass) will fail with above error. Building the port from source on local machine always works.
Details here:
https://lists.freebsd.org/pipermail/freebsd-ports/2017-December/111288.html
referred to here: sass/node-sass#2153 (comment)
and here: #17404