Skip to content
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

Build / install issue #1

Closed
benbenz opened this issue Mar 8, 2022 · 89 comments
Closed

Build / install issue #1

benbenz opened this issue Mar 8, 2022 · 89 comments

Comments

@benbenz
Copy link

benbenz commented Mar 8, 2022

Hello,

Thanks for making this repository!

I'm having trouble installing/running the repository.
When following the install directions (v1), it seems git is not finding a valid git repository.
When trying to install after downloading the repository (v2), the submodules are properly installed but the build is failing because build.ninja is missing ... ?
I know I do not have perl6 installed yet but it doesn't seem to be related to this quite yet and I wanted to try with the default perl for now...

OS: Mac OSX 10.13.6 (High Sierra)
Node: Node v16.14.0
NPM: v8.3.1
protoc: libprotoc 3.19.4
ninja: 1.10.2
Go: go1.17.8 darwin/amd64
cmake-js: 6.3.0
cmake: 3.23.0-rc2
clang: Apple LLVM version 10.0.0 (clang-1000.11.45.2)
perl: v5.18.2

STEPS v1:

mkdir quic-test
cd quic-test
echo "@fails-components:registry=https://npm.pkg.github.com" > .npmrc
npm init
git init
npm install --save https://github.com/fails-components/webtransport

ERROR v1:

npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/benoit/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > @fails-components/[email protected] preinstall
npm ERR! > git submodule update -i -r
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! fatal: not a git repository (or any of the parent directories): .git
npm ERR! npm ERR! code 128
npm ERR! npm ERR! path /Users/benoit/.npm/_cacache/tmp/git-cloneVgtOkV
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c git submodule update -i -r
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/benoit/.npm/_logs/2022-03-08T11_55_48_125Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/benoit/.npm/_logs/2022-03-08T11_52_37_208Z-debug-0.log

debug build file  ...

394 verbose stack Error: command failed
394 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
394 verbose stack     at ChildProcess.emit (node:events:520:28)
394 verbose stack     at maybeClose (node:internal/child_process:1092:16)
394 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
395 verbose pkgid @fails-components/[email protected]
396 verbose cwd /Users/benoit/.npm/_cacache/tmp/git-cloneVgtOkV
397 verbose Darwin 17.7.0
398 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "install" "--force" "--cache=/Users/benoit/.npm" "--prefer-offline=false" "--prefer-online=false" "--offline=false" "--no-progress" "--no-save" "--no-audit" "--include=dev" "--include=peer" "--include=optional" "--no-package-lock-only" "--no-dry-run"
399 verbose node v16.14.0
400 verbose npm  v8.3.1
401 error code 128
402 error path /Users/benoit/.npm/_cacache/tmp/git-cloneVgtOkV
403 error command failed
404 error command sh -c git submodule update -i -r

STEPS v2:

git clone https://github.com/fails-components/webtransport.git
cd webtransport
npm run preinstall
npm run install

ERROR v2:

> @fails-components/[email protected] preinstall
> git submodule update -i -r


> @fails-components/[email protected] install
> cmake-js build

[ '/usr/local/bin/node', '/usr/local/bin/cmake-js', 'build' ]
info TOOL Using Ninja generator, because ninja is available.
info CMD BUILD
info RUN [
info RUN   'cmake',
info RUN   '--build',
info RUN   '/Users/benoit/dev/quic-test/webtransport/build',
info RUN   '--config',
info RUN   'Release'
info RUN ]
ninja: error: loading 'build.ninja': No such file or directory
ERR! OMG Process terminated: 1
@martenrichter
Copy link
Member

martenrichter commented Mar 8, 2022

Hi,
thanks for the analysis.
I am sorry but I am still struggling, how to incorporate the git submodules in npm for the different libraries correctly.
After looking into the npm install docs, it seems to be necessary to use:
npm install --save git+https://github.com/fails-components/webtransport
for the installation, since this should should also fetch the submodules. (I do not have a unix cmd at hand, it still fails under windows, but would be nice if you can try it and post the error log).
This was for v1.

For v2, please do instead:

cd webtransport
git submodule update -i -r
npm run install

I have no removed the git submodule update, since it did not work in v1.
But I am puzzled about the message, that it does not find build.ninja. Since this should be generated by cmake.js in build/build.ninja, can you check this and the content of the build directory?

@martenrichter
Copy link
Member

Ok v1 is still broken, it seems, that npm strips the whole .git stuff before installing, in this way also the submodules are gone..., this need some additional work.

@benbenz
Copy link
Author

benbenz commented Mar 8, 2022

Hi,

No worries!

v1

With the new URL, it seems it goes further, but stops when it compiles the webtransport project:

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/benoit/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > @fails-components/[email protected] install
npm ERR! > cmake-js build
npm ERR! 
npm ERR! [
npm ERR!   '/usr/local/bin/node',
npm ERR!   '/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ/node_modules/.bin/cmake-js',
npm ERR!   'build'
npm ERR! ]
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- The C compiler identification is AppleClang 10.0.0.10001145
npm ERR! -- The CXX compiler identification is AppleClang 10.0.0.10001145
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
npm ERR! -- Detecting C compile features
npm ERR! -- Detecting C compile features - done
npm ERR! -- Detecting CXX compiler ABI info
npm ERR! -- Detecting CXX compiler ABI info - done
npm ERR! -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.19.4") 
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! See also "/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ/build/CMakeFiles/CMakeOutput.log".
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! info TOOL Using Ninja generator, because ninja is available.
npm ERR! info CMD CONFIGURE
npm ERR! info RUN [
npm ERR! info RUN   'cmake',
npm ERR! info RUN   '/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ',
npm ERR! info RUN   '--no-warn-unused-cli',
npm ERR! info RUN   '-G',
npm ERR! info RUN   'Ninja',
npm ERR! info RUN   '-DCMAKE_JS_VERSION=6.3.0',
npm ERR! info RUN   '-DCMAKE_BUILD_TYPE=Release',
npm ERR! info RUN   '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ/build/Release',
npm ERR! info RUN   '-DCMAKE_JS_INC=/Users/benoit/.cmake-js/node-x64/v16.14.0/include/node;/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ/node_modules/nan',
npm ERR! info RUN   '-DCMAKE_JS_SRC=',
npm ERR! info RUN   '-DNODE_RUNTIME=node',
npm ERR! info RUN   '-DNODE_RUNTIMEVERSION=16.14.0',
npm ERR! info RUN   '-DNODE_ARCH=x64',
npm ERR! info RUN   '-DCMAKE_CXX_FLAGS=-D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION',
npm ERR! info RUN   '-DCMAKE_SHARED_LINKER_FLAGS=-undefined dynamic_lookup'
npm ERR! info RUN ]
npm ERR! CMake Error at CMakeLists.txt:13 (add_subdirectory):
npm ERR!   add_subdirectory given source "third_party/abseil-cpp" which is not an
npm ERR!   existing directory.
npm ERR! 
npm ERR! 
npm ERR! CMake Error at CMakeLists.txt:16 (add_subdirectory):
npm ERR!   add_subdirectory given source "third_party/boringssl/src" which is not an
npm ERR!   existing directory.
npm ERR! 
npm ERR! 
npm ERR! CMake Error at CMakeLists.txt:19 (add_subdirectory):
npm ERR!   add_subdirectory given source "third_party/zlib" which is not an existing
npm ERR!   directory.
npm ERR! 
npm ERR! 
npm ERR! ERR! OMG Process terminated: 1
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c cmake-js build
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/benoit/.npm/_logs/2022-03-08T16_08_41_942Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/benoit/.npm/_logs/2022-03-08T16_06_15_291Z-debug-0.log

Details in

debug.log

