Comments (5)
I want to know the versions of your compiler and other software. Could you provide the beginning of the output of running npm install @hanazuki/node-jsonnet
in a clean directory? That should look like this:
kasumi@dev% npm i @hanazuki/node-jsonnet
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
> @hanazuki/[email protected] install /tmp/test/node_modules/@hanazuki/node-jsonnet
> cmake-js build
[ '/usr/bin/node', '/tmp/test/node_modules/.bin/cmake-js', 'build' ]
info TOOL Using Ninja generator, because ninja is available.
info CMD CONFIGURE
info RUN cmake "/tmp/test/node_modules/@hanazuki/node-jsonnet" --no-warn-unused-cli -G"Ninja" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/tmp/test/node_modules/@hanazuki/node-jsonnet/build/Release" -DCMAKE_JS_INC="/home/kasumi/.cmake-js/node-x64/v12.16.3/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.16.3" -DNODE_ARCH="x64"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Extracted Jsonnet version: 0.15.0
Testing with Jsonnet executable:
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/test/node_modules/@hanazuki/node-jsonnet/build
info CMD BUILD
from node-jsonnet.
I suppose this build failure is due to an old compiler or misconfiguration since <optional>
should be available in C++17.
from node-jsonnet.
$ ./go build
Service wrapper for: routine-service.
Current version: localdev
Building service docker image
Sending build context to Docker daemon 83.67MB
Step 1/15 : FROM earnest/node10:1.2-b134563
# Executing 1 build trigger
---> Using cache
---> ef15f4f732fc
Step 2/15 : ENV NODE_ENV development
---> Using cache
---> 89677c96e4fd
Step 3/15 : WORKDIR /opt
---> Using cache
---> bb1c7f3d1714
Step 4/15 : ADD cmake-3.17.2-Linux-x86_64.sh /opt
---> Using cache
---> 7d77d91aa08c
Step 5/15 : RUN /opt/cmake-3.17.2-Linux-x86_64.sh --skip-license
---> Using cache
---> c452ce738d69
Step 6/15 : RUN ls -l /opt/bin
---> Using cache
---> 3310a1de6cd1
Step 7/15 : RUN ln -s /opt/bin/cmake* /usr/local/bin
---> Using cache
---> de843754a2b3
Step 8/15 : RUN gcc -v
---> Using cache
---> f6b785df2ffe
Step 9/15 : COPY . /usr/src/app
---> c18cf0b3eeab
Step 10/15 : WORKDIR /usr/src/app
---> Running in d6e5274c3172
Removing intermediate container d6e5274c3172
---> 9c5a939a574c
Step 11/15 : RUN npm install --quiet && npm run compile
---> Running in 451a5a8750c5
> [email protected] install /usr/src/app/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/usr/src/app/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
bufferutil.target.mk:103: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
make: Leaving directory '/usr/src/app/node_modules/ws/build'
> @hanazuki/[email protected] install /usr/src/app/node_modules/@hanazuki/node-jsonnet
> cmake-js build
[ '/usr/local/bin/node',
'/usr/src/app/node_modules/.bin/cmake-js',
'build' ]
info TOOL Using Unix Makefiles generator.
info DIST Downloading distribution files.
http DIST - https://nodejs.org/dist/v10.13.0/SHASUMS256.txt
http DIST - https://nodejs.org/dist/v10.13.0/node-v10.13.0-headers.tar.gz
info CMD CONFIGURE
info RUN cmake "/usr/src/app/node_modules/@hanazuki/node-jsonnet" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/usr/src/app/node_modules/@hanazuki/node-jsonnet/build/Release" -DCMAKE_JS_INC="/root/.cmake-js/node-x64/v10.13.0/include/node;/usr/src/app/node_modules/nan" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="10.13.0" -DNODE_ARCH="x64"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Extracted Jsonnet version: 0.15.0
Testing with Jsonnet executable:
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/app/node_modules/@hanazuki/node-jsonnet/build
info CMD BUILD
info RUN cmake --build "/usr/src/app/node_modules/@hanazuki/node-jsonnet/build" --config Release
Scanning dependencies of target md5
[ 4%] Building CXX object third_party/jsonnet/third_party/md5/CMakeFiles/md5.dir/md5.cpp.o
[ 9%] Linking CXX static library ../../libmd5.a
[ 9%] Built target md5
Scanning dependencies of target to_c_array
[ 14%] Building CXX object third_party/jsonnet/stdlib/CMakeFiles/to_c_array.dir/to_c_array.cpp.o
[ 19%] Linking CXX executable ../to_c_array
[ 19%] Built target to_c_array
Scanning dependencies of target stdlib
[ 23%] Generating ../../../../third_party/jsonnet/core/std.jsonnet.h
[ 23%] Built target stdlib
Scanning dependencies of target libjsonnet
[ 28%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/desugarer.cpp.o
[ 33%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/formatter.cpp.o
[ 38%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/lexer.cpp.o
[ 42%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/libjsonnet.cpp.o
[ 47%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/parser.cpp.o
[ 52%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/pass.cpp.o
[ 57%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/static_analysis.cpp.o
[ 61%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/string_utils.cpp.o
[ 66%] Building CXX object third_party/jsonnet/core/CMakeFiles/libjsonnet.dir/vm.cpp.o
[ 71%] Linking CXX shared library ../libjsonnet.so
[ 71%] Built target libjsonnet
Scanning dependencies of target node-jsonnet
[ 76%] Building CXX object CMakeFiles/node-jsonnet.dir/src/JsonValueConverter.cpp.o
In file included from /usr/src/app/node_modules/@hanazuki/node-jsonnet/src/JsonValueConverter.hpp:5:0,
from /usr/src/app/node_modules/@hanazuki/node-jsonnet/src/JsonValueConverter.cpp:4:
/usr/src/app/node_modules/@hanazuki/node-jsonnet/src/JsonnetVm.hpp:10:20: fatal error: optional: No such file or directory
#include <optional>
^
compilation terminated.
CMakeFiles/node-jsonnet.dir/build.make:82: recipe for target 'CMakeFiles/node-jsonnet.dir/src/JsonValueConverter.cpp.o' failed
make[2]: *** [CMakeFiles/node-jsonnet.dir/src/JsonValueConverter.cpp.o] Error 1
CMakeFiles/Makefile2:288: recipe for target 'CMakeFiles/node-jsonnet.dir/all' failed
make[1]: *** [CMakeFiles/node-jsonnet.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
ERR! OMG Process terminated: 2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @hanazuki/[email protected] install: `cmake-js build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @hanazuki/[email protected] install 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! /root/.npm/_logs/2020-05-26T12_42_53_457Z-debug.log
The command '/bin/sh -c npm install --quiet && npm run compile' returned a non-zero code: 1
robmackay@~/git/routine-service (PBE-118)>
$
from node-jsonnet.
I suppose this build failure is due to an old compiler or misconfiguration since
<optional>
should be available in C++17.
I validated that C++17 was supported before reporting working through the Docker image upgrade of CMake to make sure it was the proper version. The full log output is above.
from node-jsonnet.
From the log you provided the compiler inside your container seems to be GCC 4.9.2, which have little support of the C++17 features.
I recommend using GCC 7.1 or later.
from node-jsonnet.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-jsonnet.