sclorg / s2i-nodejs-container

NodeJS images based on Red Hat Software Collections and intended for OpenShift and general usage, that provide a platform for building and running NodeJS applications. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
164 stars 286 forks source link

NodeJS-14 failed on test `test_check_build_using_dockerfile` #420

Closed phracek closed 2 months ago

phracek commented 2 months ago

Container platform

Podman/Docker

Version

NodeJS-14

OS version of the container image

RHEL 7

Bugzilla, Jira

No response

Description

Test failed:

-----------------------------------------------
Running test test_check_build_using_dockerfile (starting at 2024-03-06 14:45:45+00:00) ... 
-----------------------------------------------

[INFO] Check building using a Dockerfile...

Using this Dockerfile:
FROM rh-nodejs14-container-1-104

# Add application sources
ADD app-src .

# In case you run into permission errors during build (eg. by use of umask)
# running the fix-permission script will make sure all bits are as expected by the image
# USER 0
# RUN fix-permissions ./
# USER 1001

# Install the dependencies
RUN npm install

# Run script uses standard ways to run the application
CMD npm run -d start
Cloning into 'app-src'...
Building 'myapp' image using docker build
Sending build context to Docker daemon 1.967 MB

Step 1/4 : FROM rh-nodejs14-container-1-104
 ---> 48dbdaf623a9
Step 2/4 : ADD app-src .
 ---> 75d82cc83b57
Removing intermediate container f75d721da275
Step 3/4 : RUN npm install
 ---> Running in 5020c42351ce

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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.

> cpu-features@0.0.9 install /opt/app-root/src/node_modules/cpu-features
> node buildcheck.js > buildcheck.gypi && node-gyp rebuild

make: Entering directory `/opt/app-root/src/node_modules/cpu-features/build'
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
In file included from ../deps/cpu_features/src/impl_x86__base_implementation.inl:89:0,
                 from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:
../deps/cpu_features/src/copy.inl: In function 'copy':
../deps/cpu_features/src/copy.inl:18:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < count; ++i) dst[i] = src[i];
   ^
../deps/cpu_features/src/copy.inl:18:3: note: use option -std=c99 or -std=gnu99 to compile your code
In file included from ../deps/cpu_features/src/impl_x86__base_implementation.inl:91:0,
                 from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:
../deps/cpu_features/src/equals.inl: In function 'equals':
../deps/cpu_features/src/equals.inl:19:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < count; ++i)
   ^
In file included from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:0:
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseLeaf2':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1730:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < sizeof(data); ++i) {
   ^
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseCacheInfo':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1746:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int index = 0; info.size < CPU_FEATURES_MAX_CACHE_LEVEL; ++index) {
   ^
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseCacheInfoLegacyAMD':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1873:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int i = 0; i < LEGACY_AMD_MAX_CACHE_LEVEL; ++i) {
   ^
../deps/cpu_features/src/impl_x86_linux_or_android.c: In function 'DetectFeaturesFromOs':
../deps/cpu_features/src/impl_x86_linux_or_android.c:37:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (bool stop = false; !stop;) {
     ^
make: *** [Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o] Error 1
make: Leaving directory `/opt/app-root/src/node_modules/cpu-features/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/rh/rh-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 3.10.0-1160.114.1.el7.x86_64
gyp ERR! command "/opt/rh/rh-nodejs14/root/usr/bin/node" "/opt/rh/rh-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/app-root/src/node_modules/cpu-features
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 

> ssh2@1.15.0 install /opt/app-root/src/node_modules/ssh2
> node install.js