0 verbose cli [
0 verbose cli   '/usr/local/bin/node',
0 verbose cli   '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli   'install',
0 verbose cli   '--force',
0 verbose cli   '--cache=/Users/benoit/.npm',
0 verbose cli   '--prefer-offline=false',
0 verbose cli   '--prefer-online=false',
0 verbose cli   '--offline=false',
0 verbose cli   '--no-progress',
0 verbose cli   '--no-save',
0 verbose cli   '--no-audit',
0 verbose cli   '--include=dev',
0 verbose cli   '--include=peer',
0 verbose cli   '--include=optional',
0 verbose cli   '--no-package-lock-only',
0 verbose cli   '--no-dry-run'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 4ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ/.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/Users/benoit/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 18ms
19 timing npm:load:configload Completed in 19ms
20 timing npm:load:setTitle Completed in 26ms
21 timing config:load:flatten Completed in 5ms
22 timing npm:load:display Completed in 6ms
23 verbose logfile /Users/benoit/.npm/_logs/2022-03-08T16_08_41_942Z-debug-0.log
24 timing npm:load:logFile Completed in 19ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 warn using --force Recommended protections disabled.
28 timing npm:load Completed in 74ms
29 timing arborist:ctor Completed in 1ms
30 silly logfile start cleaning logs, removing 1 files
31 timing idealTree:init Completed in 303ms
32 timing idealTree:userRequests Completed in 1ms
33 silly idealTree buildDeps
34 timing idealTree:#root Completed in 0ms
35 timing idealTree:buildDeps Completed in 2ms
36 timing idealTree:fixDepFlags Completed in 0ms
37 timing idealTree Completed in 307ms
38 timing reify:loadTrees Completed in 312ms
39 timing reify:diffTrees Completed in 13ms
40 silly reify moves {}
41 timing reify:retireShallow Completed in 1ms
42 timing reify:createSparse Completed in 100ms
43 timing reify:loadBundles Completed in 0ms
44 timing reifyNode:node_modules/setimmediate Completed in 3216ms
45 timing reifyNode:node_modules/natural-compare Completed in 3219ms
46 timing reifyNode:node_modules/is-iojs Completed in 3221ms
47 timing reifyNode:node_modules/invert-kv Completed in 3225ms
48 timing reifyNode:node_modules/wrap-ansi Completed in 3277ms
49 timing reifyNode:node_modules/wrappy Completed in 3278ms
50 timing reifyNode:node_modules/universalify Completed in 3296ms
51 timing reifyNode:node_modules/to-fast-properties Completed in 3297ms
52 timing reifyNode:node_modules/strip-bom Completed in 3308ms
53 timing reifyNode:node_modules/strip-json-comments Completed in 3309ms
54 timing reifyNode:node_modules/strip-ansi Completed in 3309ms
55 timing reifyNode:node_modules/string-width Completed in 3309ms
56 timing reifyNode:node_modules/shebang-command Completed in 3317ms
57 timing reifyNode:node_modules/resolve-from Completed in 3317ms
58 timing reifyNode:node_modules/slice-ansi Completed in 3319ms
59 timing reifyNode:node_modules/require-from-string Completed in 3319ms
60 timing reifyNode:node_modules/process-nextick-args Completed in 3347ms
61 timing reifyNode:node_modules/path-is-absolute Completed in 3348ms
62 timing reifyNode:node_modules/parent-module Completed in 3348ms
63 timing reifyNode:node_modules/path-exists Completed in 3348ms
64 timing reifyNode:node_modules/os-locale Completed in 3348ms
65 timing reifyNode:node_modules/p-locate Completed in 3349ms
66 timing reifyNode:node_modules/path-parse Completed in 3351ms
67 timing reifyNode:node_modules/p-try Completed in 3350ms
68 timing reifyNode:node_modules/number-is-nan Completed in 3350ms
69 timing reifyNode:node_modules/p-limit Completed in 3352ms
70 timing reifyNode:node_modules/once Completed in 3353ms
71 timing reifyNode:node_modules/ms Completed in 3353ms
72 timing reifyNode:node_modules/locate-path Completed in 3352ms
73 timing reifyNode:node_modules/is-extglob Completed in 3384ms
74 timing reifyNode:node_modules/is-fullwidth-code-point Completed in 3396ms
75 timing reifyNode:node_modules/ini Completed in 3410ms
76 timing reifyNode:node_modules/has-unicode Completed in 3411ms
77 timing reifyNode:node_modules/imurmurhash Completed in 3411ms
78 timing reifyNode:node_modules/inflight Completed in 3412ms
79 timing reifyNode:node_modules/find-up Completed in 3424ms
80 timing reifyNode:node_modules/fast-levenshtein Completed in 3425ms
81 timing reifyNode:node_modules/fs-minipass Completed in 3437ms
82 timing reifyNode:node_modules/eslint-plugin-import/node_modules/ms Completed in 3438ms
83 timing reifyNode:node_modules/eslint-import-resolver-node Completed in 3446ms
84 timing reifyNode:node_modules/duplexer2 Completed in 3498ms
85 timing reifyNode:node_modules/color-name Completed in 3499ms
86 timing reifyNode:node_modules/convert-source-map Completed in 3500ms
87 timing reifyNode:node_modules/code-point-at Completed in 3499ms
88 timing reifyNode:node_modules/camelcase Completed in 3500ms
89 timing reifyNode:node_modules/chownr Completed in 3507ms
90 timing reifyNode:node_modules/bindings Completed in 3511ms
91 timing reifyNode:node_modules/brace-expansion Completed in 3512ms
92 timing reifyNode:node_modules/decamelize Completed in 3513ms
93 timing reifyNode:node_modules/buffer-shims Completed in 3512ms
94 timing reifyNode:node_modules/ansi-regex Completed in 3519ms
95 timing reifyNode:node_modules/@types/json5 Completed in 3520ms
96 timing reifyNode:node_modules/@babel/highlight/node_modules/has-flag Completed in 3530ms
97 timing reifyNode:node_modules/@babel/highlight/node_modules/ansi-styles Completed in 3532ms
98 timing reifyNode:node_modules/@babel/highlight/node_modules/escape-string-regexp Completed in 3548ms
99 timing reifyNode:node_modules/word-wrap Completed in 3567ms
100 timing reifyNode:node_modules/y18n Completed in 3576ms
101 timing reifyNode:node_modules/window-size Completed in 3578ms
102 timing reifyNode:node_modules/table/node_modules/string-width Completed in 3590ms
103 timing reifyNode:node_modules/table/node_modules/strip-ansi Completed in 3591ms
104 timing reifyNode:node_modules/table/node_modules/ansi-regex Completed in 3591ms
105 timing reifyNode:node_modules/table/node_modules/is-fullwidth-code-point Completed in 3592ms
106 timing reifyNode:node_modules/string_decoder Completed in 3592ms
107 timing reifyNode:node_modules/slice-ansi/node_modules/is-fullwidth-code-point Completed in 3593ms
108 timing reifyNode:node_modules/splitargs Completed in 3594ms
109 timing reifyNode:node_modules/supports-color Completed in 3596ms
110 timing reifyNode:node_modules/shebang-regex Completed in 3604ms
111 timing reifyNode:node_modules/path-key Completed in 3604ms
112 timing reifyNode:node_modules/minizlib Completed in 3606ms
113 timing reifyNode:node_modules/minipass Completed in 3614ms
114 timing reifyNode:node_modules/lru-cache Completed in 3614ms
115 timing reifyNode:node_modules/lodash.padend Completed in 3614ms
116 timing reifyNode:node_modules/lodash.pad Completed in 3616ms
117 timing reifyNode:node_modules/lodash.padstart Completed in 3616ms
118 timing reifyNode:node_modules/lodash.truncate Completed in 3618ms
119 timing reifyNode:node_modules/lcid Completed in 3618ms
120 timing reifyNode:node_modules/is-glob Completed in 3634ms
121 timing reifyNode:node_modules/inherits Completed in 3635ms
122 timing reifyNode:node_modules/import-fresh Completed in 3634ms
123 timing reifyNode:node_modules/has-flag Completed in 3635ms
124 timing reifyNode:node_modules/glob-parent Completed in 3679ms
125 timing reifyNode:node_modules/eslint/node_modules/strip-ansi Completed in 3680ms
126 timing reifyNode:node_modules/eslint/node_modules/ansi-regex Completed in 3681ms
127 timing reifyNode:node_modules/escape-string-regexp Completed in 3682ms
128 timing reifyNode:node_modules/eslint/node_modules/strip-json-comments Completed in 3683ms
129 timing reifyNode:node_modules/core-util-is Completed in 3692ms
130 timing reifyNode:node_modules/callsites Completed in 3692ms
131 timing reifyNode:node_modules/cliui Completed in 3694ms
132 timing reifyNode:node_modules/astral-regex Completed in 3705ms
133 timing reifyNode:node_modules/@eslint/eslintrc/node_modules/strip-json-comments Completed in 3708ms
134 timing reifyNode:node_modules/@babel/traverse/node_modules/@babel/code-frame Completed in 3708ms
135 timing reifyNode:node_modules/@babel/template/node_modules/@babel/code-frame Completed in 3709ms
136 timing reifyNode:node_modules/@babel/highlight/node_modules/supports-color Completed in 3717ms
137 timing reifyNode:node_modules/@babel/highlight Completed in 3720ms
138 timing reifyNode:node_modules/@babel/helper-split-export-declaration Completed in 3721ms
139 timing reifyNode:node_modules/@babel/helper-hoist-variables Completed in 3722ms
140 timing reifyNode:node_modules/@babel/helper-function-name Completed in 3722ms
141 timing reifyNode:node_modules/@babel/helper-get-function-arity Completed in 3723ms
142 timing reifyNode:node_modules/@babel/helper-simple-access Completed in 3723ms
143 timing reifyNode:node_modules/@babel/helper-environment-visitor Completed in 3723ms
144 timing reifyNode:node_modules/@babel/core/node_modules/@babel/code-frame Completed in 3724ms
145 timing reifyNode:node_modules/util-deprecate Completed in 3749ms
146 timing reifyNode:node_modules/yallist Completed in 3752ms
147 timing reifyNode:node_modules/unzipper/node_modules/process-nextick-args Completed in 3768ms
148 timing reifyNode:node_modules/rimraf Completed in 3771ms
149 timing reifyNode:node_modules/lru-cache/node_modules/yallist Completed in 3782ms
150 timing reifyNode:node_modules/minimatch Completed in 3783ms
151 timing reifyNode:node_modules/isarray Completed in 3790ms
152 timing reifyNode:node_modules/jsonfile Completed in 3794ms
153 timing reifyNode:node_modules/js-tokens Completed in 3804ms
154 timing reifyNode:node_modules/fs.realpath Completed in 3843ms
155 timing reifyNode:node_modules/esrecurse Completed in 3857ms
156 timing reifyNode:node_modules/ansi-styles Completed in 4707ms
157 timing reifyNode:node_modules/balanced-match Completed in 4728ms
158 timing reifyNode:node_modules/@babel/code-frame Completed in 4871ms
159 timing reifyNode:node_modules/which Completed in 4909ms
160 timing reifyNode:node_modules/v8-compile-cache Completed in 4910ms
161 timing reifyNode:node_modules/url-join Completed in 4931ms
162 timing reifyNode:node_modules/safe-buffer Completed in 4951ms
163 timing reifyNode:node_modules/picocolors Completed in 4963ms
164 timing reifyNode:node_modules/mkdirp Completed in 4969ms
165 timing reifyNode:node_modules/has Completed in 5028ms
166 timing reifyNode:node_modules/file-entry-cache Completed in 5889ms
167 timing reifyNode:node_modules/eslint-plugin-prettier Completed in 6012ms
168 timing reifyNode:node_modules/duplexer2/node_modules/string_decoder Completed in 6061ms
169 timing reifyNode:node_modules/deep-extend Completed in 6063ms
170 timing reifyNode:node_modules/cross-spawn/node_modules/which Completed in 6064ms
171 timing reifyNode:node_modules/are-we-there-yet/node_modules/string_decoder Completed in 6064ms
172 timing reifyNode:node_modules/@humanwhocodes/config-array Completed in 6065ms
173 timing reifyNode:node_modules/@babel/traverse/node_modules/globals Completed in 6066ms
174 timing reifyNode:node_modules/@babel/highlight/node_modules/color-name Completed in 6066ms
175 timing reifyNode:node_modules/unzipper/node_modules/isarray Completed in 6085ms
176 timing reifyNode:node_modules/tar/node_modules/safe-buffer Completed in 6084ms
177 timing reifyNode:node_modules/type-check Completed in 6087ms
178 timing reifyNode:node_modules/punycode Completed in 6092ms
179 timing reifyNode:node_modules/lodash.merge Completed in 6093ms
180 timing reifyNode:node_modules/listenercount Completed in 6093ms
181 timing reifyNode:node_modules/flat-cache/node_modules/rimraf Completed in 6144ms
182 timing reifyNode:node_modules/eslint-config-standard Completed in 6153ms
183 timing reifyNode:node_modules/duplexer2/node_modules/isarray Completed in 6158ms
184 timing reifyNode:node_modules/are-we-there-yet/node_modules/isarray Completed in 6175ms
185 timing reifyNode:node_modules/acorn-jsx Completed in 6176ms
186 timing reifyNode:node_modules/@babel/helper-validator-option Completed in 6195ms
187 timing reifyNode:node_modules/progress Completed in 6225ms
188 timing reifyNode:node_modules/levn Completed in 6225ms
189 timing reifyNode:node_modules/follow-redirects Completed in 6258ms
190 timing reifyNode:node_modules/eslint-visitor-keys Completed in 6268ms
191 timing reifyNode:node_modules/eslint-plugin-standard Completed in 6279ms
192 timing reifyNode:node_modules/espree/node_modules/eslint-visitor-keys Completed in 6282ms
193 timing reifyNode:node_modules/eslint-utils/node_modules/eslint-visitor-keys Completed in 6282ms
194 timing reifyNode:node_modules/debug Completed in 6322ms
195 timing reifyNode:node_modules/delegates Completed in 6325ms
196 timing reifyNode:node_modules/color-convert Completed in 6325ms
197 timing reifyNode:node_modules/concat-map Completed in 6326ms
198 timing reifyNode:node_modules/buffers Completed in 6326ms
199 timing reifyNode:node_modules/ansi-colors Completed in 6326ms
200 timing reifyNode:node_modules/@babel/helper-validator-identifier Completed in 6329ms
201 timing reifyNode:node_modules/@babel/highlight/node_modules/color-convert Completed in 6329ms
202 timing reifyNode:node_modules/memory-stream Completed in 6375ms
203 timing reifyNode:node_modules/isexe Completed in 6391ms
204 timing reifyNode:node_modules/graceful-fs Completed in 6394ms
205 timing reifyNode:node_modules/globals Completed in 6397ms
206 timing reifyNode:node_modules/fast-diff Completed in 6399ms
207 timing reifyNode:node_modules/estraverse Completed in 6400ms
208 timing reifyNode:node_modules/esrecurse/node_modules/estraverse Completed in 6401ms
209 timing reifyNode:node_modules/esquery/node_modules/estraverse Completed in 6401ms
210 timing reifyNode:node_modules/chainsaw Completed in 6402ms
211 timing reifyNode:node_modules/@babel/highlight/node_modules/chalk Completed in 6402ms
212 timing reifyNode:node_modules/@babel/helper-module-imports Completed in 6500ms
213 timing reifyNode:node_modules/semver Completed in 6549ms
214 timing reifyNode:node_modules/optionator Completed in 6548ms
215 timing reifyNode:node_modules/ignore Completed in 6546ms
216 timing reifyNode:node_modules/functional-red-black-tree Completed in 6546ms
217 timing reifyNode:node_modules/glob Completed in 6546ms
218 timing reifyNode:node_modules/gensync Completed in 6546ms
219 timing reifyNode:node_modules/file-uri-to-path Completed in 6547ms
220 timing reifyNode:node_modules/flat-cache Completed in 6547ms
221 timing reifyNode:node_modules/escalade Completed in 6548ms
222 timing reifyNode:node_modules/deep-is Completed in 6553ms
223 timing reifyNode:node_modules/chalk Completed in 6555ms
224 timing reifyNode:node_modules/buffer-indexof-polyfill Completed in 6557ms
225 timing reifyNode:node_modules/are-we-there-yet Completed in 6557ms
226 timing reifyNode:node_modules/supports-preserve-symlinks-flag Completed in 6576ms
227 timing reifyNode:node_modules/npmlog Completed in 6574ms
228 timing reifyNode:node_modules/node-releases Completed in 6574ms
229 timing reifyNode:node_modules/jsesc Completed in 6572ms
230 timing reifyNode:node_modules/is-weakref Completed in 6573ms
231 timing reifyNode:node_modules/is-shared-array-buffer Completed in 6574ms
232 timing reifyNode:node_modules/gauge Completed in 6571ms
233 timing reifyNode:node_modules/eslint-plugin-node/node_modules/ignore Completed in 6572ms
234 timing reifyNode:node_modules/emoji-regex Completed in 6575ms
235 timing reifyNode:node_modules/cross-spawn Completed in 6576ms
236 timing reifyNode:node_modules/json-schema-traverse Completed in 6587ms
237 timing reifyNode:node_modules/is-regex Completed in 6588ms
238 timing reifyNode:node_modules/is-core-module Completed in 6587ms
239 timing reifyNode:node_modules/eslint-plugin-node/node_modules/semver Completed in 6585ms
240 timing reifyNode:node_modules/eslint-import-resolver-node/node_modules/debug Completed in 6626ms
241 timing reifyNode:node_modules/eslint-module-utils/node_modules/debug Completed in 6627ms
242 timing reifyNode:node_modules/define-properties Completed in 6628ms
243 timing reifyNode:node_modules/@babel/helper-compilation-targets/node_modules/semver Completed in 6654ms
244 timing reifyNode:node_modules/@babel/helper-module-transforms Completed in 6656ms
245 timing reifyNode:node_modules/@babel/eslint-parser/node_modules/semver Completed in 6657ms
246 timing reifyNode:node_modules/@babel/core/node_modules/semver Completed in 6657ms
247 timing reifyNode:node_modules/side-channel Completed in 6674ms
248 timing reifyNode:node_modules/is-string Completed in 6672ms
249 timing reifyNode:node_modules/is-callable Completed in 6672ms
250 timing reifyNode:node_modules/is-bigint Completed in 6672ms
251 timing reifyNode:node_modules/has-bigints Completed in 6671ms
252 timing reifyNode:node_modules/fast-deep-equal Completed in 6671ms
253 timing reifyNode:node_modules/esutils Completed in 6671ms
254 timing reifyNode:node_modules/@jridgewell/sourcemap-codec Completed in 6671ms
255 timing reifyNode:node_modules/@babel/template Completed in 6695ms
256 timing reifyNode:node_modules/@jridgewell/resolve-uri Completed in 6695ms
257 timing reifyNode:node_modules/@babel/helper-compilation-targets Completed in 6695ms
258 timing reifyNode:node_modules/unbox-primitive Completed in 6712ms
259 timing reifyNode:node_modules/which-boxed-primitive Completed in 6720ms
260 timing reifyNode:node_modules/prelude-ls Completed in 6722ms
261 timing reifyNode:node_modules/prettier-linter-helpers Completed in 6723ms
262 timing reifyNode:node_modules/is-symbol Completed in 6720ms
263 timing reifyNode:node_modules/is-number-object Completed in 6752ms
264 timing reifyNode:node_modules/is-negative-zero Completed in 6754ms
265 timing reifyNode:node_modules/is-date-object Completed in 6754ms
266 timing reifyNode:node_modules/is-boolean-object Completed in 6756ms
267 timing reifyNode:node_modules/internal-slot Completed in 6757ms
268 timing reifyNode:node_modules/function-bind Completed in 6755ms
269 timing reifyNode:node_modules/get-symbol-description Completed in 6755ms
270 timing reifyNode:node_modules/eslint-config-prettier Completed in 6762ms
271 timing reifyNode:node_modules/rc Completed in 6795ms
272 timing reifyNode:node_modules/object-keys Completed in 6797ms
273 timing reifyNode:node_modules/get-intrinsic Completed in 6797ms
274 timing reifyNode:node_modules/call-bind Completed in 6815ms
275 timing reifyNode:node_modules/unzipper Completed in 6844ms
276 timing reifyNode:node_modules/has-tostringtag Completed in 6877ms
277 timing reifyNode:node_modules/browserslist Completed in 6894ms
278 timing reifyNode:node_modules/@jridgewell/trace-mapping Completed in 6910ms
279 timing reifyNode:node_modules/text-table Completed in 6942ms
280 timing reifyNode:node_modules/string.prototype.trimend Completed in 6945ms
281 timing reifyNode:node_modules/string.prototype.trimstart Completed in 6946ms
282 timing reifyNode:node_modules/espree Completed in 6951ms
283 timing reifyNode:node_modules/eslint-plugin-import/node_modules/doctrine Completed in 6969ms
284 timing reifyNode:node_modules/doctrine Completed in 6979ms
285 timing reifyNode:node_modules/has-symbols Completed in 7024ms
286 timing reifyNode:node_modules/ansi Completed in 7053ms
287 timing reifyNode:node_modules/table/node_modules/json-schema-traverse Completed in 7079ms
288 timing reifyNode:node_modules/readable-stream Completed in 7078ms
289 timing reifyNode:node_modules/json-stable-stringify-without-jsonify Completed in 7075ms
290 timing reifyNode:node_modules/big-integer Completed in 7101ms
291 timing reifyNode:node_modules/@babel/compat-data Completed in 7113ms
292 timing reifyNode:node_modules/eslint-module-utils Completed in 7153ms
293 timing reifyNode:node_modules/fast-json-stable-stringify Completed in 7254ms
294 timing reifyNode:node_modules/eslint-plugin-import/node_modules/debug Completed in 7253ms
295 timing reifyNode:node_modules/array.prototype.flat Completed in 7253ms
296 timing reifyNode:node_modules/@humanwhocodes/object-schema Completed in 7253ms
297 timing reifyNode:node_modules/object.values Completed in 7269ms
298 timing reifyNode:node_modules/eslint-scope Completed in 7262ms
299 timing reifyNode:node_modules/sprintf-js Completed in 7292ms
300 timing reifyNode:node_modules/json5 Completed in 7290ms
301 timing reifyNode:node_modules/es-to-primitive Completed in 7296ms
302 timing reifyNode:node_modules/electron-to-chromium Completed in 7312ms
303 timing reifyNode:node_modules/array-includes Completed in 7312ms
304 timing reifyNode:node_modules/minimist Completed in 7338ms
305 timing reifyNode:node_modules/@ampproject/remapping Completed in 7338ms
306 timing reifyNode:node_modules/regexpp Completed in 7382ms
307 timing reifyNode:node_modules/@babel/helpers Completed in 7430ms
308 timing reifyNode:node_modules/esprima Completed in 7452ms
309 timing reifyNode:node_modules/flatted Completed in 7454ms
310 timing reifyNode:node_modules/eslint-utils Completed in 7485ms
311 timing reifyNode:node_modules/@babel/eslint-parser Completed in 7494ms
312 timing reifyNode:node_modules/traverse Completed in 7511ms
313 timing reifyNode:node_modules/eslint-plugin-promise Completed in 7514ms
314 timing reifyNode:node_modules/object.assign Completed in 7538ms
315 timing reifyNode:node_modules/fstream Completed in 7533ms
316 timing reifyNode:node_modules/unzipper/node_modules/readable-stream Completed in 7596ms
317 timing reifyNode:node_modules/cmake-js Completed in 7629ms
318 timing reifyNode:node_modules/duplexer2/node_modules/readable-stream Completed in 7697ms
319 timing reifyNode:node_modules/are-we-there-yet/node_modules/readable-stream Completed in 7697ms
320 timing reifyNode:node_modules/@babel/generator Completed in 7731ms
321 timing reifyNode:node_modules/tar Completed in 7757ms
322 timing reifyNode:node_modules/@babel/core/node_modules/json5 Completed in 7747ms
323 timing reifyNode:node_modules/yargs Completed in 7812ms
324 timing reifyNode:node_modules/argparse Completed in 7845ms
325 timing reifyNode:node_modules/node-addon-api Completed in 7857ms
326 timing reifyNode:node_modules/object-inspect Completed in 7862ms
327 timing reifyNode:node_modules/@eslint/eslintrc Completed in 7859ms
328 timing reifyNode:node_modules/binary Completed in 7876ms
329 timing reifyNode:node_modules/tsconfig-paths Completed in 7902ms
330 timing reifyNode:node_modules/type-fest Completed in 7964ms
331 timing reifyNode:node_modules/eslint/node_modules/semver Completed in 8086ms
332 timing reifyNode:node_modules/@babel/traverse Completed in 8179ms
333 timing reifyNode:node_modules/enquirer Completed in 8196ms
334 timing reifyNode:node_modules/source-map Completed in 8258ms
335 timing reifyNode:node_modules/js-yaml Completed in 8303ms
336 timing reifyNode:node_modules/esquery Completed in 8308ms
337 timing reifyNode:node_modules/axios Completed in 8342ms
338 timing reifyNode:node_modules/uri-js Completed in 8451ms
339 timing reifyNode:node_modules/nan Completed in 8457ms
340 timing reifyNode:node_modules/acorn Completed in 8459ms
341 timing reifyNode:node_modules/fs-extra Completed in 8523ms
342 timing reifyNode:node_modules/bluebird Completed in 8523ms
343 timing reifyNode:node_modules/@babel/parser Completed in 8659ms
344 timing reifyNode:node_modules/eslint-plugin-node Completed in 8706ms
345 timing reifyNode:node_modules/@babel/core Completed in 8721ms
346 timing reifyNode:node_modules/eslint-plugin-es Completed in 8726ms
347 timing reifyNode:node_modules/table Completed in 8871ms
348 timing reifyNode:node_modules/ajv Completed in 9043ms
349 timing reifyNode:node_modules/eslint-plugin-import Completed in 9318ms
350 timing reifyNode:node_modules/resolve Completed in 9368ms
351 timing reifyNode:node_modules/@babel/types Completed in 9460ms
352 timing reifyNode:node_modules/table/node_modules/ajv Completed in 10665ms
353 timing reifyNode:node_modules/eslint Completed in 11036ms
354 timing reifyNode:node_modules/caniuse-lite Completed in 12042ms
355 timing reifyNode:node_modules/lodash Completed in 12254ms
356 timing reifyNode:node_modules/es-abstract Completed in 12265ms
357 timing reifyNode:node_modules/prettier Completed in 12281ms
358 timing reify:unpack Completed in 12287ms
359 timing reify:unretire Completed in 0ms
360 timing build:queue Completed in 13ms
361 timing build:link:node_modules/@babel/parser Completed in 18ms
362 timing build:link:node_modules/@babel/core/node_modules/json5 Completed in 15ms
363 timing build:link:node_modules/cross-spawn/node_modules/which Completed in 15ms
364 timing build:link:node_modules/@babel/eslint-parser/node_modules/semver Completed in 15ms
365 timing build:link:node_modules/flat-cache/node_modules/rimraf Completed in 15ms
366 timing build:link:node_modules/eslint/node_modules/semver Completed in 15ms
367 timing build:link:node_modules/@babel/helper-compilation-targets/node_modules/semver Completed in 15ms
368 timing build:link:node_modules/acorn Completed in 18ms
369 timing build:link:node_modules/eslint-plugin-node/node_modules/semver Completed in 15ms
370 timing build:link:node_modules/cmake-js Completed in 18ms
371 timing build:link:node_modules/eslint Completed in 18ms
372 timing build:link:node_modules/eslint-config-prettier Completed in 18ms
373 timing build:link:node_modules/browserslist Completed in 18ms
374 timing build:link:node_modules/esprima Completed in 17ms
375 timing build:link:node_modules/js-yaml Completed in 17ms
376 timing build:link:node_modules/jsesc Completed in 17ms
377 timing build:link:node_modules/json5 Completed in 18ms
378 timing build:link:node_modules/rc Completed in 17ms
379 timing build:link:node_modules/mkdirp Completed in 18ms
380 timing build:link:node_modules/rimraf Completed in 17ms
381 timing build:link:node_modules/prettier Completed in 18ms
382 timing build:link:node_modules/semver Completed in 17ms
383 timing build:link:node_modules/which Completed in 17ms
384 timing build:link:node_modules/@babel/core/node_modules/semver Completed in 16ms
385 timing build:link:node_modules/resolve Completed in 17ms
386 timing build:link:node_modules/window-size Completed in 17ms
387 timing build:link Completed in 20ms
388 timing build:deps Completed in 34ms
389 timing build Completed in 34ms
390 timing reify:build Completed in 35ms
391 timing reify:trash Completed in 0ms
392 timing reify Completed in 12803ms
393 timing command:install Completed in 19076ms
394 verbose stack Error: command failed
394 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
394 verbose stack     at ChildProcess.emit (node:events:520:28)
394 verbose stack     at maybeClose (node:internal/child_process:1092:16)
394 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
395 verbose pkgid @fails-components/[email protected]
396 verbose cwd /Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ
397 verbose Darwin 17.7.0
398 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "install" "--force" "--cache=/Users/benoit/.npm" "--prefer-offline=false" "--prefer-online=false" "--offline=false" "--no-progress" "--no-save" "--no-audit" "--include=dev" "--include=peer" "--include=optional" "--no-package-lock-only" "--no-dry-run"
399 verbose node v16.14.0
400 verbose npm  v8.3.1
401 error code 1
402 error path /Users/benoit/.npm/_cacache/tmp/git-cloneaKQhsZ
403 error command failed
404 error command sh -c cmake-js build
405 verbose exit 1
406 timing npm Completed in 20031ms
407 verbose code 1
408 error A complete log of this run can be found in:
408 error     /Users/benoit/.npm/_logs/2022-03-08T16_08_41_942Z-debug-0.log

v2

This is indeed puzzling. I'm probably doing something wrong?
Following your new commands, I get the following output:


> @fails-components/[email protected] install
> cmake-js build

[ '/usr/local/bin/node', '/usr/local/bin/cmake-js', 'build' ]
info TOOL Using Ninja generator, because ninja is available.
info CMD CONFIGURE
info RUN [
info RUN   'cmake',
info RUN   '/Users/benoit/dev/webtransport',
info RUN   '--no-warn-unused-cli',
info RUN   '-G',
info RUN   'Ninja',
info RUN   '-DCMAKE_JS_VERSION=6.3.0',
info RUN   '-DCMAKE_BUILD_TYPE=Release',
info RUN   '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/benoit/dev/webtransport/build/Release',
info RUN   '-DCMAKE_JS_INC=/Users/benoit/.cmake-js/node-x64/v16.14.0/include/node',
info RUN   '-DCMAKE_JS_SRC=',
info RUN   '-DNODE_RUNTIME=node',
info RUN   '-DNODE_RUNTIMEVERSION=16.14.0',
info RUN   '-DNODE_ARCH=x64',
info RUN   '-DCMAKE_CXX_FLAGS=-D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION',
info RUN   '-DCMAKE_SHARED_LINKER_FLAGS=-undefined dynamic_lookup'
info RUN ]
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found Perl: /usr/bin/perl (found version "5.18.2") 
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMake Deprecation Warning at third_party/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Renaming
--     /Users/benoit/dev/webtransport/third_party/zlib/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.19.4") 
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'node-addon-api'
Require stack:
- /Users/benoit/dev/webtransport/[eval]
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at [eval]:1:1
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:75:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:74:60) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/benoit/dev/webtransport/[eval]' ]
}
CMake Error at CMakeLists.txt:825 (string):
  string sub-command REPLACE requires at least four arguments.


