stackgl / headless-gl

🎃 Windowless WebGL for node.js
1.77k stars 169 forks source link

npm install gl fails on macos bigsur 11.6, node v18, python v3, gyp v8 #235

Closed mettrelapaix closed 2 years ago

mettrelapaix commented 2 years ago

many errors are generated during npm install gl:

-first it freezes on: reifyNode:node_modules/gl/node_modules/node-gyp Completed in 529ms for several minutes,

-then: npm ERR! code 1 npm ERR! path /Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl npm ERR! command failed npm ERR! command sh -c prebuild-install || node-gyp rebuild npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/Float16ToFloat32.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/MemoryBuffer.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/angleutils.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/debug.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/mathutil.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/string_utils.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/tls.o npm ERR! CXX(target) Release/obj.target/angle_common/angle/src/common/utilities.o npm ERR! LIBTOOL-STATIC Release/angle_common.a npm ERR! COPY Release/obj/gen/angle/id/commit.h npm ERR! TOUCH Release/obj.target/angle/src/commit_id.stamp npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/common/event_tracer.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/AttributeMap.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Buffer.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Caps.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Compiler.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Config.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Context.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Data.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Debug.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Device.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Display.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Error.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Fence.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Framebuffer.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/FramebufferAttachment.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/HandleAllocator.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Image.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/ImageIndex.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/IndexRangeCache.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Platform.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Program.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Query.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Renderbuffer.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/ResourceManager.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Sampler.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Shader.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/State.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Stream.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Surface.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Texture.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/TransformFeedback.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Uniform.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/VertexArray.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/VertexAttribute.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/angletypes.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/formatutils.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/queryconversions.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/DeviceImpl.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/DisplayImpl.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/Renderer.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/SurfaceImpl.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/validationEGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/validationES.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/validationES2.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/validationES3.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/third_party/murmurhash/MurmurHash3.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/BlitGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/BufferGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/CompilerGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/DisplayGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/FenceNVGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/FenceSyncGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/FramebufferGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/FunctionsGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/ProgramGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/QueryGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/RenderbufferGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/RendererGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/SamplerGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/ShaderGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/StateManagerGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/SurfaceGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/TextureGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/TransformFeedbackGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/VertexArrayGL.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/formatutilsgl.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/renderergl_utils.o npm ERR! CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.o npm ERR! prebuild-install WARN install No prebuilt binaries found (target=18.1.0 runtime=node arch=x64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@8.4.1 npm ERR! gyp info using node@18.1.0 | darwin | x64 npm ERR! gyp info find Python using Python version 3.10.4 found at "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3" npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/aaron/Library/Caches/node-gyp/18.1.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/aaron/Library/Caches/node-gyp/18.1.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/aaron/Library/Caches/node-gyp/18.1.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: warning: instantiation of variable 'gl::GLTypeToGLenum::value' required here, but no definition is available [-Wundefined-var-template] npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:1263:5: note: in instantiation of function template specialization 'gl::Program::getUniformInternal' requested here npm ERR! getUniformInternal(location, v); npm ERR! ^ npm ERR! ../angle/src/libANGLE/queryconversions.h:26:19: note: forward declaration of template entity is here npm ERR! static GLenum value; npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: note: add an explicit instantiation declaration to suppress this warning if 'gl::GLTypeToGLenum::value' is explicitly instantiated in another translation unit npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: warning: instantiation of variable 'gl::GLTypeToGLenum::value' required here, but no definition is available [-Wundefined-var-template] npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:1268:5: note: in instantiation of function template specialization 'gl::Program::getUniformInternal' requested here npm ERR! getUniformInternal(location, v); npm ERR! ^ npm ERR! ../angle/src/libANGLE/queryconversions.h:26:19: note: forward declaration of template entity is here npm ERR! static GLenum value; npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: note: add an explicit instantiation declaration to suppress this warning if 'gl::GLTypeToGLenum::value' is explicitly instantiated in another translation unit npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: warning: instantiation of variable 'gl::GLTypeToGLenum::value' required here, but no definition is available [-Wundefined-var-template] npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:1273:5: note: in instantiation of function template specialization 'gl::Program::getUniformInternal' requested here npm ERR! getUniformInternal(location, v); npm ERR! ^ npm ERR! ../angle/src/libANGLE/queryconversions.h:26:19: note: forward declaration of template entity is here npm ERR! static GLenum value; npm ERR! ^ npm ERR! ../angle/src/libANGLE/Program.cpp:2505:49: note: add an explicit instantiation declaration to suppress this warning if 'gl::GLTypeToGLenum::value' is explicitly instantiated in another translation unit npm ERR! if (componentType == GLTypeToGLenum::value) npm ERR! ^ npm ERR! 3 warnings generated. npm ERR! In file included from ../angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:11: npm ERR! In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: npm ERR! In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString npm ERR! - (NSAttributedString )localizedAttributedStringForKey:(NSString )key value:(nullable NSString )value table:(nullable NSString )tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); npm ERR! ~~~~~~ ^ ~ npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' npm ERR! #define NS_FORMAT_ARGUMENT(A) attribute ((format_arg(A))) npm ERR! ^ ~ npm ERR! 1 error generated. npm ERR! make: *** [Release/obj.target/libANGLE/angle/src/libANGLE/renderer/gl/cgl/DisplayCGL.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Darwin 20.6.0 npm ERR! gyp ERR! command "/Users/aaron/.nvm/versions/node/v18.1.0/bin/node" "/Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /Users/aaron/Dropbox/scripting/three/gpujs/node_modules/gl npm ERR! gyp ERR! node -v v18.1.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/aaron/.npm/_logs/2022-05-20T01_56_36_436Z-debug-0.log

log file attached: 2022-05-20T00_16_30_171Z-debug-0.log

dhritzkiv commented 2 years ago

Hi 👋

The current released version of headless-gl doesn't run on node 18 yet. There's a few things I need to do before I can release a version with node 18 support.

In the meantime, either:

mettrelapaix commented 2 years ago

changing to node 16 allows gl to be installed. this fixed the issue. thank you!

EduApps-CDG commented 2 years ago

@dhritzkiv not worked for me:


$ npm install gl
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: Entrando no diretório '/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl/build'
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/Float16ToFloat32.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/MemoryBuffer.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/angleutils.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/debug.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/mathutil.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/string_utils.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/tls.o
npm ERR!   CXX(target) Release/obj.target/angle_common/angle/src/common/utilities.o
npm ERR!   AR(target) Release/obj.target/angle/src/angle_common.a
npm ERR!   COPY Release/angle_common.a
npm ERR!   COPY Release/obj/gen/angle/id/commit.h
npm ERR!   TOUCH Release/obj.target/angle/src/commit_id.stamp
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/common/event_tracer.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/AttributeMap.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Buffer.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Caps.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Compiler.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Config.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Context.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Data.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Debug.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Device.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Display.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Error.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Fence.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/Framebuffer.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/FramebufferAttachment.o
npm ERR!   CXX(target) Release/obj.target/libANGLE/angle/src/libANGLE/HandleAllocator.o
npm ERR! make: Saindo do diretório '/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.15.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"
npm ERR! (node:137771) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/eduardo/.cache/node-gyp/16.15.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/eduardo/.cache/node-gyp/16.15.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/eduardo/.cache/node-gyp/16.15.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp: In constructor ‘gl::HandleAllocator::HandleAllocator()’:
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:52: error: ‘numeric_limits’ is not a member of ‘std’
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                                    ^~~~~~~~~~~~~~
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:76: error: ‘::max’ has not been declared; did you mean ‘std::max’?
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                                                            ^~~
npm ERR!       |                                                                            std::max
npm ERR! In file included from /usr/include/c++/11/algorithm:62,
npm ERR!                  from ../angle/src/libANGLE/HandleAllocator.cpp:12:
npm ERR! /usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
npm ERR!  3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
npm ERR!       |     ^~~
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:43: error: expected primary-expression before ‘(’ token
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                           ^
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:52: error: ‘numeric_limits’ is not a member of ‘std’
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                                    ^~~~~~~~~~~~~~
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:73: error: expected primary-expression before ‘>’ token
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                                                         ^
npm ERR! ../angle/src/libANGLE/HandleAllocator.cpp:29:76: error: ‘::max’ has not been declared; did you mean ‘std::max’?
npm ERR!    29 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));
npm ERR!       |                                                                            ^~~
npm ERR!       |                                                                            std::max
npm ERR! In file included from /usr/include/c++/11/algorithm:62,
npm ERR!                  from ../angle/src/libANGLE/HandleAllocator.cpp:12:
npm ERR! /usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
npm ERR!  3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
npm ERR!       |     ^~~
npm ERR! make: *** [angle/src/libANGLE.target.mk:241: Release/obj.target/libANGLE/angle/src/libANGLE/HandleAllocator.o] Erro 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.0-33-generic
npm ERR! gyp ERR! command "/home/eduardo/projects/website-generator/node_modules/node/bin/node" "/home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/eduardo/projects/website-generator/node_modules/gpu.js/node_modules/gl
npm ERR! gyp ERR! node -v v16.15.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/eduardo/.npm/_logs/2022-06-22T23_41_59_300Z-debug-0.log
dhritzkiv commented 2 years ago

@EduApps-CDG @EduApps-CDG What version of node.js are you trying to install this on?

There is currently an issue (#214) about building in certain environment, but you should still be able to install successfully on LTS versions of node.

EduApps-CDG commented 2 years ago

@EduApps-CDG @EduApps-CDG What version of node.js are you trying to install this on?

There is currently an issue (#214) about building in certain environment, but you should still be able to install successfully on LTS versions of node.

I'm on node 16.15.1 (only for this project). I'm not using the LTS versions. My global node is 18

EduApps-CDG commented 2 years ago

also, this could be the same issue. Both issues are caused by libANGLE

dhritzkiv commented 2 years ago

Ah, I should've seen in your logs that you were running node v16.15.1.

Hmm, so that's strange: when running npm install gl, it should automatically install a prebuilt version of one of the files listed here, depending on your system and node.js version.

In any case, I believe your issue is more directly related to #214, so keep track of that one. There is a likely working patch, I just need some spare time to sit down, test it, and publish it.

EduApps-CDG commented 2 years ago

my npm version is 8 instead of 7. Anyway, I will keep tracking #214 and thank you for the help