menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

NodeGui

A library for building cross-platform native desktop applications with Node.js and CSS.

Channels
Team

Travis CI build fails on install

January 30, 2020 at 9:08pm

Travis CI build fails on install

January 30, 2020 at 9:08pm
Could anybody successfully run npm install of "/nodegui" on Travis CI. It fails in my project. I'll show where exception started to show
[ 9%] Building CXX object CMakeFiles/nodegui_core.dir/src/cpp/lib/Extras/Utils/nutils.cpp.o
[ 10%] Building CXX object CMakeFiles/nodegui_core.dir/src/cpp/lib/core/FlexLayout/flexutils.cpp.o
[ 12%] Building CXX object CMakeFiles/nodegui_core.dir/src/cpp/lib/core/FlexLayout/flexitem.cpp.o
[ 13%] Building CXX object CMakeFiles/nodegui_core.dir/src/cpp/lib/core/YogaWidget/yogawidget.cpp.o
In file included from /usr/include/c++/5/bits/hashtable.h:35:0,
from /usr/include/c++/5/unordered_map:47,
from /home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/src/cpp/include/nodegui/core/Events/eventsmap.h:3,
from /home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/src/cpp/include/nodegui/core/Events/eventwidget.h:7,
from /home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/src/cpp/lib/core/Events/eventwidget.cpp:1:
/usr/include/c++/5/bits/hashtable_policy.h: In instantiation of ‘struct std::__detail::__is_noexcept_hash<QEvent::Type, std::hash<QEvent::Type> >’:
/usr/include/c++/5/type_traits:137:12: required from ‘struct std::__and_<std::__is_fast_hash<std::hash<QEvent::Type> >, std::__detail::__is_noexcept_hash<QEvent::Type, std::hash<QEvent::Type> > >’
/usr/include/c++/5/type_traits:148:38: required from ‘struct std::__not_<std::__and_<std::__is_fast_hash<std::hash<QEvent::Type> >, std::__detail::__is_noexcept_hash<QEvent::Type, std::hash<QEvent::Type> > > >’
/usr/include/c++/5/bits/unordered_map.h:100:65: required from ‘class std::unordered_map<QEvent::Type, std::__cxx11::basic_string<char> >’
/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/src/cpp/include/nodegui/core/Events/eventwidget.h:12:49: required from here
/usr/include/c++/5/bits/hashtable_policy.h:85:34: error: no match for call to ‘(const std::hash<QEvent::Type>) (const QEvent::Type&)’
noexcept(declval<const _Hash&>()(declval<const _Key&>()))>

February 7, 2020 at 7:44pm
Hi Sorry for late reply. Was caught up at work this week. The issue seems to be that travis ci is using a very old version of c++ . We need gcc v7 and up since we use modern c++ features available in c++11. Can you try bumping the linux version. It should fix this issue.
Edited
nodegui runs on the github actions (ci) without issues.

February 8, 2020 at 5:25pm
Thanks. This really helped. I found the necessary environment. What worked for me
os: linux
dist: bionic
language: node_js
node_js:
- "12"
like-fill
1

September 16, 2020 at 7:09am
Suddenly builds started to fail on Travis on the same environment that worked before. Here is a part of the build log
> @nodegui/[email protected] build:addon /home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui
> cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile
[
'/home/travis/.nvm/versions/node/v12.18.3/bin/node',
'/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/.bin/cmake-js',
'compile'
]
info TOOL Using Unix Makefiles generator.
info DIST Downloading distribution files.
http DIST - https://nodejs.org/dist/v12.18.3/SHASUMS256.txt
http DIST - https://nodejs.org/dist/v12.18.3/node-v12.18.3-headers.tar.gz
info CMD CONFIGURE
info RUN cmake "/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/build/Release" -DCMAKE_JS_INC="/home/travis/.cmake-js/node-x64/v12.18.3/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.3" -DNODE_ARCH="x64"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using QT installation for nodegui_core QT_CMAKE_HOME_DIR:/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/miniqt/5.14.1/gcc_64/lib/cmake/Qt5
CMake Error at miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:207 (include)
miniqt/5.14.1/gcc_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:100 (find_package)
miniqt/5.14.1/gcc_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
config/qt.cmake:23 (find_package)
CMakeLists.txt:204 (AddQtSupport)
-- Configuring incomplete, errors occurred!
See also "/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/build/CMakeFiles/CMakeOutput.log".
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/build"
info CMD CONFIGURE
info RUN cmake "/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="6.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/build/Release" -DCMAKE_JS_INC="/home/travis/.cmake-js/node-x64/v12.18.3/include/node" -DCMAKE_JS_SRC="" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="12.18.3" -DNODE_ARCH="x64"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using QT installation for nodegui_core QT_CMAKE_HOME_DIR:/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/miniqt/5.14.1/gcc_64/lib/cmake/Qt5
CMake Error at miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
miniqt/5.14.1/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:207 (include)
miniqt/5.14.1/gcc_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:100 (find_package)
miniqt/5.14.1/gcc_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
config/qt.cmake:23 (find_package)
CMakeLists.txt:204 (AddQtSupport)
-- Configuring incomplete, errors occurred!
See also "/home/travis/build/constgen/neutrino-preset-react-nodegui/node_modules/@nodegui/nodegui/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @nodegui/[email protected] build:addon: `cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @nodegui/[email protected] build:addon script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2020-09-09T10_53_53_619Z-debug.log
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.18.3","npm":"6.14.6"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Here is a link to the Travis Job https://travis-ci.com/github/constgen/neutrino-preset-react-nodegui/builds/183528669. (master-atul) can you suggest something?
Edited
The Travis environment description https://docs.travis-ci.com/user/reference/bionic

September 17, 2020 at 11:00am
Ok. I found the solution to my questions. Travis really made some changes in its containers and removed 3rd party modules from Linux. So there was a missing OpenGl which can be fixed by adding to the travis config
before_install:
# OpenGL
- sudo apt-get install libgl1-mesa-dev
Edited
like-fill
1