CMake Error at CMakeLists.txt:826 (string):
  string sub-command REPLACE requires at least four arguments.


-- Configuring incomplete, errors occurred!
See also "/Users/benoit/dev/webtransport/build/CMakeFiles/CMakeOutput.log".
See also "/Users/benoit/dev/webtransport/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
CMakeOutput.log

The system is: Darwin - 17.7.0 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is AppleClang, found in "/Users/benoit/dev/webtransport/build/CMakeFiles/3.23.0-rc2/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ 
Build flags: -D_DARWIN_USE_64_BIT_INODE=1;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS=64;-DBUILDING_NODE_EXTENSION
Id flags:  

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is AppleClang, found in "/Users/benoit/dev/webtransport/build/CMakeFiles/3.23.0-rc2/CompilerIdCXX/a.out"

Detecting C compiler ABI info compiled with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_1d9a0 && [1/2] Building C object CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument]
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -coverage-notes-file /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.gcno -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -dependency-file CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -sys-header-deps -MT CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -fdebug-compilation-dir /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.13.0 -fmax-type-align=16 -fdiagnostics-show-option -o CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -x c /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeCCompilerABI.c
clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin17.7.0
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
[2/2] Linking C executable cmTC_1d9a0
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_1d9a0 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld  PROJECT:ld64-409.12
BUILD 02:04:28 Aug 14 2018
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em arm64e arm64_32
Library search paths:
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/



Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/usr/local/include]
    add: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
    add: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/usr/local/include] ==> [/usr/local/include]
  collapse include dir [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include] ==> [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
  collapse include dir [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include] ==> [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/usr/local/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include]


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/ninja cmTC_1d9a0 && [1/2] Building C object CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o]
  ignore line: [Apple LLVM version 10.0.0 (clang-1000.11.45.2)]
  ignore line: [Target: x86_64-apple-darwin17.7.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin]
  ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]]
  ignore line: [ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -coverage-notes-file /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.gcno -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -dependency-file CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o.d -skip-unused-modulemap-deps -sys-header-deps -MT CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -fdebug-compilation-dir /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.13.0 -fmax-type-align=16 -fdiagnostics-show-option -o CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -x c /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeCCompilerABI.c]
  ignore line: [clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin17.7.0]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /usr/local/include]
  ignore line: [ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
  ignore line: [ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
  ignore line: [ /usr/include]
  ignore line: [ /System/Library/Frameworks (framework directory)]
  ignore line: [ /Library/Frameworks (framework directory)]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking C executable cmTC_1d9a0]
  ignore line: [Apple LLVM version 10.0.0 (clang-1000.11.45.2)]
  ignore line: [Target: x86_64-apple-darwin17.7.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin]
  link line: [ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_1d9a0 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld] ==> ignore
    arg [-demangle] ==> ignore
    arg [-lto_library] ==> ignore, skip following value
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib] ==> skip value of -lto_library
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-macosx_version_min] ==> ignore
    arg [10.13.0] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_1d9a0] ==> ignore
    arg [-search_paths_first] ==> ignore
    arg [-headerpad_max_install_names] ==> ignore
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTC_1d9a0.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lSystem] ==> lib [System]
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a] ==> lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
  Library search paths: [;/usr/lib;/usr/local/lib]
  Framework search paths: [;/Library/Frameworks/;/System/Library/Frameworks/]
  remove lib [System]
  remove lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  collapse library dir [/usr/local/lib] ==> [/usr/local/lib]
  collapse framework dir [/Library/Frameworks/] ==> [/Library/Frameworks]
  collapse framework dir [/System/Library/Frameworks/] ==> [/System/Library/Frameworks]
  implicit libs: []
  implicit objs: []
  implicit dirs: [/usr/lib;/usr/local/lib]
  implicit fwks: [/Library/Frameworks;/System/Library/Frameworks]


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_cd4d6 && [1/2] Building CXX object CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument]
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -coverage-notes-file /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.gcno -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -dependency-file CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -sys-header-deps -MT CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -D _DARWIN_USE_64_BIT_INODE=1 -D _LARGEFILE_SOURCE -D _FILE_OFFSET_BITS=64 -D BUILDING_NODE_EXTENSION -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.13.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -x c++ /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin17.7.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
[2/2] Linking CXX executable cmTC_cd4d6
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_cd4d6 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld  PROJECT:ld64-409.12
BUILD 02:04:28 Aug 14 2018
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em arm64e arm64_32
Library search paths:
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/



Parsed CXX implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1]
    add: [/usr/local/include]
    add: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
    add: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1] ==> [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1]
  collapse include dir [/usr/local/include] ==> [/usr/local/include]
  collapse include dir [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include] ==> [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
  collapse include dir [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include] ==> [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1;/usr/local/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include]


Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/ninja cmTC_cd4d6 && [1/2] Building CXX object CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [Apple LLVM version 10.0.0 (clang-1000.11.45.2)]
  ignore line: [Target: x86_64-apple-darwin17.7.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin]
  ignore line: [clang: warning: -Wl -v: 'linker' input unused [-Wunused-command-line-argument]]
  ignore line: [ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -coverage-notes-file /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.gcno -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0 -dependency-file CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o.d -skip-unused-modulemap-deps -sys-header-deps -MT CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -D _DARWIN_USE_64_BIT_INODE=1 -D _LARGEFILE_SOURCE -D _FILE_OFFSET_BITS=64 -D BUILDING_NODE_EXTENSION -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.13.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -x c++ /Applications/CMake.app/Contents/share/cmake-3.23/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [clang -cc1 version 10.0.0 (clang-1000.11.45.2) default target x86_64-apple-darwin17.7.0]
  ignore line: [ignoring nonexistent directory "/usr/include/c++/v1"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1]
  ignore line: [ /usr/local/include]
  ignore line: [ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include]
  ignore line: [ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
  ignore line: [ /usr/include]
  ignore line: [ /System/Library/Frameworks (framework directory)]
  ignore line: [ /Library/Frameworks (framework directory)]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking CXX executable cmTC_cd4d6]
  ignore line: [Apple LLVM version 10.0.0 (clang-1000.11.45.2)]
  ignore line: [Target: x86_64-apple-darwin17.7.0]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin]
  link line: [ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_cd4d6 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld] ==> ignore
    arg [-demangle] ==> ignore
    arg [-lto_library] ==> ignore, skip following value
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib] ==> skip value of -lto_library
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-macosx_version_min] ==> ignore
    arg [10.13.0] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_cd4d6] ==> ignore
    arg [-search_paths_first] ==> ignore
    arg [-headerpad_max_install_names] ==> ignore
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTC_cd4d6.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lSystem] ==> lib [System]
    arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a] ==> lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
  Library search paths: [;/usr/lib;/usr/local/lib]
  Framework search paths: [;/Library/Frameworks/;/System/Library/Frameworks/]
  remove lib [System]
  remove lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/lib/darwin/libclang_rt.osx.a]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  collapse library dir [/usr/local/lib] ==> [/usr/local/lib]
  collapse framework dir [/Library/Frameworks/] ==> [/Library/Frameworks]
  collapse framework dir [/System/Library/Frameworks/] ==> [/System/Library/Frameworks]
  implicit libs: [c++]
  implicit objs: []
  implicit dirs: [/usr/lib;/usr/local/lib]
  implicit fwks: [/Library/Frameworks;/System/Library/Frameworks]


Determining if the include file pthread.h exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_54e39 && [1/2] Building C object CMakeFiles/cmTC_54e39.dir/CheckIncludeFile.c.o
[2/2] Linking C executable cmTC_54e39



Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD succeeded with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_af3b1 && [1/2] Building C object CMakeFiles/cmTC_af3b1.dir/src.c.o
[2/2] Linking C executable cmTC_af3b1


Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Checking whether the ASM compiler is AppleClang using "--version" matched "(Apple LLVM version)":
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Determining if the include file sys/types.h exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_0704b && [1/2] Building C object CMakeFiles/cmTC_0704b.dir/CheckIncludeFile.c.o
[2/2] Linking C executable cmTC_0704b



Determining if the include file stdint.h exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_155f2 && [1/2] Building C object CMakeFiles/cmTC_155f2.dir/CheckIncludeFile.c.o
[2/2] Linking C executable cmTC_155f2



Determining if the include file stddef.h exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_3813a && [1/2] Building C object CMakeFiles/cmTC_3813a.dir/CheckIncludeFile.c.o
[2/2] Linking C executable cmTC_3813a



Determining if the function fseeko exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_2cbb3 && [1/2] Building C object CMakeFiles/cmTC_2cbb3.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_2cbb3



Determining if the include file unistd.h exists passed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_484db && [1/2] Building C object CMakeFiles/cmTC_484db.dir/CheckIncludeFile.c.o
[2/2] Linking C executable cmTC_484db
CMakeError.log
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Checking whether the ASM compiler is Clang using "--version" did not match "(clang version)":
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Determining size of off64_t failed with the following output:
Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_54558 && [1/2] Building C object CMakeFiles/cmTC_54558.dir/OFF64_T.c.o
FAILED: CMakeFiles/cmTC_54558.dir/OFF64_T.c.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_SYS_TYPES_H -D_LARGEFILE64_SOURCE=1  -fPIE -MD -MT CMakeFiles/cmTC_54558.dir/OFF64_T.c.o -MF CMakeFiles/cmTC_54558.dir/OFF64_T.c.o.d -o CMakeFiles/cmTC_54558.dir/OFF64_T.c.o -c /Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:29:12: error: use of undeclared identifier 'off64_t'
  ('0' + ((SIZE / 10000)%10)),
           ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:30:12: error: use of undeclared identifier 'off64_t'
  ('0' + ((SIZE / 1000)%10)),
           ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:31:12: error: use of undeclared identifier 'off64_t'
  ('0' + ((SIZE / 100)%10)),
           ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:32:12: error: use of undeclared identifier 'off64_t'
  ('0' + ((SIZE / 10)%10)),
           ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:33:12: error: use of undeclared identifier 'off64_t'
  ('0' +  (SIZE    % 10)),
           ^
/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:27:22: note: expanded from macro 'SIZE'
#define SIZE (sizeof(off64_t))
                     ^
5 errors generated.
ninja: build stopped: subcommand failed.


/Users/benoit/dev/webtransport/build/CMakeFiles/CheckTypeSize/OFF64_T.c:
#include <sys/types.h>
#include <stdint.h>
#include <stddef.h>


#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__PPC64__)
# define KEY '_','_','P','P','C','6','4','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#elif defined(__PPC__)
# define KEY '_','_','P','P','C','_','_'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__aarch64__)
# define KEY '_','_','a','a','r','c','h','6','4','_','_'
#elif defined(__ARM_ARCH_7A__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_'
#elif defined(__ARM_ARCH_7S__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_'
#endif

#define SIZE (sizeof(off64_t))
static char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
  ('0' + ((SIZE / 10000)%10)),
  ('0' + ((SIZE / 1000)%10)),
  ('0' + ((SIZE / 100)%10)),
  ('0' + ((SIZE / 10)%10)),
  ('0' +  (SIZE    % 10)),
  ']',
#ifdef KEY
  ' ','k','e','y','[', KEY, ']',
#endif
  '\0'};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_size[argc];
  (void)argv;
  return require;
}

So I ran a simple npm install to install the node_modules, and I got:

> @fails-components/[email protected] install
> cmake-js build

[
  '/usr/local/bin/node',
  '/Users/benoit/dev/webtransport/node_modules/.bin/cmake-js',
  'build'
]
info TOOL Using Ninja generator, because ninja is available.
info CMD BUILD
info RUN [
info RUN   'cmake',
info RUN   '--build',
info RUN   '/Users/benoit/dev/webtransport/build',
info RUN   '--config',
info RUN   'Release'
info RUN ]
ninja: error: loading 'build.ninja': No such file or directory
ERR! OMG Process terminated: 1
npm ERR! code 1
npm ERR! path /Users/benoit/dev/webtransport
npm ERR! command failed
npm ERR! command sh -c cmake-js build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/benoit/.npm/_logs/2022-03-08T16_20_59_557Z-debug-0.log

The build directory is like this:
build dir

Thank you for your help!

@martenrichter
Copy link
Member

With v1 it is puzzling. The problem is that the libs are git submodules. The new npm command should also fetch the submodules, but for some reasons CMake say the diretories of the three submodules third_party/abseil-cpp, third_party/boringssl/srcandthird_party/zlib` are empty.
While trying to debug, I believe I had it once that it worked today, I will try to find the right commit hash (but I may be mistaken). npm should have handled the submodules, I can not do anything, since the git stuff is already gone in the preinstall script.

For v2, you are right npm run install is wrong npm install is right.
Here is my build directory:
image
But I think in CMakeError.log is the clue:

Change Dir: /Users/benoit/dev/webtransport/build/CMakeFiles/CMakeTmp ```

I can only guess that one of the libraries contain a test for off64_t type and it is not present on Mac OS X. But I have also no clue, which lib and which its cmake file it is. You can google about this error I found for example also OpenCV with this issue... and some google products long time ago....

Any way if it does not help, you may consider running it in a docker linux container as I do it under windows, I assume that the application is finally running under linux anyway.


@martenrichter
Copy link
Member

