Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment is not preserved between build steps #948

Closed
samsapti opened this issue Feb 20, 2023 · 4 comments
Closed

Environment is not preserved between build steps #948

samsapti opened this issue Feb 20, 2023 · 4 comments

Comments

@samsapti
Copy link

samsapti commented Feb 20, 2023

Affected Version

paru v1.11.1 - libalpm v13.0.2

Artix Linux

Description

The environment is not preserved between build steps, such as prepare() and build(). For instance, this causes building the package ledger-live to fail, as prepare() uses fnm to alter PATH. When building manually with makepkg -si, the environment is preserved and building works fine.

Output

To demonstrate, I've added echo "$PATH" to the end of prepare() and the start of build().

Output of paru -S ledger-live:

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: ledger-live 2.53.2-1 (Mon 20 Feb 2023 07:12:06 PM CET)
==> Retrieving sources...
  -> Downloading ledger-live-desktop-2.53.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  160M    0  160M    0     0  13.5M      0 --:--:--  0:00:11 --:--:-- 11.1M
==> Validating source files with sha512sums...
    ledger-live-desktop-2.53.2.tar.gz ... Passed
==> Making package: ledger-live 2.53.2-1 (Mon 20 Feb 2023 07:12:19 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found ledger-live-desktop-2.53.2.tar.gz
==> Validating source files with sha512sums...
    ledger-live-desktop-2.53.2.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting ledger-live-desktop-2.53.2.tar.gz with bsdtar
==> Starting prepare()...
Using Node v16.15.1
/run/user/1000/fnm_multishells/6304_1676916740602/bin:/home/user/.nvm/versions/node/v19.6.0/bin:/home/user/go/bin:/home/user/.local/bin:/home/user/go/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
==> Sources are ready.
ledger-live-2.53.2-1: parsing pkg list...
==> Making package: ledger-live 2.53.2-1 (Mon 20 Feb 2023 07:12:24 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
/usr/lib/ccache/bin:/home/user/.nvm/versions/node/v19.6.0/bin:/home/user/go/bin:/home/user/.local/bin:/home/user/go/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Scope: 33 of 79 workspace projects
Lockfile is up to date, resolution step is skipped
.                                        |    +3696 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/user/.local/share/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 3696, reused 3485, downloaded 0, added 3696, done
node_modules/.pnpm/blake2@4.1.1/node_modules/blake2: Running install script, failed in 618ms
.../blake2@4.1.1/node_modules/blake2 install$ node-gyp rebuild
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@9.2.0
│ gyp info using node@19.6.0 | linux | x64
│ gyp info find Python using Python version 3.10.9 found at "/usr/bin/python3"
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args   '/home/user/.cache/node/corepack/pnpm/7.14.0/dist/node_modules/node-gyp/gyp/gyp_main.py',
│ gyp info spawn args   'binding.gyp',
│ gyp info spawn args   '-f',
│ gyp info spawn args   'make',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/node_modules/.pnpm/blake2@4.1.1/node_modules/blake2/build/config.gypi',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/user/.cache/node/corepack/pnpm/7.14.0/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/user/.cache/node-gyp/19.6.0/include/node/common.gypi',
│ gyp info spawn args   '-Dlibrary=shared_library',
│ gyp info spawn args   '-Dvisibility=default',
│ gyp info spawn args   '-Dnode_root_dir=/home/user/.cache/node-gyp/19.6.0',
│ gyp info spawn args   '-Dnode_gyp_dir=/home/user/.cache/node/corepack/pnpm/7.14.0/dist/node_modules/node-gyp',
│ gyp info spawn args   '-Dnode_lib_file=/home/user/.cache/node-gyp/19.6.0/<(target_arch)/node.lib',
│ gyp info spawn args   '-Dmodule_root_dir=/home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/node_modules/.pnpm/blake2@4.1.1/node_modules/blake2',
│ gyp info spawn args   '-Dnode_engine=v8',
│ gyp info spawn args   '--depth=.',
│ gyp info spawn args   '--no-parallel',
│ gyp info spawn args   '--generator-output',
│ gyp info spawn args   'build',
│ gyp info spawn args   '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: Entering directory '/home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/node_modules/.pnpm/blake2@4.1.1/node_modules/blake2/build'
│   CXX(target) Release/obj.target/binding/src/binding.o
│   CC(target) Release/obj.target/binding/src/BLAKE2/sse/blake2b.o
│   CC(target) Release/obj.target/binding/src/BLAKE2/sse/blake2bp.o
│   CC(target) Release/obj.target/binding/src/BLAKE2/sse/blake2s.o
│   CC(target) Release/obj.target/binding/src/BLAKE2/sse/blake2sp.o
│ In file included from ../../../../nan@2.15.0/node_modules/nan/nan.h:178,
│                  from ../src/binding.cpp:4:
│ ../../../../nan@2.15.0/node_modules/nan/nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’
│    55 | typedef v8::Local<v8::AccessorSignature> Sig;
│       |                       ^~~~~~~~~~~~~~~~~
│ ../../../../nan@2.15.0/node_modules/nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
│    55 | typedef v8::Local<v8::AccessorSignature> Sig;
│       |                                        ^
│ ../../../../nan@2.15.0/node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, GetterCallback, SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, imp::Sig)’:
│ ../../../../nan@2.15.0/node_modules/nan/nan.h:2544:19: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::O
│  2544 |   tpl->SetAccessor(
│       |   ~~~~~~~~~~~~~~~~^
│  2545 |       name
│       |       ~~~~
│  2546 |     , getter_
│       |     ~~~~~~~~~
│  2547 |     , setter_
│       |     ~~~~~~~~~
│  2548 |     , obj
│       |     ~~~~~
│  2549 |     , settings
│       |     ~~~~~~~~~~
│  2550 |     , attribute
│       |     ~~~~~~~~~~~
│  2551 |     , signature);
│       |     ~~~~~~~~~~~~
│ In file included from /home/user/.cache/node-gyp/19.6.0/include/node/v8-function.h:15,
│                  from /home/user/.cache/node-gyp/19.6.0/include/node/v8.h:33,
│                  from /home/user/.cache/node-gyp/19.6.0/include/node/node.h:73,
│                  from ../src/binding.cpp:1:
│ /home/user/.cache/node-gyp/19.6.0/include/node/v8-template.h:807:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
│   807 |   void SetAccessor(
│       |        ^~~~~~~~~~~
│ /home/user/.cache/node-gyp/19.6.0/include/node/v8-template.h:812:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
│   812 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
│       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ /home/user/.cache/node-gyp/19.6.0/include/node/v8-template.h:814:8: note: candidate: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)’
│   814 |   void SetAccessor(
│       |        ^~~~~~~~~~~
│ /home/user/.cache/node-gyp/19.6.0/include/node/v8-template.h:819:22: note:   no known conversion for argument 7 from ‘Nan::imp::Sig’ {aka ‘int’} to ‘v8::SideEffectType’
│   819 |       SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
│       |       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp: In static member function ‘static void Hash::Init(v8::Local<v8::Object>)’:
│ ../src/binding.cpp:41:28: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
│    41 |                 target->Set(Nan::GetCurrentContext(), Nan::New("Hash").ToLocalChecked(), Nan::GetFunction(tpl).ToLocalChecked());
│       |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ In file included from /home/user/.cache/node-gyp/19.6.0/include/node/v8-array-buffer.h:13,
│                  from /home/user/.cache/node-gyp/19.6.0/include/node/v8.h:24:
│ /home/user/.cache/node-gyp/19.6.0/include/node/v8-object.h:244:37: note: declared here
│   244 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
│       |                                     ^~~
│ ../src/binding.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Hash::New(Nan::NAN_METHOD_ARGS_TYPE)’:
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2b_state*, const void*, size_t)’ {aka ‘int (*)(blake2b_state__*, const void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-funct
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:99:50: note: in expansion of macro ‘BLAKE_FN_CAST’
│    99 |                         obj->any_blake2_update = BLAKE_FN_CAST(blake2b_update);
│       |                                                  ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2b_state*, void*, size_t)’ {aka ‘int (*)(blake2b_state__*, void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-function-type]
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:100:49: note: in expansion of macro ‘BLAKE_FN_CAST’
│   100 |                         obj->any_blake2_final = BLAKE_FN_CAST(blake2b_final);
│       |                                                 ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2bp_state*, const void*, size_t)’ {aka ‘int (*)(blake2bp_state__*, const void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-fun
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:122:50: note: in expansion of macro ‘BLAKE_FN_CAST’
│   122 |                         obj->any_blake2_update = BLAKE_FN_CAST(blake2bp_update);
│       |                                                  ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2bp_state*, void*, size_t)’ {aka ‘int (*)(blake2bp_state__*, void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-function-type]
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:123:49: note: in expansion of macro ‘BLAKE_FN_CAST’
│   123 |                         obj->any_blake2_final = BLAKE_FN_CAST(blake2bp_final);
│       |                                                 ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2s_state*, const void*, size_t)’ {aka ‘int (*)(blake2s_state__*, const void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-funct
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:145:50: note: in expansion of macro ‘BLAKE_FN_CAST’
│   145 |                         obj->any_blake2_update = BLAKE_FN_CAST(blake2s_update);
│       |                                                  ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2s_state*, void*, size_t)’ {aka ‘int (*)(blake2s_state__*, void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-function-type]
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:146:49: note: in expansion of macro ‘BLAKE_FN_CAST’
│   146 |                         obj->any_blake2_final = BLAKE_FN_CAST(blake2s_final);
│       |                                                 ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2sp_state*, const void*, size_t)’ {aka ‘int (*)(blake2sp_state__*, const void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-fun
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:168:50: note: in expansion of macro ‘BLAKE_FN_CAST’
│   168 |                         obj->any_blake2_update = BLAKE_FN_CAST(blake2sp_update);
│       |                                                  ^~~~~~~~~~~~~
│ ../src/binding.cpp:19:9: warning: cast between incompatible function types from ‘int (*)(blake2sp_state*, void*, size_t)’ {aka ‘int (*)(blake2sp_state__*, void*, long unsigned int)’} to ‘uintptr_t (*)(void*, const uint8_t*, uint64_t)’ {aka ‘long unsigned int (*)(void*, const unsigned char*, long unsigned int)’} [-Wcast-function-type]
│    19 |         reinterpret_cast<uintptr_t (*)(void*, const uint8_t*, uint64_t)>(fn)
│       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ ../src/binding.cpp:169:49: note: in expansion of macro ‘BLAKE_FN_CAST’
│   169 |                         obj->any_blake2_final = BLAKE_FN_CAST(blake2sp_final);
│       |                                                 ^~~~~~~~~~~~~
│ ../src/binding.cpp: At global scope:
│ /home/user/.cache/node-gyp/19.6.0/include/node/node.h:993:7: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
│   993 |       (node::addon_register_func) (regfunc),                          \
│       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ /home/user/.cache/node-gyp/19.6.0/include/node/node.h:1027:3: note: in expansion of macro ‘NODE_MODULE_X’
│  1027 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
│       |   ^~~~~~~~~~~~~
│ ../src/binding.cpp:259:1: note: in expansion of macro ‘NODE_MODULE’
│   259 | NODE_MODULE(binding, init)
│       | ^~~~~~~~~~~
│ make: *** [binding.target.mk:139: Release/obj.target/binding/src/binding.o] Error 1
│ make: Leaving directory '/home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/node_modules/.pnpm/blake2@4.1.1/node_modules/blake2/build'
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/home/user/.cache/node/corepack/pnpm/7.14.0/dist/node_modules/node-gyp/lib/build.js:203:23)
│ gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
│ gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
│ gyp ERR! System Linux 6.1.10-hardened1-1-hardened
│ gyp ERR! command "/home/user/.nvm/versions/node/v19.6.0/bin/node" "/home/user/.cache/node/corepack/pnpm/7.14.0/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
│ gyp ERR! cwd /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/node_modules/.pnpm/blake2@4.1.1/node_modules/blake2
│ gyp ERR! node -v v19.6.0
│ gyp ERR! node-gyp -v v9.2.0
│ gyp ERR! not ok
└─ Failed in 618ms
 ELIFECYCLE  Command failed with exit code 1.
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'ledger-live-2.53.2-1':
error: packages failed to build: ledger-live-2.53.2-1

Output of makepkg -si:

==> Making package: ledger-live 2.53.2-1 (Mon 20 Feb 2023 07:13:58 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading ledger-live-desktop-2.53.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  160M    0  160M    0     0  13.5M      0 --:--:--  0:00:11 --:--:-- 11.1M
==> Validating source files with sha512sums...
    ledger-live-desktop-2.53.2.tar.gz ... Passed
==> Extracting sources...
  -> Extracting ledger-live-desktop-2.53.2.tar.gz with bsdtar
==> Starting prepare()...
Using Node v16.15.1
/run/user/1000/fnm_multishells/8665_1676916852145/bin:/home/user/.nvm/versions/node/v19.6.0/bin:/home/user/go/bin:/home/user/.local/bin:/home/user/go/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
==> Removing existing $pkgdir/ directory...
==> Starting build()...
/usr/lib/ccache/bin:/run/user/1000/fnm_multishells/8665_1676916852145/bin:/home/user/.nvm/versions/node/v19.6.0/bin:/home/user/go/bin:/home/user/.local/bin:/home/user/go/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Scope: 33 of 79 workspace projects
Lockfile is up to date, resolution step is skipped
.                                        |    +3696 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 3696, reused 3485, downloaded 0, added 0, done
apps/ledger-live-desktop postinstall$ node ./scripts/post-install.js
[2 lines collapsed]
│ file created
│ > ledger-live-desktop@2.53.2 preinstall-deps
│ > rimraf node_modules/paralleljs/package.json
│ > ledger-live-desktop@2.53.2 install-deps
│ > electron-builder install-app-deps
│   • electron-builder  version=23.6.0
│   • loaded configuration  file=/home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/apps/ledger-live-desktop/electron-builder.yml
│   • rebuilding native dependencies  dependencies=secp256k1@4.0.3, node-hid@2.1.2, usb@2.5.1, blake-hash@2.0.0, secp256k1@4.0.3, tiny-secp256k1@1.1.6, node-hid@2.1.2, tiny-secp256k1@1.1.6 platform=linux arch=x64
│   • install prebuilt binary  name=node-hid version=2.1.2 platform=linux arch=x64 napi=
│   • install prebuilt binary  name=node-hid version=2.1.2 platform=linux arch=x64 napi=
└─ Done in 6.2s
Done in 9.4s

> ledger-live@0.0.0 build:lld:deps /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2
> pnpm turbo build --no-daemon --filter="ledger-live-desktop^..."

• Packages in scope: @ledgerhq/crypto-icons-ui, @ledgerhq/cryptoassets, @ledgerhq/devices, @ledgerhq/errors, @ledgerhq/hw-app-algorand, @ledgerhq/hw-app-btc, @ledgerhq/hw-app-cosmos, @ledgerhq/hw-app-eth, @ledgerhq/hw-app-near, @ledgerhq/hw-app-polkadot, @ledgerhq/hw-app-solana, @ledgerhq/hw-app-str, @ledgerhq/hw-app-tezos, @ledgerhq/hw-app-trx, @ledgerhq/hw-app-xrp, @ledgerhq/hw-transport, @ledgerhq/hw-transport-http, @ledgerhq/hw-transport-mocker, @ledgerhq/hw-transport-node-hid-noevents, @ledgerhq/hw-transport-node-hid-singleton, @ledgerhq/hw-transport-node-speculos, @ledgerhq/icons-ui, @ledgerhq/live-common, @ledgerhq/logs, @ledgerhq/react-ui, @ledgerhq/types-cryptoassets, @ledgerhq/types-devices, @ledgerhq/types-live, @ledgerhq/ui-shared, esbuild-utils, native-modules-tools
• Running build in 31 packages
• Remote caching disabled
@ledgerhq/logs:build: cache miss, executing 5769b6666fa3517f
@ledgerhq/types-devices:build: cache miss, executing 0be1499f2b9db6b3
@ledgerhq/errors:build: cache miss, executing 78215f389384db17
@ledgerhq/types-cryptoassets:build: cache miss, executing 03631c0ca3e80dd3
@ledgerhq/icons-ui:build: cache miss, executing 6b4df398aa2c6f0d
@ledgerhq/crypto-icons-ui:build: cache miss, executing e9038e1992e51960
@ledgerhq/ui-shared:build: cache miss, executing 908de465cef7f831
@ledgerhq/errors:build:
@ledgerhq/errors:build: > @ledgerhq/errors@6.12.3 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ledgerjs/packages/errors
@ledgerhq/errors:build: > tsc && tsc -m ES6 --outDir lib-es
@ledgerhq/errors:build:
@ledgerhq/icons-ui:build:
@ledgerhq/icons-ui:build: > @ledgerhq/icons-ui@0.3.4 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ui/packages/icons
@ledgerhq/icons-ui:build: > pnpm run clean && node scripts/buildIcons && tsc --noEmit false && node scripts/transpile
@ledgerhq/icons-ui:build:
@ledgerhq/types-cryptoassets:build:
@ledgerhq/types-cryptoassets:build: > @ledgerhq/types-cryptoassets@7.0.0 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ledgerjs/packages/types-cryptoassets
@ledgerhq/types-cryptoassets:build: > tsc && tsc -m ES6 --outDir lib-es
@ledgerhq/types-cryptoassets:build:
@ledgerhq/logs:build:
@ledgerhq/logs:build: > @ledgerhq/logs@6.10.1 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ledgerjs/packages/logs
@ledgerhq/logs:build: > tsc && tsc -m ES6 --outDir lib-es
@ledgerhq/logs:build:
@ledgerhq/ui-shared:build:
@ledgerhq/ui-shared:build: > @ledgerhq/ui-shared@0.1.10 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ui/packages/shared
@ledgerhq/ui-shared:build: > tsc && node scripts/transpile
@ledgerhq/ui-shared:build:
@ledgerhq/crypto-icons-ui:build:
@ledgerhq/crypto-icons-ui:build: > @ledgerhq/crypto-icons-ui@0.2.1 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ui/packages/crypto-icons
@ledgerhq/crypto-icons-ui:build: > pnpm run clean && node scripts/buildReactIcons && tsc --noEmit false && node scripts/transpile
@ledgerhq/crypto-icons-ui:build:
@ledgerhq/types-devices:build:
@ledgerhq/types-devices:build: > @ledgerhq/types-devices@6.22.4 build /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ledgerjs/packages/types-devices
@ledgerhq/types-devices:build: > tsc && tsc -m ES6 --outDir lib-es
@ledgerhq/types-devices:build:
@ledgerhq/icons-ui:build:
@ledgerhq/icons-ui:build: > @ledgerhq/icons-ui@0.3.4 clean /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ui/packages/icons
@ledgerhq/icons-ui:build: > rimraf react native src/react src/native
@ledgerhq/icons-ui:build:
@ledgerhq/crypto-icons-ui:build:
@ledgerhq/crypto-icons-ui:build: > @ledgerhq/crypto-icons-ui@0.2.1 clean /home/user/.cache/paru/clone/ledger-live/src/ledger-live--ledgerhq-live-desktop-2.53.2/libs/ui/packages/crypto-icons
@ledgerhq/crypto-icons-ui:build: > rimraf react native src/react src/native
@ledgerhq/crypto-icons-ui:build:
^C
@ledgerhq/react-ui:build: cache miss, executing 8f23e6cf70cb4b39
==> ERROR: Aborted by user! Exiting...

paru.conf:

[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
RemoveMake
SudoLoop
CleanAfter
UpgradeMenu

pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc runit
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
VerbosePkgLists
ParallelDownloads = 24

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Artix Linux
# packagers with `pacman-key --populate artix`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The gremlins repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[gremlins]
#Include = /etc/pacman.d/mirrorlist

[system]
Include = /etc/pacman.d/mirrorlist

[world]
Include = /etc/pacman.d/mirrorlist

#[galaxy-gremlins]
#Include = /etc/pacman.d/mirrorlist

[galaxy]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the lib32 repositories as required here.

#[lib32-gremlins]
#Include = /etc/pacman.d/mirrorlist

#[lib32]
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

#[universe]
#Server = https://universe.artixlinux.org/$arch
#Server = https://mirror1.artixlinux.org/universe/$arch
#Server = https://mirror.pascalpuffke.de/artix-universe/$arch
#Server = https://artixlinux,qontinuum.space/artixlinux/universe/os/$arch
#Server = https://mirror1.c1.netactuate,com/artix/universe/$arch
#Server = https://ftp.crifo.org/artix-universe/

[extra]
Include = /etc/pacman.d/mirrorlist-arch

[community]
Include = /etc/pacman.d/mirrorlist-arch
@phnx47
Copy link

phnx47 commented Mar 6, 2023

Confirm. I reproduced this error. Added check node version in build step to ensure that right version https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=ledger-live-git&id=dc4e7c2a4e6ffe7aad9b7fcd5a889adb6541fa09

I will move install NodeJS to build step for packages which I maintain.

@Morganamilo
Copy link
Owner

Assuming the env will be preserved is a mistake a lot of people often make and it should be fixed in the pkgbuild.

If I ever get around to it I'll be forcing makepkg to reset the env between functions.

@samsapti
Copy link
Author

@Morganamilo interesting, thanks for pointing out.

Is that how makepkg actually should work?

@eclairevoyant
Copy link

yes, see Jguer/yay#1006 especially the comment from one of the makepkg devs:

You may consider this to be my advice that the recommended way to write a PKGBUILD is to declare your variables in every function that needs them, or alternatively in the global scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants