When trying to compile on OpenBSD, it fails, complaining about unrecognized options.
Can you consider using clang instead of gcc ?
Here is the output :
gyp info spawn args '/home/peertube/.node-gyp/6.11.5/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/peertube/.node-gyp/6.11.5',
gyp info spawn args '-Dnode_gyp_dir=/home/peertube/PeerTube/client/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/peertube/.node-gyp/6.11.5/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/peertube/PeerTube/client/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/peertube/.node-gyp/6.11.5
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 '/home/peertube/PeerTube/client/node_modules/node-sass/build'
g++ '-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/peertube/.node-gyp/6.11.5/include/node -I/home/peertube/.node-gyp/6.11.5/src -I/home/peertube/.node-gyp/6.11.5/deps/uv/include -I/home/peertube/.node-gyp/6.11.5/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -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
cc1plus: error: unrecognized command line option "-std=gnu++0x"
cc1plus: error: unrecognized command line option "-std=c++0x"
gmake: *** [src/libsass.target.mk:141: Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
gmake: Leaving directory '/home/peertube/PeerTube/client/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 (/home/peertube/PeerTube/client/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System OpenBSD 6.2
gyp ERR! command "/usr/local/bin/node" "/home/peertube/PeerTube/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/peertube/PeerTube/client/node_modules/node-sass
gyp ERR! node -v v6.11.5
Do not hesitate to ask for more info if necessary.
This is not PeerTube that uses gcc, but a dependency (node-sass).
You can use the compiler you want: https://github.com/sass/libsass/issues/1998#issuecomment-211981650 (just adapt the commands for openbsd)
great, setting env correctly works like a charm :
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
thank you.
Most helpful comment
great, setting env correctly works like a charm :
thank you.