Repository navigation
Open
Description
Describe the bug
When trying to use NodeGUI with m2 and following the readme, npm throws an error at CMake stage of linking to Qt5 libraries
To Reproduce
Steps to reproduce the behavior:
- Follow README.txt for section for M1 macs
Expected behavior
npm module is installed
logs
❯ npm install
npm WARN deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
npm ERR! code 1
npm ERR! path /Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui
npm ERR! command failed
npm ERR! command sh -c npm run setupqt && (node ./scripts/skip.js || npm run setupbinary || npm run build:addon)
npm ERR! > @nodegui/nodegui@0.63.0 setupqt
npm ERR! > node ./scripts/setupMiniQt.js
npm ERR!
npm ERR! CustomQt detected at /usr/local/Qt-5.15.12 . Hence, skipping Mini Qt installation...
npm ERR!
npm ERR! > @nodegui/nodegui@0.63.0 setupbinary
npm ERR! > node ./scripts/setupBinary.js
npm ERR!
npm ERR!
npm ERR! > @nodegui/nodegui@0.63.0 build:addon
npm ERR! > cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile
npm ERR!
npm ERR! [
npm ERR! '/opt/homebrew/Cellar/node/21.4.0/bin/node',
npm ERR! '/Users/is/Code/uni/RhymeFinderJS/node_modules/.bin/cmake-js',
npm ERR! 'compile'
npm ERR! ]
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- The C compiler identification is AppleClang 15.0.0.15000040
npm ERR! -- The CXX compiler identification is AppleClang 15.0.0.15000040
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Using Qt installation for nodegui_core QT_CMAKE_HOME_DIR:/usr/local/Qt-5.15.12/lib/cmake/Qt6
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- The C compiler identification is AppleClang 15.0.0.15000040
npm ERR! -- The CXX compiler identification is AppleClang 15.0.0.15000040
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Using Qt installation for nodegui_core QT_CMAKE_HOME_DIR:/usr/local/Qt-5.15.12/lib/cmake/Qt6
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! (node:52992) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! (node:53037) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! Error: Error while downloading Precompiled NodeGui binary:https://github.com/nodegui/nodegui/releases/download/v0.63.0/nodegui-binary-v0.63.0-darwin-arm64.tar.gz. Not Found
npm ERR! at Object.<anonymous> (/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/artifact-installer/dist/downloader.js:69:31)
npm ERR! at step (/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/artifact-installer/dist/downloader.js:33:23)
npm ERR! at Object.next (/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/artifact-installer/dist/downloader.js:14:53)
npm ERR! at fulfilled (/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/artifact-installer/dist/downloader.js:5:58)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
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/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui',
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.2',
npm ERR! info RUN '-DCMAKE_BUILD_TYPE=Release',
npm ERR! info RUN '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui/build/Release',
npm ERR! info RUN '-DCMAKE_JS_INC=/Users/is/.cmake-js/node-arm64/v21.4.0/include/node',
npm ERR! info RUN '-DCMAKE_JS_SRC=',
npm ERR! info RUN '-DNODE_RUNTIME=node',
npm ERR! info RUN '-DNODE_RUNTIMEVERSION=21.4.0',
npm ERR! info RUN '-DNODE_ARCH=arm64',
npm ERR! info RUN '-DCMAKE_OSX_ARCHITECTURES=arm64',
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 Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
npm ERR! Compatibility with CMake < 3.5 will be removed from a future version of
npm ERR! CMake.
npm ERR!
npm ERR! Update the VERSION argument <min> value or use a ...<max> suffix to tell
npm ERR! CMake that the project does not need compatibility with older versions.
npm ERR!
npm ERR!
npm ERR! CMake Error at config/qt.cmake:23 (find_package):
npm ERR! By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
npm ERR! asked CMake to find a package configuration file provided by "Qt6", but
npm ERR! CMake did not find one.
npm ERR!
npm ERR! Could not find a package configuration file provided by "Qt6" with any of
npm ERR! the following names:
npm ERR!
npm ERR! Qt6Config.cmake
npm ERR! qt6-config.cmake
npm ERR!
npm ERR! Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
npm ERR! to a directory containing one of the above files. If "Qt6" provides a
npm ERR! separate development package or SDK, be sure it has been installed.
npm ERR! Call Stack (most recent call first):
npm ERR! CMakeLists.txt:241 (AddQtSupport)
npm ERR!
npm ERR!
npm ERR! info REP Build has been failed, trying to do a full rebuild.
npm ERR! info CMD CLEAN
npm ERR! info RUN [
npm ERR! info RUN 'cmake',
npm ERR! info RUN '-E',
npm ERR! info RUN 'remove_directory',
npm ERR! info RUN '/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui/build'
npm ERR! info RUN ]
npm ERR! info CMD CONFIGURE
npm ERR! info RUN [
npm ERR! info RUN 'cmake',
npm ERR! info RUN '/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui',
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.2',
npm ERR! info RUN '-DCMAKE_BUILD_TYPE=Release',
npm ERR! info RUN '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/is/Code/uni/RhymeFinderJS/node_modules/@nodegui/nodegui/build/Release',
npm ERR! info RUN '-DCMAKE_JS_INC=/Users/is/.cmake-js/node-arm64/v21.4.0/include/node',
npm ERR! info RUN '-DCMAKE_JS_SRC=',
npm ERR! info RUN '-DNODE_RUNTIME=node',
npm ERR! info RUN '-DNODE_RUNTIMEVERSION=21.4.0',
npm ERR! info RUN '-DNODE_ARCH=arm64',
npm ERR! info RUN '-DCMAKE_OSX_ARCHITECTURES=arm64',
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 Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
npm ERR! Compatibility with CMake < 3.5 will be removed from a future version of
npm ERR! CMake.
npm ERR!
npm ERR! Update the VERSION argument <min> value or use a ...<max> suffix to tell
npm ERR! CMake that the project does not need compatibility with older versions.
npm ERR!
npm ERR!
npm ERR! CMake Error at config/qt.cmake:23 (find_package):
npm ERR! By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
npm ERR! asked CMake to find a package configuration file provided by "Qt6", but
npm ERR! CMake did not find one.
npm ERR!
npm ERR! Could not find a package configuration file provided by "Qt6" with any of
npm ERR! the following names:
npm ERR!
npm ERR! Qt6Config.cmake
npm ERR! qt6-config.cmake
npm ERR!
npm ERR! Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
npm ERR! to a directory containing one of the above files. If "Qt6" provides a
npm ERR! separate development package or SDK, be sure it has been installed.
npm ERR! Call Stack (most recent call first):
npm ERR! CMakeLists.txt:241 (AddQtSupport)
npm ERR!
npm ERR!
npm ERR! ERR! OMG Process terminated: 1
Desktop (please complete the following information):
- OS: macOS
Metadata
Metadata
Assignees
Labels
No labels
Activity
Ivansstyle commentedon Jan 5, 2024
Ok, while trying to install the package along qt6 installed via brew I have another stream of errors, which may be related to something else.
Note, I am on Sonoma (14.0)
Where
error: '~path' is unavailable: introduced in macOS 10.15is regarding
std::filesystem::pathHowever I am clearly using Sonoma's sdk (14.0):
/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdkIt may have been not the smartest to use qt@6 directly from brew, but why it detects as macOS 10.15 I have no idea.
As I seen from the logs, if it fails to compile the package, then it tries to install it from GitHub releases, where there is no darwing-arm64 version.
Will be trying #1004
Ivansstyle commentedon Jan 5, 2024
Btw it is possible to add arm64 build for nodegui by simply adding
Which will use universal binaries to compile for arch. This way it is possible to use free macOS runners to compile for arm64 on github, however some modification would be necessary to create a correct version in the workflow. For this build matrix would need to be updated to include that step, and build action should be conditional to use build-arm command for arm target