make: Entering directory `/opt/app-root/src/node_modules/ssh2/lib/protocol/crypto/build'
  CXX(target) Release/obj.target/sshcrypto/src/binding.o
In file included from /opt/app-root/src/.cache/node-gyp/14.21.3/include/node/node.h:67:0,
                 from ../src/binding.cc:14:
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:1585:58: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                 Local<Value> export_value);
                                                          ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:3359:23: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Local<Value> Name() const { return Description(); }
                       ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5178:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5225:21: warning: 'deprecated' attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5252:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5262:70: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5273:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5660:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5709:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5718:21: warning: 'deprecated' attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5734:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5744:70: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5759:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5984:50: warning: 'deprecated' attribute directive ignored [-Wattributes]
       Local<FinalizationGroup> finalization_group);
                                                  ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7135:28: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t code_range_size() const { return code_range_size_ / kMB; }
                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7137:46: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_code_range_size(size_t limit_in_mb) {
                                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7141:38: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_semi_space_size_in_kb() const;
                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7143:56: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_semi_space_size_in_kb(size_t limit_in_kb);
                                                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7145:31: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_old_space_size() const { return max_old_generation_size_ / kMB; }
                               ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7147:49: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_old_space_size(size_t limit_in_mb) {
                                                 ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7151:31: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_zone_pool_size() const { return max_zone_pool_size_; }
                               ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7153:43: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_zone_pool_size(size_t bytes) { max_zone_pool_size_ = bytes; }
                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8601:52: warning: 'deprecated' attribute directive ignored [-Wattributes]
       HostCleanupFinalizationGroupCallback callback);
                                                    ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8765:59: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                     MeasureMemoryMode mode);
                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8829:36: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Local<Context> GetEnteredContext();
                                    ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9106:22: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void RunMicrotasks() { PerformMicrotaskCheckpoint(); }
                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9150:75: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
                                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9158:78: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
                                                                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9330:30: warning: 'deprecated' attribute directive ignored [-Wattributes]
   UnwindState GetUnwindState();
                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9393:54: warning: 'deprecated' attribute directive ignored [-Wattributes]
       AllowCodeGenerationFromStringsCallback callback);
                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9750:75: warning: 'deprecated' attribute directive ignored [-Wattributes]
   static bool TryHandleSignal(int signal_number, void* info, void* context);
                                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:10723:55: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                 const void* stack_base);
                                                       ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:10749:65: warning: 'deprecated' attribute directive ignored [-Wattributes]
   static bool PCIsInV8(const UnwindState& unwind_state, void* pc);
                                                                 ^
  SOLINK_MODULE(target) Release/obj.target/sshcrypto.node
  COPY Release/sshcrypto.node
make: Leaving directory `/opt/app-root/src/node_modules/ssh2/lib/protocol/crypto/build'
Succeeded in building optional crypto binding
npm WARN notsup Unsupported engine for nodeshift@11.0.0: wanted: {"node":"^18 || ^20"} (current: {"node":"14.21.3","npm":"6.14.18"})
npm WARN notsup Not compatible with your version of node/npm: nodeshift@11.0.0
npm WARN The package eslint is included as both a dev and production dependency.
npm WARN The package eslint-config-semistandard is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.9 (node_modules/cpu-features):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.9 install: `node buildcheck.js > buildcheck.gypi && node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 734 packages from 499 contributors and audited 739 packages in 40.083s

73 packages are looking for funding
  run `npm fund` for details

found 29 vulnerabilities (26 moderate, 1 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
 ---> c91b9fff9215
Removing intermediate container 5020c42351ce
Step 4/4 : CMD npm run -d start
 ---> Running in 5637cdbab50b
 ---> 45cffea5fc4c
Removing intermediate container 5637cdbab50b
Successfully built 45cffea5fc4c
a28492e7f3a363422c3852311c51b86ec79d575c7916db2df76f8a45d157294c
Waiting for myapp to start
  Testing the HTTP(S) response for <http://172.17.0.4:8080>
Trying to connect ... 1
Trying to connect ... 2
Trying to connect ... 3
Trying to connect ... 4
Trying to connect ... 5
Trying to connect ... 6
Trying to connect ... 7
Trying to connect ... 8
Trying to connect ... 9
Trying to connect ... 10
Trying to connect ... 11
npm info it worked if it ends with ok
npm info using npm@6.14.18
npm info using node@v14.21.3
npm info lifecycle nodejs-rest-http-crud@4.0.0~prestart: nodejs-rest-http-crud@4.0.0
npm info lifecycle nodejs-rest-http-crud@4.0.0~start: nodejs-rest-http-crud@4.0.0
> nodejs-rest-http-crud@4.0.0 start /opt/app-root/src
> node .
{"level":30,"time":1709736396067,"pid":22,"hostname":"a28492e7f3a3","msg":"Listening on port 8080"}
{"level":50,"time":1709736396072,"pid":22,"hostname":"a28492e7f3a3","err":{"type":"Error","message":"connect ECONNREFUSED 127.0.0.1:5432","stack":"Error: connect ECONNREFUSED 127.0.0.1:5432\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)","errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432},"msg":"connect ECONNREFUSED 127.0.0.1:5432"}
a28492e7f3a363422c3852311c51b86ec79d575c7916db2df76f8a45d157294c
Untagged: myapp:latest
Deleted: sha256:45cffea5fc4c461f740f04eff976e7c613504c359e1a77f135d18bbb5a2780db
Deleted: sha256:c91b9fff92153ef2b2251aa0d1cf5283b3ce9865b2b2c1c67ef67fddfdcd57ef
Deleted: sha256:879aebe5faba76eeca813e6f53ba63ac757e4e925feb4c4aa21fd413e7679ba9
Deleted: sha256:75d82cc83b57d1dea4472d67eecb2bc6782f6c3b847a9863b4f5b934614aa0a0
Deleted: sha256:399164dfacb7061dc9bca9f24fc778df95f680f6f3d03d0324f0cf537949a1a2
Test for image 'rh-nodejs14-container-1-104' FAILED (exit code: 1)
Using this Dockerfile:
FROM rh-nodejs14-container-1-104

# This image supports the Source-to-Image
# (see more at https://docs.openshift.com/container-platform/3.11/creating_images/s2i.html).
# In order to support the Source-to-Image framework, there are some interesting
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order
#   to produce a new image with the application artifacts.
#   The script takes sources of a given application and places them into
#   appropriate directories inside the image.
# * The `/usr/libexec/s2i/run` script executes the application and is set as
#   a default command in the resulting container image.

# Add application sources to a directory that the assemble script expects them
# and set permissions so that the container runs without root access
USER 0
ADD app-src /tmp/src
RUN chown -R 1001:0 /tmp/src
USER 1001

# Let the assemble script to install the dependencies
RUN /usr/libexec/s2i/assemble

# Run script uses standard ways to run the application
CMD /usr/libexec/s2i/run
Cloning into 'app-src'...
Building 'myapp' image using docker build
Sending build context to Docker daemon 1.968 MB

Step 1/7 : FROM rh-nodejs14-container-1-104
 ---> 48dbdaf623a9
Step 2/7 : USER 0
 ---> Running in d71685cf5c14
 ---> e35c116e7409
Removing intermediate container d71685cf5c14
Step 3/7 : ADD app-src /tmp/src
 ---> 1ca7e1fce6c5
Removing intermediate container 5e9120f9b54a
Step 4/7 : RUN chown -R 1001:0 /tmp/src
 ---> Running in f59e32a1b14b

 ---> 70b570ba531f
Removing intermediate container f59e32a1b14b
Step 5/7 : USER 1001
 ---> Running in 4cd928baaefd
 ---> c6a7d2033ef3
Removing intermediate container 4cd928baaefd
Step 6/7 : RUN /usr/libexec/s2i/assemble
 ---> Running in 3a6e529aa8f6

---> Installing application source ...
---> Installing all dependencies
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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.

> cpu-features@0.0.9 install /opt/app-root/src/node_modules/cpu-features
> node buildcheck.js > buildcheck.gypi && node-gyp rebuild

make: Entering directory `/opt/app-root/src/node_modules/cpu-features/build'
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
In file included from ../deps/cpu_features/src/impl_x86__base_implementation.inl:89:0,
                 from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:
../deps/cpu_features/src/copy.inl: In function 'copy':
../deps/cpu_features/src/copy.inl:18:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < count; ++i) dst[i] = src[i];
   ^
../deps/cpu_features/src/copy.inl:18:3: note: use option -std=c99 or -std=gnu99 to compile your code
In file included from ../deps/cpu_features/src/impl_x86__base_implementation.inl:91:0,
                 from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:
../deps/cpu_features/src/equals.inl: In function 'equals':
../deps/cpu_features/src/equals.inl:19:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < count; ++i)
   ^
In file included from ../deps/cpu_features/src/impl_x86_linux_or_android.c:20:0:
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseLeaf2':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1730:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < sizeof(data); ++i) {
   ^
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseCacheInfo':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1746:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int index = 0; info.size < CPU_FEATURES_MAX_CACHE_LEVEL; ++index) {
   ^
../deps/cpu_features/src/impl_x86__base_implementation.inl: In function 'ParseCacheInfoLegacyAMD':
../deps/cpu_features/src/impl_x86__base_implementation.inl:1873:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int i = 0; i < LEGACY_AMD_MAX_CACHE_LEVEL; ++i) {
   ^
../deps/cpu_features/src/impl_x86_linux_or_android.c: In function 'DetectFeaturesFromOs':
../deps/cpu_features/src/impl_x86_linux_or_android.c:37:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (bool stop = false; !stop;) {
     ^
make: *** [Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o] Error 1
make: Leaving directory `/opt/app-root/src/node_modules/cpu-features/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/rh/rh-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Linux 3.10.0-1160.114.1.el7.x86_64
gyp ERR! command "/opt/rh/rh-nodejs14/root/usr/bin/node" "/opt/rh/rh-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/app-root/src/node_modules/cpu-features
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 

> ssh2@1.15.0 install /opt/app-root/src/node_modules/ssh2
> node install.js

make: Entering directory `/opt/app-root/src/node_modules/ssh2/lib/protocol/crypto/build'
  CXX(target) Release/obj.target/sshcrypto/src/binding.o
In file included from /opt/app-root/src/.cache/node-gyp/14.21.3/include/node/node.h:67:0,
                 from ../src/binding.cc:14:
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:1585:58: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                 Local<Value> export_value);
                                                          ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:3359:23: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Local<Value> Name() const { return Description(); }
                       ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5178:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5225:21: warning: 'deprecated' attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5252:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5262:70: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5273:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5660:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5709:76: warning: 'deprecated' attribute directive ignored [-Wattributes]
       ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized);
                                                                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5718:21: warning: 'deprecated' attribute directive ignored [-Wattributes]
   bool IsExternal() const;
                     ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5734:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents Externalize();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5744:70: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void Externalize(const std::shared_ptr<BackingStore>& backing_store);
                                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5759:24: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Contents GetContents();
                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:5984:50: warning: 'deprecated' attribute directive ignored [-Wattributes]
       Local<FinalizationGroup> finalization_group);
                                                  ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7135:28: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t code_range_size() const { return code_range_size_ / kMB; }
                            ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7137:46: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_code_range_size(size_t limit_in_mb) {
                                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7141:38: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_semi_space_size_in_kb() const;
                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7143:56: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_semi_space_size_in_kb(size_t limit_in_kb);
                                                        ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7145:31: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_old_space_size() const { return max_old_generation_size_ / kMB; }
                               ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7147:49: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_old_space_size(size_t limit_in_mb) {
                                                 ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7151:31: warning: 'deprecated' attribute directive ignored [-Wattributes]
   size_t max_zone_pool_size() const { return max_zone_pool_size_; }
                               ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:7153:43: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void set_max_zone_pool_size(size_t bytes) { max_zone_pool_size_ = bytes; }
                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8601:52: warning: 'deprecated' attribute directive ignored [-Wattributes]
       HostCleanupFinalizationGroupCallback callback);
                                                    ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8765:59: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                     MeasureMemoryMode mode);
                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:8829:36: warning: 'deprecated' attribute directive ignored [-Wattributes]
   Local<Context> GetEnteredContext();
                                    ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9106:22: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void RunMicrotasks() { PerformMicrotaskCheckpoint(); }
                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9150:75: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
                                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9158:78: warning: 'deprecated' attribute directive ignored [-Wattributes]
   void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
                                                                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9330:30: warning: 'deprecated' attribute directive ignored [-Wattributes]
   UnwindState GetUnwindState();
                              ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9393:54: warning: 'deprecated' attribute directive ignored [-Wattributes]
       AllowCodeGenerationFromStringsCallback callback);
                                                      ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:9750:75: warning: 'deprecated' attribute directive ignored [-Wattributes]
   static bool TryHandleSignal(int signal_number, void* info, void* context);
                                                                           ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:10723:55: warning: 'deprecated' attribute directive ignored [-Wattributes]
                                 const void* stack_base);
                                                       ^
/opt/app-root/src/.cache/node-gyp/14.21.3/include/node/v8.h:10749:65: warning: 'deprecated' attribute directive ignored [-Wattributes]
   static bool PCIsInV8(const UnwindState& unwind_state, void* pc);
                                                                 ^
  SOLINK_MODULE(target) Release/obj.target/sshcrypto.node
  COPY Release/sshcrypto.node
make: Leaving directory `/opt/app-root/src/node_modules/ssh2/lib/protocol/crypto/build'
Succeeded in building optional crypto binding
npm WARN notsup Unsupported engine for nodeshift@11.0.0: wanted: {"node":"^18 || ^20"} (current: {"node":"14.21.3","npm":"6.14.18"})
npm WARN notsup Not compatible with your version of node/npm: nodeshift@11.0.0
npm WARN The package eslint is included as both a dev and production dependency.
npm WARN The package eslint-config-semistandard is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.9 (node_modules/cpu-features):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.9 install: `node buildcheck.js > buildcheck.gypi && node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 734 packages from 499 contributors and audited 739 packages in 42.018s

73 packages are looking for funding
  run `npm fund` for details

found 29 vulnerabilities (26 moderate, 1 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
---> Building in production mode
---> Pruning the development dependencies
npm WARN eslint-config-semistandard@17.0.0 requires a peer of eslint-config-standard@^17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-semistandard@17.0.0 requires a peer of eslint-plugin-import@^2.26.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-semistandard@17.0.0 requires a peer of eslint-plugin-n@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-semistandard@17.0.0 requires a peer of eslint-plugin-promise@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package eslint is included as both a dev and production dependency.
npm WARN The package eslint-config-semistandard is included as both a dev and production dependency.

removed 476 packages and audited 260 packages in 4.709s

37 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
/tmp is not a mountpoint
---> Cleaning the /tmp/npm-*
/opt/app-root/src/.npm is not a mountpoint
---> Cleaning the npm cache /opt/app-root/src/.npm
 ---> 348da612188b
Removing intermediate container 3a6e529aa8f6
Step 7/7 : CMD /usr/libexec/s2i/run
 ---> Running in d5052407600a
 ---> 2a175cb2fe95
Removing intermediate container d5052407600a
Successfully built 2a175cb2fe95
8d0d41c859e79421d51ac23623f3bd4a051501c1f2568a45df47ba0502661539
Waiting for myapp to start
  Testing the HTTP(S) response for <http://172.17.0.4:8080>
Trying to connect ... 1
Trying to connect ... 2
Trying to connect ... 3
Trying to connect ... 4
Trying to connect ... 5
Trying to connect ... 6
Trying to connect ... 7
Trying to connect ... 8
Trying to connect ... 9
Trying to connect ... 10
Trying to connect ... 11
Environment: 
    DEV_MODE=false
    NODE_ENV=production
    DEBUG_PORT=5858
Launching via npm...
npm info it worked if it ends with ok
npm info using npm@6.14.18
npm info using node@v14.21.3
npm info lifecycle nodejs-rest-http-crud@4.0.0~prestart: nodejs-rest-http-crud@4.0.0
> nodejs-rest-http-crud@4.0.0 start /opt/app-root/src
npm info lifecycle nodejs-rest-http-crud@4.0.0~start: nodejs-rest-http-crud@4.0.0
> node .
{"level":30,"time":1709736490278,"pid":26,"hostname":"8d0d41c859e7","msg":"Listening on port 8080"}
{"level":50,"time":1709736490283,"pid":26,"hostname":"8d0d41c859e7","err":{"type":"Error","message":"connect ECONNREFUSED 127.0.0.1:5432","stack":"Error: connect ECONNREFUSED 127.0.0.1:5432\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)","errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432},"msg":"connect ECONNREFUSED 127.0.0.1:5432"}
8d0d41c859e79421d51ac23623f3bd4a051501c1f2568a45df47ba0502661539
Untagged: myapp:latest
Deleted: sha256:2a175cb2fe95fc19b1df242593af1110b8f83e741c7c6dd6953e883a55219350
Deleted: sha256:348da612188b235847fea68f95cdadb19d5cc0e8b94b6ffcec7c8fc663d47aa4
Deleted: sha256:74d50ba0af50df76281bd477b8a80614bfe75bf66fefda1c8b459ca6cdabd94d
Deleted: sha256:c6a7d2033ef317e9a3b64ed61d94e164e3c5631046e2f5301ec1f58e66209506
Deleted: sha256:70b570ba531fa2b5dbb1d59fbfa32c5d7311e0e72e42637d47078d5443b11477
Deleted: sha256:ad2b895dc5f50d685e2461851beb555808d72816378d3264867c328b3dcc152a
Deleted: sha256:1ca7e1fce6c5d5a883f5eddb5314547ded078f6b2d02cadcf35d6724d710c822
Deleted: sha256:7553327dacba23e2ebb33059d3201af928af29ed61ca5a04343949dce8e745a9
Deleted: sha256:e35c116e74094381c9cadd304cec3a4905f4ce67000a769c08c88c16b49c6365
Test for image 'rh-nodejs14-container-1-104' FAILED (exit code: 1)
Test for image 'rh-nodejs14-container-1-104' FAILED (exit code: 1)
-----------------------------------------------

Reproducer

No response

phracek commented 2 months ago

This issue should be fixed by #421

phracek commented 2 months ago

Issue is already fixed by #421. Closing