Gvm 20.08 failed to compile GSA for a yarn error

Hi, i’m trying to compile the gsa module and i retrieve this error:

   gvm@KaliGVM20:/tmp/gvm-source/gsa/build# make
[  5%] Build gsa install files
yarn run v1.22.5
$ react-scripts build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`

<--- Last few GCs --->

[32070:0x55dfda649010]    71931 ms: Mark-sweep 348.3 (352.7) -> 347.7 (352.5) MB, 966.4 / 0.0 ms  (average mu = 0.119, current mu = 0.055) allocation failure scavenge might not succeed
[32070:0x55dfda649010]    72835 ms: Mark-sweep 348.9 (352.5) -> 348.4 (353.0) MB, 873.1 / 0.0 ms  (average mu = 0.081, current mu = 0.033) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x7f98c1b7ad59]
    1: StubFrame [pc: 0x7f98c1afc2b1]
    2: ConstructFrame [pc: 0x7f98c1afbd4f]
    3: StubFrame [pc: 0x7f98c1bdef80]
Security context: 0x0b54b96db989 <JSObject>
    4: new FunctionExpressionNameScope [0x2e78b9ee41b9] [/tmp/gvm-source/gsa/gsa/node_modules/webpack/node_modules/eslint-scope/lib/scope.js:591] [bytecode=0x3d4e0db6d8e9 offset=92](this=0x06306e800ad1 <Scope map = 0x35cb0e4070f9>,0x2558ddf7...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x7f98c0f502d8 node::Abort() [/lib/x86_64-linux-gnu/libnode.so.72]
 2: 0x7f98c0e8d69a  [/lib/x86_64-linux-gnu/libnode.so.72]
 3: 0x7f98c1117282 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.72]
 4: 0x7f98c111752f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.72]
 5: 0x7f98c12b01b5  [/lib/x86_64-linux-gnu/libnode.so.72]
 6: 0x7f98c12bff0d v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.72]
 7: 0x7f98c12c0bb6 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.72]
 8: 0x7f98c12c2d3c v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.72]
 9: 0x7f98c12c2da4 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.72]
10: 0x7f98c128949b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/lib/x86_64-linux-gnu/libnode.so.72]
11: 0x7f98c15ba9d5 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/lib/x86_64-linux-gnu/libnode.so.72]
12: 0x7f98c1b7ad59  [/lib/x86_64-linux-gnu/libnode.so.72]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make[2]: *** [gsa/CMakeFiles/gsa.dir/build.make:1198: gsa/bundle.stamp] Errore 1
make[1]: *** [CMakeFiles/Makefile2:204: gsa/CMakeFiles/gsa.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2

i’ve try to update yarn and here my yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

browserslist@^4.13.0:
  version "4.14.7"
  resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.14.7.tgz#c071c1b3622c1c2e790799a37bb09473a4351cb6"
  integrity sha1-wHHBs2IsHC55B5mje7CUc6Q1HLY=
  dependencies:
    caniuse-lite "^1.0.30001157"
    colorette "^1.2.1"
    electron-to-chromium "^1.3.591"
    escalade "^3.1.1"
    node-releases "^1.1.66"

caniuse-lite@^1.0.30001157:
  version "1.0.30001159"
  resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001159.tgz?cache=0&sync_timestamp=1605683104423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001159.tgz#bebde28f893fa9594dadcaa7d6b8e2aa0299df20"
  integrity sha1-vr3ij4k/qVlNrcqn1rjiqgKZ3yA=

colorette@^1.2.1:
  version "1.2.1"
  resolved "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
  integrity sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs=

electron-to-chromium@^1.3.591:
  version "1.3.598"
  resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.598.tgz?cache=0&sync_timestamp=1605637958162&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.598.tgz#8f757018902ab6190323a8c5f6124d854893a35b"
  integrity sha1-j3VwGJAqthkDI6jF9hJNhUiTo1s=

escalade@^3.1.1:
  version "3.1.1"
  resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567437752&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
  integrity sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=

node-releases@^1.1.66:
  version "1.1.67"
  resolved "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.67.tgz?cache=0&sync_timestamp=1605581679207&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.67.tgz#28ebfcccd0baa6aad8e8d4d8fe4cbc49ae239c12"
  integrity sha1-KOv8zNC6pqrY6NTY/ky8Sa4jnBI=

i don’t understand where is the problem, i think is all updated…but during the “make” i see this before the error

so if i try a “yarn upgrade” in the same directory i see:

gvm@KaliGVM20:/tmp/gvm-source/gsa/build# yarn upgrade
yarn upgrade v1.22.5
warning package.json: No license field
warning No license field
warning No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
warning No license field
success Saved 6 new dependencies.
info Direct dependencies
└─ browserslist@4.14.7
info All dependencies
├─ browserslist@4.14.7
├─ caniuse-lite@1.0.30001159
├─ colorette@1.2.1
├─ electron-to-chromium@1.3.598
├─ escalade@3.1.1
└─ node-releases@1.1.67
Done in 3.41s.

but nothing, it doesn’t help
An anyone help me?
thanks

What if you try these 4 commands before making:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo “deb https://dl.yarnpkg.com/debian/ stable main” | tee /etc/apt/sources.list.d/yarn.list
apt update
apt install yarn -y

1 Like

Using yarn package from yarnpkg.com should fix the traceback. It seems that the yarn package from debian directly is broken.

Besides that yarn needs to be run at the directory where the package.json file is located. So running yarn from the build directory doesn’t do anything useful.

You can ignore the browserlist message because it is only a hint/warning.

1 Like

Thank you for the answer, i’ve searched the package.json and i’ve find it in /gsa/gsa/package.json, but now i’ve antoher kind of error during the “make”.

gvm@KaliGVM20:/tmp/gvm-source/gsa/build$ make
[  5%] Build gsa install files
yarn run v1.22.10
$ react-scripts build
Creating an optimized production build...

<--- Last few GCs --->

[25940:0x55a919cb3010]    51150 ms: Mark-sweep 348.3 (352.0) -> 348.1 (352.2) MB, 695.8 / 0.0 ms  (average mu = 0.188, current mu = 0.115) allocation failure scavenge might not succeed
[25940:0x55a919cb3010]    51831 ms: Mark-sweep 348.7 (352.2) -> 348.6 (352.8) MB, 678.1 / 0.0 ms  (average mu = 0.103, current mu = 0.004) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x7f0cabf51d59]
    1: StubFrame [pc: 0x7f0cabed32b1]
    2: ConstructFrame [pc: 0x7f0cabed2d4f]
    3: StubFrame [pc: 0x7f0cabfb5f80]
Security context: 0x2fae7aa9b989 <JSObject>
    4: new PatternVisitor(aka PatternVisitor) [0xa05c2468281] [/tmp/gvm-source/gsa/gsa/node_modules/eslint-scope/lib/pattern-visitor.js:55] [bytecode=0x470c9de64d9 offset=16](this=0x34523b4c0591 <the_hole>,0x156834ee4091 <Object map = 0x129b...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x7f0cab3272d8 node::Abort() [/lib/x86_64-linux-gnu/libnode.so.72]
 2: 0x7f0cab26469a  [/lib/x86_64-linux-gnu/libnode.so.72]
 3: 0x7f0cab4ee282 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.72]
 4: 0x7f0cab4ee52f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.72]
 5: 0x7f0cab6871b5  [/lib/x86_64-linux-gnu/libnode.so.72]
 6: 0x7f0cab696f0d v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.72]
 7: 0x7f0cab697bb6 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.72]
 8: 0x7f0cab699d3c v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.72]
 9: 0x7f0cab699da4 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.72]
10: 0x7f0cab66049b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/lib/x86_64-linux-gnu/libnode.so.72]
11: 0x7f0cab9919d5 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/lib/x86_64-linux-gnu/libnode.so.72]
12: 0x7f0cabf51d59  [/lib/x86_64-linux-gnu/libnode.so.72]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make[2]: *** [gsa/CMakeFiles/gsa.dir/build.make:1198: gsa/bundle.stamp] Errore 1
make[1]: *** [CMakeFiles/Makefile2:204: gsa/CMakeFiles/gsa.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2

now i’m tryng to solve this

i’ve already given a hint

3 Likes

not enough memory on vm (this was the problem, minimum need 2/4Gb ), i’ve update manually also the nodejs to 14.5

Unfortunately now:

gvm@KaliGVM20:/tmp/gvm-source/gsa/build$ make
[ 11%] Built target gsa
[ 16%] Building C object gsad/src/CMakeFiles/gsad.dir/gsad.c.o
/tmp/gvm-source/gsa/gsad/src/gsad.c: In function ‘start_unix_http_daemon’:
/tmp/gvm-source/gsa/gsad/src/gsad.c:2567:20: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2567 |     0, NULL, NULL, handler, http_handlers, MHD_OPTION_NOTIFY_COMPLETED,
      |                    ^~~~~~~
      |                    |
      |                    int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /tmp/gvm-source/gsa/gsad/src/gsad_params.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_user.h:27,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_base.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/gvm-source/gsa/gsad/src/gsad.c: In function ‘start_http_daemon’:
/tmp/gvm-source/gsa/gsad/src/gsad.c:2601:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2601 |     flags, port, NULL, NULL, handler, http_handlers,
      |                              ^~~~~~~
      |                              |
      |                              int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /tmp/gvm-source/gsa/gsad/src/gsad_params.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_user.h:27,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_base.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/gvm-source/gsa/gsad/src/gsad.c: In function ‘start_https_daemon’:
/tmp/gvm-source/gsa/gsad/src/gsad.c:2633:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2633 |     flags, port, NULL, NULL, &handle_request, http_handlers,
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /tmp/gvm-source/gsa/gsad/src/gsad_params.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_user.h:27,
                 from /tmp/gvm-source/gsa/gsad/src/gsad_base.h:28,
                 from /tmp/gvm-source/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [gsad/src/CMakeFiles/gsad.dir/build.make:82: gsad/src/CMakeFiles/gsad.dir/gsad.c.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:394: gsad/src/CMakeFiles/gsad.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2