Ok regarding v1, there seems to be a problem in npm since version 7 (npm/cli#2774) that breaks submodule support in npm. Maybe you can revert back to npm 6, or pursue v2 further.
I have to think, if I start releasing prerelease packages, but actually I do not like this as long as the packages is not really tested.
Regarding v2, you may look into the CMakelists.txt file, there you may want to comment add_subdirectory and see if the error concernung off64_t goes away, if any of them is excluded. Of course other errors will pop up, but in this way we can identify if any of these libs causes CMake to do this test. Protobuf may be another cause.

@benbenz
Copy link
Author

benbenz commented Mar 8, 2022

hi again,

v2 seems to work a little further .... but the main problem is the code relies on the epoll implementation in quiche which is not supported in OSX :(
The dockerization of the server could be an option indeed! But I have a pretty tight session interaction with an existing server that I need to maintain.

"Working" steps:

git clone --recurse-submodules https://github.com/fails-components/webtransport.git
cd webtransport
npm install # this will throw an error but it will install the node_modules
cmake-js compile 

cmake-js compilewill throw errors on all epoll related stuff... (noticeably sys/epoll.h not found). Ex:

/Users/benoit/dev/webtransport/third_party/quiche/epoll_server/simple_epoll_server.h:38:10: fatal error: 'sys/epoll.h' file not found
#include <sys/epoll.h>
         ^~~~~~~~~~~~~

It is possible to comment the simple_epoll_server out of the CMakeList.txt file. But the http3Server seems to be deeply rooted in EPoll.

Note1

I had to use clang v13 to avoid some compilation errors with quiche (I used the v13.0.1 binary distribution for OSX on llvm website). The flag CXXFLAGS="--std=c++17" fixed some issues but others remained.

Note2

I havent seen the off64_t error again but will look into your comments if this happens again.

Thanks again for your help !

@benbenz
Copy link
Author

benbenz commented Mar 8, 2022

Ok regarding v1, there seems to be a problem in npm since version 7 (npm/cli#2774) that breaks submodule support in npm. Maybe you can revert back to npm 6, or pursue v2 further.

Thanks this is good to know.

@martenrichter
Copy link
Member

Hi

hi again,

v2 seems to work a little further .... but the main problem is the code relies on the epoll implementation in quiche which is not supported in OSX :( The dockerization of the server could be an option indeed! But I have a pretty tight session interaction with an existing server that I need to maintain.

Ok, and epoll is not available on OS X? Then there is probably not an easy way to fix this, of course, one could try to write and replacement (kqueue) , if a similar mechanism exists, so something that wakes up, if some thing happens to a fd. But for me without a mac, it has zero priority. And it probably needs some time.
And the tight session interaction does this mean your server is on OS X...?
I thought most server will eventually run on linux.

"Working" steps:

git clone --recurse-submodules https://github.com/fails-components/webtransport.git
cd webtransport
npm install # this will throw an error but it will install the node_modules
cmake-js compile 

cmake-js compilewill throw errors on all epoll related stuff... (noticeably sys/epoll.h not found). Ex:

/Users/benoit/dev/webtransport/third_party/quiche/epoll_server/simple_epoll_server.h:38:10: fatal error: 'sys/epoll.h' file not found
#include <sys/epoll.h>
         ^~~~~~~~~~~~~

It is possible to comment the simple_epoll_server out of the CMakeList.txt file. But the http3Server seems to be deeply rooted in EPoll.

Yes the whole architecture of libquiche seems to be event driven by the epollserver, but of course it should be possible to be replaced.

Note1

I had to use clang v13 to avoid some compilation errors with quiche (I used the v13.0.1 binary distribution for OSX on llvm website). The flag CXXFLAGS="--std=c++17" fixed some issues but others remained.

that means set(CXX_STANDARD 17) in cmakelists.txt does not set it to c++17 ?

Note2

I havent seen the off64_t error again but will look into your comments if this happens again.

Thanks again for your help !

@benbenz
Copy link
Author

benbenz commented Mar 9, 2022

Hi,

Understood :) I forked the project and will try to adapt the server to libuv, libev or kQueue.
I've read Nodejs is using libuv? It would be logical to stay with this maybe? I don't have any experience with this but I will let you know if I finished something that is somewhat running....

Thanks again !

@benbenz
Copy link
Author

benbenz commented Mar 9, 2022

that means set(CXX_STANDARD 17) in cmakelists.txt does not set it to c++17 ?

Hmm it could have been that I ran sequential compiles and the first errors were skipped, only to come back again at the "end". I would have to look more into this.... I could be wrong.

@martenrichter
Copy link
Member

martenrichter commented Mar 9, 2022

Hi,

Understood :) I forked the project and will try to adapt the server to libuv, libev or kQueue. I've read Nodejs is using libuv? It would be logical to stay with this maybe? I don't have any experience with this but I will let you know if I finished something that is somewhat running....

Thanks again !

I do not think that you have to do so much changes. Please look into:
https://github.com/fails-components/webtransport/blob/master/platform/net/quic/platform/impl/quic_epoll_impl.h
Here you can insert some preprocessor stuff to branch to other epoll objects for MacOS.
These object you can then also place in the platform impl dirs of the package.
I think can just copy the epoll server code from libquiche and change the few system calls to kqueue, rename it and that's it. (If it is compatible...)
Then some changes to the cmakefile... and that's it. I do not think there are many other platform dependent things lurking, most is STL.
Edit: I just saw that libuv is using epoll and kqueue in the background, so yes an epoll server with libuv would be great, the file where the changes happen remain the same....

@benbenz
Copy link
Author

benbenz commented Mar 9, 2022

I do not think that you have to do so much changes. Please look into:
https://github.com/fails-components/webtransport/blob/master/platform/net/quic/platform/impl/quic_epoll_impl.h
Here you can insert some preprocessor stuff to branch to other epoll objects for MacOS.
Hopefully yes ! Thank you for the pointer.
I'm having a little bit of an issue with the compilation of quiche at the moment but if that is solved, I hope to be able to adapt to a libuv implementation.

Note: I understood the reason for the build.ninja not found error: when the configure script errors before starting to compile the files, on the next run, it will try to go to the next step and not find the build.ninja file. You have to remove the build directory (after solving the original issue) so that it builds properly.

@benbenz
Copy link
Author

benbenz commented Mar 9, 2022

that means set(CXX_STANDARD 17) in cmakelists.txt does not set it to c++17 ?

So it seems the flag was not taken into account on Mac. I had to add this line in CMakeList.txt:

set_property(TARGET gquiche PROPERTY CXX_STANDARD 17)

@martenrichter
Copy link
Member

Note: I understood the reason for the build.ninja not found error: when the configure script errors before starting to compile the files, on the next run, it will try to go to the next step and not find the build.ninja file. You have to remove the build directory (after solving the original issue) so that it builds properly.

You can just run npm run rebuild, it cleans all old files.

@martenrichter
Copy link
Member

that means set(CXX_STANDARD 17) in cmakelists.txt does not set it to c++17 ?

So it seems the flag was not taken into account on Mac. I had to add this line in CMakeList.txt:

set_property(TARGET gquiche PROPERTY CXX_STANDARD 17)

Compiles also fine under linux, I have commited it.

@benbenz
Copy link
Author

benbenz commented Mar 10, 2022

Great. Glad I could help.
I've actually added to the webtransport project/target as well.

@martenrichter
Copy link
Member

Great. Glad I could help. I've actually added to the webtransport project/target as well.

Ok, I have added this as well.

@benbenz
Copy link
Author

benbenz commented Mar 12, 2022

Hi !
I think the code is working on Mac OSX. There were some small issues with the CMake file on mac (some even dependent on the cmake version) and needing some rewriting of the simple_server with libuv. But I think I am seeing the right messages here on Chrome. It also works "as this" with no special options and certbot certificates. Let me know if you want me to detail here the main changes? Again, thanks so much for this work and your contribution !!
Capture d’écran 2022-03-12 à 10 53 10

@martenrichter
Copy link
Member

Hi!
Thanks, I have used your code as inspiration for replacing the epoll server entirely with libuv (actually you do not have to build it, it is readily available for a node c++ addon).
The corresponding commit is
52a462c .

I tried to find all changes, I hope I did not miss any.
But in the CMake file I left out:
``` target_include_directories(gquiche PUBLIC /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /usr/local/include) # on older CMake -isysroot removes /usr/local/include ````
I think this was debugging code.
Please tell me if I missed something.

@benbenz
Copy link
Author

benbenz commented Mar 12, 2022

Hello.
Great, thank you.
Looking at the changes I think this looks great.

CMake:

  • I will try again without the SDK path but I remember I had an error at some point which pushed me to include this. But I havent tried again without and it could have been related to something else. I will let you know.
  • Same for the /usr/local/include. On another machine I had to include this because clang (or maybe CMake) was removing this directory silently when the -isysroot option was activated. It wouldn't hurt to leave this here anyhow.

One thing though: it would be nice to add the libuv submodule. I have now installed libuv on my mac but I know it was not there before, so it would be nice to add this submodule as well, dont you think? This would avoid an extra step of installation for people checking out the repository. Is it always installed on Linux?

I will give a fresh install a try shortly and let you know.

@martenrichter
Copy link
Member

martenrichter commented Mar 13, 2022

Hi,

Hello. Great, thank you. Looking at the changes I think this looks great.

CMake:

  • I will try again without the SDK path but I remember I had an error at some point which pushed me to include this. But I havent tried again without and it could have been related to something else. I will let you know.

But anyway, if it is needed, hard coding the path is not an option, since it may change. So if it is missing, a CMake variable or mechnaism, that will determine the path should be used, otherwise it will break if the path changes or is different for different versions.

  • Same for the /usr/local/include. On another machine I had to include this because clang (or maybe CMake) was removing this directory silently when the -isysroot option was activated. It wouldn't hurt to leave this here anyhow.

Here it is the same, we have to use a mechanism, which adds the missing part of the object automatically during configure, similar to the stuff for example for protobuf.

One thing though: it would be nice to add the libuv submodule. I have now installed libuv on my mac but I know it was not there before, so it would be nice to add this submodule as well, dont you think? This would avoid an extra step of installation for people checking out the repository. Is it always installed on Linux?

No it is not always there for linux. But it is an integral part of node itself (and is also used by nan internally) and it is important to use the same lib in this case (for the other libs in the submodules it is important, that we use a different http3 capable version), so that not problems with mixing two libs occurs.
But I had to add:

 target_include_directories(gquiche
....
PUBLIC ${CMAKE_JS_INC}
)

so that all parts used for nan (and libuv is one of them) are already present when building lib quiche.

@benbenz
Copy link
Author

benbenz commented Mar 13, 2022

Nice! 👯‍♂️
I will clone and report asap

@benbenz
Copy link
Author

benbenz commented Mar 14, 2022

Hello!
I tried a fresh build and I encountered just one issue with the protobuf library not found.
This was related to the /usr/local/include directory being added to the gquiche library.

This fixed the problem, around line 807 in CMakeLists.txt:

        target_include_directories(gquiche PUBLIC /usr/local/include)
        target_link_directories(gquiche PUBLIC /usr/local/lib) 

While investigating I found out that the -isysroot option added by CMake on OSX may disable the lookout for this directory: here
I think there is a fix with that NLOPT_INCLUDE_DIR thing, but it seemed okay to add those directories as they are pretty much created on any OSX distribution and this is the default path where protobuf installs when running a make install
But I agree its not very clean :/

Other than that, the test ran without any issue once this modification was brought to CMakeLists :)

@benbenz
Copy link
Author

benbenz commented Mar 14, 2022

Actually, I realize CMakeLists.txt has a section to find the Protobuf install. It should be possible to re-use ${Protobuf_LIBRARIES}and ${Protobuf_INCLUDE_DIRS}: here

This seems to work:
line 22:

set(Protobuf_USE_STATIC_LIBS ON)

~line 795:

target_link_libraries(gquiche 
absl::base 
absl::int128
absl::strings 
absl::str_format
absl::flat_hash_map
absl::any 
absl::synchronization 
${Protobuf_LIBRARIES}
ssl crypto)

if(APPLE)
        target_compile_definitions (gquiche PRIVATE __APPLE_USE_RFC_3542)
        target_include_directories(gquiche PUBLIC ${Protobuf_INCLUDE_DIRS})
endif()

The reason why I added set(Protobuf_USE_STATIC_LIBS ON)is because the test was hanging mid-way without it. I suspect the Apple Security stuff to lock the dependent protobuf DYLIB. But it was not showing it for some reason. Using the option made the test run entirely.

EDIT: still seems to be hanging sometimes.

@benbenz
Copy link
Author

benbenz commented Mar 14, 2022

This becomes unrelated to this thread but, are you seeing some of the following issues?

  1. sometimes the test is not completing properly: it hangs at the datagram stage (I realized this could be the case after some refreshes in the forked version as well)
  2. segfault on a hard refresh from the client side (Chrome) (not happening on the forked version)
  3. TypeError: this.streams.delete is not a functionerror on webtransport.js:238 (not happening on forked version)

@martenrichter
Copy link
Member

This becomes unrelated to this thread but, are you seeing some of the following issues?

1. sometimes the test is not completing properly: it hangs at the datagram stage (I realized this could be the case after some refreshes in the forked version as well)

I did not see this, or I did not pay attention. I will have a lock at the weekend.

2. segfault on a hard refresh from the client side (Chrome) (not happening on the forked version)

I have seen this as well, but not after I made some additional changes/fixes, however I forget to push. I will look in the evening or tomorrow morning to push it.

3. `TypeError: this.streams.delete is not a function`error on `webtransport.js:238` (not happening on forked version)

Yes, I found this and fixed it, but I forgot to push. (Hopefully this is the reason...)

@martenrichter
Copy link
Member

martenrichter commented Mar 14, 2022

Now, the forgotten fixes are commited and pushed. Hopefully this fixes the segfault. But anyway there might be still issues related to garbage collection and object deletion. So if anything odd happens please post it.

@martenrichter
Copy link
Member

${Protobuf_INCLUDE_DIRS}

Actually, I realize CMakeLists.txt has a section to find the Protobuf install. It should be possible to re-use ${Protobuf_LIBRARIES}and ${Protobuf_INCLUDE_DIRS}: here

This seems to work: line 22:

set(Protobuf_USE_STATIC_LIBS ON)

~line 795:

target_link_libraries(gquiche 
absl::base 
absl::int128
absl::strings 
absl::str_format
absl::flat_hash_map
absl::any 
absl::synchronization 
${Protobuf_LIBRARIES}
ssl crypto)

if(APPLE)
        target_compile_definitions (gquiche PRIVATE __APPLE_USE_RFC_3542)
        target_include_directories(gquiche PUBLIC ${Protobuf_INCLUDE_DIRS})
endif()

The reason why I added set(Protobuf_USE_STATIC_LIBS ON)is because the test was hanging mid-way without it. I suspect the Apple Security stuff to lock the dependent protobuf DYLIB. But it was not showing it for some reason. Using the option made the test run entirely.

EDIT: still seems to be hanging sometimes.

I have added these chnages as well. Static linking is fine, in this way binaries will also work on systems with out protobuf installed, which may be beneficial. I think no we got the mac os x case.

@benbenz
Copy link
Author

benbenz commented Mar 15, 2022

Hi
I ran a fresh clone. Everything built as expected and the test ran fully! Closing the issue.
I noticed some hangs on some refreshes with Chrome, but no segfault, no webtransport.js error and some of the next refreshes could recover fully.

@benbenz benbenz closed this as completed Mar 15, 2022
@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Can you please recheck the line number?
It is in the middle of the add library of libquiche...
Also the line above is already present around line 950.

eventloop branch This is weird. I have this around line 807 (after modification):

target_include_directories(gquiche
PUBLIC third_party/quiche
PUBLIC third_party/boringssl/src/include
PUBLIC third_party/abseil-cpp
PUBLIC third_party/googleurl
PUBLIC third_party/libevent/include     <---- line 807
PUBLIC third_party
PUBLIC platform
PUBLIC .
PUBLIC ${Protobuf_INCLUDE_DIRS}
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
PUBLIC ${CMAKE_JS_INC}
)

This seems to match this

On linux and windows it did. Did you see the long annoying tests for the various defines and presence test of certain functions?
The questions is what the mac needs...

windows branch Seeing these tests now. I will play around with it and try to come up with the right command for Mac.

Hmm, this is the starting point of another icu lib.
May be we should build icu only manually on windows.
Can you use some ifs and use find_package for icu lib on mac (and linux)...

windows branch Question: do we need this ICU for Mac as well? Or completely bypass it (no compilation , no find_package) ? I don't think I ever installed ICU on this Mac but it was - obviously - compiling fine on other branches. Is this a new internal feature on the windows branch that you're adding to all platforms?

Development should be after v0.0.2..., so it is introduced in the libevent branch? I can't believe this, I do not think I have touched the javascript. May be we should compare the files?

eventloop branch This is weird then, if you think this side of the server code hasn't changed ... I'll re-check but I'm pretty sure I rebuilt everything from scratch after switching.

Regarding event-config.h, did you have a recent python version installed, libevent uses python for these tests? And I remember cmake complained about it.

eventloop branch I'll pay more attention to CMake warnings etc. But I did not install a new python on this machine. It's the same setup since the very first reporting of the install/build issue.

For diagnosis of the problem, maybe put a console.log(args) to onStreamRead in webtransport.js.
If this gives no insight, put a printout to every function in webtransport.js, that uses readable or readableController.
These are the only paths, that can cause trouble.
Or the changes in building result in trouble for node.js itself, by replacing some libs with our versions...., put the linker should detect this.

eventloop branch I can try that

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Maybe there has been a confusion between the eventloop and windows branch?
I see and understand now that the windows branch also uses libevent. Do you want me to test mostly on this branch then? So we focus on the same CMakeList... ?

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Okay so: on the windows branch, compilation is working and the compilation of libevent is working as well (with event-config.h created). And you've already included the change for the ICU headers. So basically the windows branch compiles fine from the get-go now, with libevent included.

So we only have to resolve the ICU library runtime issue and this solves it all?
Or is there anything specific to the eventloop branch that you want me to look at?

Then - hopefully - the server will run fine and I can look into the Reader runtime error...

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

find_package/FindICU is not finding ICU on my machine, which is normal.
I can either install ICU or resolve why this symbol is used in the first place.
I've added all source files in icu4c/common directory with no luck :/

@martenrichter
Copy link
Member

Ok, yes the windows branch is completely based on the libevent branch, so testing the libevent branch makes only sense, if something is broken on the windows branch and not on the libevent branch.
If we get going the windows branch, it is everything we need.

The icu library is used by googleurl. However the stuff needed by googleurl is never called by the stuff we need.
Therefore lazy linking saved us, from including it. But the windows clang linker insisted on resolving all symbols.
If you know a switch to get the clang linker also to lazy link on windows, we can get of several files from googleurl and the icu.
The unresolved symbol is actually the loading point of another icu lib, it would be also ok to define it somewhere to make the linker happy, since it is never called.
And thanks for testing...

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

I think the variable that's searched is U_DEF_ICUDATA_ENTRY_POINT whose name is pre-compiled line 172 of utypes.h
And I think this is declared line 646 of udata.cpp (through a sequence of macros U_* U_DEF2_* into U_DEF_ICUDATA_ENTRY_POINT)
Trying to comment this file ....

@martenrichter
Copy link
Member

Yes I think that is the variable.
On windows I use a special compilation flag, that excludes it, but it did not work on linux and caused other problems.
But we may also just declare the variable somewhere else.... and fake it.

@martenrichter
Copy link
Member

And udata.cc is needed by other files... at least on the windows build

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

The server started when commenting out udata.cpp ! :)
... and QUIC is working :))
... and we're back with the syntax reader issue. So I think this is good !

@martenrichter
Copy link
Member

Perfect, but may be we can also just leave icu on mac out....

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Right. This was working just fine before :)
I can try that - I remove it from quiche all together ? I don't see why this wouldn't be working

@martenrichter
Copy link
Member

Yes you remove it, and if it works, it will only be conditional included in windows.
The syntax reader issue, may be the catch is the problem, that it returns undefined if an error occurs which is handled by the catch?
try using try catch instead, or do not use await.

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

A quick incremental build seems to have done the job: the library is working without ICU.
Running a full build now to confirm.

Will try the syntax change. If I don't use await, you mean switching to a promise then syntax ?

@martenrichter
Copy link
Member

martenrichter commented Jul 12, 2022

Yes, I think the problem is the mixing of the two types so either catch and then or await with a try catch block.
But I could be wrong.

@martenrichter
Copy link
Member

Or your catch can return {done: true}

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Oh right. That could totally be the reason. I did change the syntax few months ago but maybe didnt have errors there for some time. Will report once I printout info

@martenrichter
Copy link
Member

martenrichter commented Jul 12, 2022

Well actually 0.0.1 did not raise some error, when it should have risen the errors....

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

I have some "[warn] kevent: Invalid argument" at startup as well. But QUIC is running fine.

Testing now the "syntax" error... Got caught up.

@martenrichter
Copy link
Member

No idea, what the "kevent Invalid argument" means, anyway this must be a problem in quiche itself.
Since it is fresh, we should wait if it goes away with other commits, or report it upstream....

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

The connection behaves normally after that so no worries for now indeed.
Im starting to think my test was inconsistent for the syntax error. It actually occurs when I switch between QUIC back to WS (aka disconnect the QUIC connections). So it could have very well occurred in the other version. Im about to test but I think you are right with the bad await / promise mix ... My bad. Sorry about that

I think the ping performance is better though, if it even makes sense?

@martenrichter
Copy link
Member

I have no clue, I do not think another event loop should affect the ping performance. But it is a newer version of the quic library and may have some improvements in the mean time.

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

Error is definitively at the app level and caused by the mix of syntax. You can disregard this one. And thanks for helping :)
Basically the windows branch is compiling and working fine now :)
Just this kevent warning but this doesn't impact functionality at the moment.

@martenrichter
Copy link
Member

Ok, thanks, I have just commit something to include icu only on windows.
That was all we needed....?
I will then check later if it still compiles on windows and linux.
Then fix the windows build..... (not working yet)

@benbenz
Copy link
Author

benbenz commented Jul 12, 2022

I think so: on the windows branch, the ICU was the only issue.
Good luck with windows !!!!

@martenrichter
Copy link
Member

So Windows is almost done and now on the development branch,
However I had to change some szuff in the client and server, it works well on windows and linux,
but on MacOS
Well I have setup a MacOS CI bot to check it, but it stalls... and uses a release branch.
Can you please tell me if it is broken for npm test on your debug build as well?
Any clues were it breaks?
I am sorry but it is quite difficult to make all platforms happy....

@martenrichter
Copy link
Member

I found the issue leading to the failure of the mac builds...

@benbenz
Copy link
Author

benbenz commented Jul 19, 2022

Hello Marten. Sorry I was not on my computer.
I'm available if you need me to check stuff on OSX.

@martenrichter
Copy link
Member

No, thanks, finally the unit test on macOS passed. I think it should work now.....

@benbenz
Copy link
Author

benbenz commented Jul 19, 2022

okay. great to hear. I ran a rebuild-debug without issue :)
I have never used those CI builds. This is interesting. Is GitHub providing this service? You just have to write the build.js file ?

@martenrichter
Copy link
Member

Well github provides the github actions, you have just to write a yml, which the stuff you want to do. In this case I check on all three platforms, if it builds and if the test are working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants