New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile node-sass on FreeBSD 11.1: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. #2153

Closed
duncan-bayne opened this Issue Nov 16, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@duncan-bayne

duncan-bayne commented Nov 16, 2017

Having installed the latest node, yarn, and npm packages, when I try to install libsass via yarn install, I get the following error:

error /usr/home/duncan/code/Project/frontend/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /usr/home/duncan/code/Project/frontend/node_modules/node-sass
Output:
Building: /usr/local/bin/node /usr/home/duncan/code/Project/frontend/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/usr/home/duncan/code/Project/frontend/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@8.8.1 | freebsd | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/local/bin/python2
gyp verb check python version `/usr/local/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.14\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.8.1
gyp verb command install [ '8.8.1' ]
gyp verb install input version string "8.8.1"
gyp verb install installing version: 8.8.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.8.1
gyp verb build dir attempting to create "build" dir: /usr/home/duncan/code/Project/frontend/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /usr/home/duncan/code/Project/frontend/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /usr/home/duncan/code/Project/frontend/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /usr/home/duncan/code/Project/frontend/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /usr/home/duncan/code/Project/frontend/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/usr/home/duncan/code/Project/frontend/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/duncan/code/Project/frontend/node_modules/node-sass/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/home/duncan/code/Project/frontend/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/duncan/.node-gyp/8.8.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/duncan/.node-gyp/8.8.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/home/duncan/code/Project/frontend/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/duncan/.node-gyp/8.8.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/home/duncan/code/Project/frontend/node_modules/node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/duncan/.node-gyp/8.8.1
gyp verb `which` succeeded for `gmake` /usr/local/bin/gmake
gyp info spawn gmake
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory '/usr/home/duncan/code/Project/frontend/node_modules/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.3.6"' -I/home/duncan/.node-gyp/8.8.1/include/node -I/home/duncan/.node-gyp/8.8.1/src -I/home/duncan/.node-gyp/8.8.1/deps/uv/include -I/home/duncan/.node-gyp/8.8.1/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:17:
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:141: Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
gmake: Leaving directory '/usr/home/duncan/code/Project/frontend/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/home/duncan/code/Project/frontend/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:200:12)
gyp ERR! System FreeBSD 11.1-RELEASE
gyp ERR! command "/usr/local/bin/node" "/usr/home/duncan/code/Project/frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/home/duncan/code/Project/frontend/node_modules/node-sass
gyp ERR! node -v v8.8.1

version information

$ npm -v
5.4.2
$ node -v
v8.8.1
$ node -p process.versions
{ http_parser: '2.7.0',
  node: '8.8.1',
  v8: '6.1.534.42',
  uv: '1.14.1',
  zlib: '1.2.8',
  ares: '1.12.0',
  modules: '57',
  nghttp2: '1.25.0',
  openssl: '1.0.2k-freebsd',
  icu: '59.1',
  unicode: '9.0',
  cldr: '31.0.1',
  tz: '2017b' }
$ node -p process.platform
freebsd
$ node -p process.arch
x64
$ node -p require('node-sass').info
/usr/home/duncan/code/Project/frontend/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^

Error: Node Sass does not yet support your current environment: FreeBSD 64-bit with Unsupported runtime (57)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v3.13.1
    at module.exports (/usr/home/duncan/code/Project/frontend/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/usr/home/duncan/code/Project/frontend/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at [eval]:1:1
$ npm ls node-sass
project-web@2.8.0 /usr/home/duncan/code/Project/frontend
└─┬ ember-cli-sass@4.1.0
  └─┬ broccoli-sass-source-maps@1.8.1
    └── node-sass@3.13.1
$ uname -a
FreeBSD x220 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
$ clang --version
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
@duncan-bayne

This comment has been minimized.

Show comment
Hide comment
@duncan-bayne

duncan-bayne Nov 16, 2017

I can provide SSH access to a FreeBSD server for anyone wishing to debug / test this.

duncan-bayne commented Nov 16, 2017

I can provide SSH access to a FreeBSD server for anyone wishing to debug / test this.

@nschonni

This comment has been minimized.

Show comment
Hide comment
@nschonni

nschonni Nov 16, 2017

Contributor

Unfortunately that version of node-sass is to old to support Node 8. To get Node 8 you'll need to update to 4.5.3 or above. Please see the release page for the Node version supported by that version if you need to remain on 3.x

Contributor

nschonni commented Nov 16, 2017

Unfortunately that version of node-sass is to old to support Node 8. To get Node 8 you'll need to update to 4.5.3 or above. Please see the release page for the Node version supported by that version if you need to remain on 3.x

@nschonni nschonni closed this Nov 16, 2017

@saper saper self-assigned this Nov 18, 2017

@oschonrock

This comment has been minimized.

Show comment
Hide comment
@oschonrock

oschonrock Nov 30, 2017

is this really resolved? I also have identical symptoms:

$ # clean install of FreeBSD 11.1
$ pkg add node npm

$ node -v
v8.8.1
$ npm -v
5.4.2

$ npm search node-sass
node-sass  | Wrapper around  | saperski   | 2017-11-20 | 4.7.2    | css libsass preprocessor sass scss style

$ # clean directory
$ npm install node-sass

...

gmake: Entering directory '/usr/local/www/bootstrap4.webcollect.org.uk/node_modules/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/oliver/.node-gyp/8.8.1/include/node -I/home/oliver/.node-gyp/8.8.1/src -I/home/oliver/.node-gyp/8.8.1/deps/uv/include -I/home/oliver/.node-gyp/8.8.1/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. \

oschonrock commented Nov 30, 2017

is this really resolved? I also have identical symptoms:

$ # clean install of FreeBSD 11.1
$ pkg add node npm

$ node -v
v8.8.1
$ npm -v
5.4.2

$ npm search node-sass
node-sass  | Wrapper around  | saperski   | 2017-11-20 | 4.7.2    | css libsass preprocessor sass scss style

$ # clean directory
$ npm install node-sass

...

gmake: Entering directory '/usr/local/www/bootstrap4.webcollect.org.uk/node_modules/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/oliver/.node-gyp/8.8.1/include/node -I/home/oliver/.node-gyp/8.8.1/src -I/home/oliver/.node-gyp/8.8.1/deps/uv/include -I/home/oliver/.node-gyp/8.8.1/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. \

@oschonrock

This comment has been minimized.

Show comment
Hide comment
@oschonrock

oschonrock Nov 30, 2017

this makes it work:

[root@epsilon node8]# pkg install node6
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        node6: 6.12.0_1

Number of packages to be installed: 1

The process will require 22 MiB more space.
4 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching node6-6.12.0_1.txz: 100%    4 MiB   4.0MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing node6-6.12.0_1...
Extracting node6-6.12.0_1: 100%
Message from node6-6.12.0_1:

Note: If you need npm (Node Package Manager), please install the npm3
package, or build any of the www/npm* ports with the NODE6 option enabled.
[root@epsilon node8]# pkg install npm3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        npm3: 3.10.10_2

Number of packages to be installed: 1

The process will require 11 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching npm3-3.10.10_2.txz: 100%    2 MiB   2.3MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing npm3-3.10.10_2...
Extracting npm3-3.10.10_2: 100%
Message from npm3-3.10.10_2:

===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Use www/npm or www/npm-node* instead.

It is scheduled to be removed on or after 2017-12-31.

and then "npm install node-sass" works fine...(with ancient version of node and npm)

what a ballsache just to get some variables replaced in some css,,,,, pfft

maybe npm should have a look at how the FreeBSD ports collection is run?

oschonrock commented Nov 30, 2017

this makes it work:

[root@epsilon node8]# pkg install node6
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        node6: 6.12.0_1

Number of packages to be installed: 1

The process will require 22 MiB more space.
4 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching node6-6.12.0_1.txz: 100%    4 MiB   4.0MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing node6-6.12.0_1...
Extracting node6-6.12.0_1: 100%
Message from node6-6.12.0_1:

Note: If you need npm (Node Package Manager), please install the npm3
package, or build any of the www/npm* ports with the NODE6 option enabled.
[root@epsilon node8]# pkg install npm3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        npm3: 3.10.10_2

Number of packages to be installed: 1

The process will require 11 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching npm3-3.10.10_2.txz: 100%    2 MiB   2.3MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing npm3-3.10.10_2...
Extracting npm3-3.10.10_2: 100%
Message from npm3-3.10.10_2:

===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Use www/npm or www/npm-node* instead.

It is scheduled to be removed on or after 2017-12-31.

and then "npm install node-sass" works fine...(with ancient version of node and npm)

what a ballsache just to get some variables replaced in some css,,,,, pfft

maybe npm should have a look at how the FreeBSD ports collection is run?

@nschonni

This comment has been minimized.

Show comment
Hide comment
@nschonni

nschonni Dec 1, 2017

Contributor

This issue was with an old version with Node 8. We don't yet have pre-built binaries for newer version per #2129

Contributor

nschonni commented Dec 1, 2017

This issue was with an old version with Node 8. We don't yet have pre-built binaries for newer version per #2129

@sass sass locked and limited conversation to collaborators Dec 1, 2017

@saper

This comment has been minimized.

Show comment
Hide comment
@saper

saper Dec 2, 2017

Member

Can we double check that nodejs/node#14076 didn't re-appear again as nodejs/node#17404 suggests? Can't check atm

Member

saper commented Dec 2, 2017

Can we double check that nodejs/node#14076 didn't re-appear again as nodejs/node#17404 suggests? Can't check atm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.