-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
We set SHARP_FORCE_GLOBAL_LIBVIPS
, but it's still including its own header files.
#4150
Comments
Are you sure you're using a globally-installed libvips? I ask as, if you follow the Please ensure you've installed all of the additional dependencies for building from source as documented. https://sharp.pixelplumbing.com/install#building-from-source If you're still having problems, please provide the complete output of running |
Thanks for your quick reply. I have included build log. This is the section you requested:
From build log you can see the included path is incorrect (
|
Thanks for your reply, I found the solution. We must provide
|
I'm unsure why the capitalisation of an |
I tried using a lowercase OS command and got the same error.
|
Running If you're still having problems, please provide the complete output of running the following commands in an empty directory:
Please don't set |
You are right. Log output:
|
Thanks, it looks like this succeeded in building sharp from source against a globally-installed libvips and the |
My initial problem is building the web team project in Yocto. I've boiled it down to identify the cause and fix it. The module was successfully installed using that command. However, I am curious as to why exporting
Build log:
|
You've probably run into the problem that #4111 fixed, which will be part of v0.33.5. |
v0.33.5 now available |
Question about an existing feature
What are you trying to achieve?
I noticed that when we are providing env var
SHARP_FORCE_GLOBAL_LIBVIPS
, it's still linked to downloaded header files and doesn't use globally installed header files. I think this behavior is incorrect, because there might be a difference between header files and compiled library.Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question
After a successful build, if we open file
src/build/sharp-linux-x64.target.mk
we can see this:The make commands needs this information to properly link header files , otherwise we got errors like this:
The above error is because the path
/usr/include/glib-2.0
is not included in the search path. The compiler clearly doesn't know where it is, but if we search for it, we can see it is inside/usr/include/glib-2.0
.There is a function (
buildSharpLibvipsIncludeDir
) inside scriptsharp/lib/libvips.js
that fills the search path inclusion section. I saw the script, it seems providing env varSHARP_FORCE_GLOBAL_LIBVIPS
isn't affect the search path at all.I suggest using the system header files when the user set env var
SHARP_FORCE_GLOBAL_LIBVIPS
.Build log
npm verbose cli /usr/bin/node /usr/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm install node-gyp node-addon-api sharp
npm verbose argv "install" "--loglevel" "verbose" "--foreground-scripts" "node-gyp" "node-addon-api" "sharp"
npm verbose logfile logs-max:10 dir:/home/mostafa/.npm/_logs/2024-07-03T10_25_49_466Z-
npm verbose logfile /home/mostafa/.npm/_logs/2024-07-03T10_25_49_466Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/node-gyp 766ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/node-addon-api 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/sharp 14ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/semver 154ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 158ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-x64 159ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-darwin-arm64 165ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/semver 172ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-x64 175ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm64 178ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-x64 177ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-arm 194ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linux-s390x 194ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-arm64 185ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/color 210ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-darwin-arm64 207ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-libvips-linuxmusl-x64 191ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/glob 247ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-s390x 97ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm 109ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-arm64 107ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-arm64 91ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linux-x64 102ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-linuxmusl-x64 91ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-wasm32 89ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-ia32 81ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@img%2fsharp-win32-x64 79ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/env-paths 530ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/proc-log 528ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 557ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/nopt 576ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/which 577ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/tar 588ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/exponential-backoff 618ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/make-fetch-happen 724ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/jackspeak 192ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/path-scurry 193ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/foreground-child 209ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass 209ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/package-json-from-dist 250ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/cacache 248ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass 258ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-fetch 254ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/negotiator 263ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass 253ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minizlib 267ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/yallist 284ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/is-lambda 315ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ssri 335ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minimatch 353ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fs-minipass 173ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/promise-retry 349ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2fagent 366ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/isexe 221ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-flush 513ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/http-cache-semantics 505ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/abbrev 511ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/chownr 535ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-pipeline 553ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/mkdirp 552ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/cross-spawn 137ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/lru-cache 157ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 190ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@isaacs%2fcliui 196ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@pkgjs%2fparseargs 202ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 651ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/shebang-command 133ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/path-key 145ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/shebang-regex 119ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 144ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/string-width 163ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 162ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/wrap-ansi 164ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/string-width 182ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/wrap-ansi 187ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/emoji-regex 143ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 159ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 168ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 185ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/eastasianwidth 193ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 187ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/emoji-regex 195ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 195ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/socks-proxy-agent 158ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/http-proxy-agent 170ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/unique-filename 172ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/https-proxy-agent 186ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/agent-base 196ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-sized 208ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-collect 212ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/encoding 210ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2ffs 220ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/err-code 212ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/retry 214ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/p-map 233ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/debug 141ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/debug 153ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/socks 162ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ms 112ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/aggregate-error 141ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/unique-slug 313ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/balanced-match 146ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 156ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 145ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/indent-string 155ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/clean-stack 162ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 15ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/@emnapi%2fruntime 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/color-string 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/tslib 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle 19ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/color-name 25ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/color-name 25ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 4ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ip-address 121ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/smart-buffer 138ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/jsbn 142ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/sprintf-js 143ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/imurmurhash 139ms (cache revalidated)
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-win32-x64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-win32-ia32
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-wasm32
npm verbose reify failed optional dependency /tmp/test2/node_modules/@emnapi/runtime
npm verbose reify failed optional dependency /tmp/test2/node_modules/tslib
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-linuxmusl-x64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-linuxmusl-arm64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-linux-s390x
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-linux-arm64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-linux-arm
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-linuxmusl-x64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-linuxmusl-arm64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-linux-s390x
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-linux-arm64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-linux-arm
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-darwin-x64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-libvips-darwin-arm64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-darwin-x64
npm verbose reify failed optional dependency /tmp/test2/node_modules/@img/sharp-darwin-arm64
npm info run [email protected] install node_modules/sharp node install/check
sharp: Detected SHARP_FORCE_GLOBAL_LIBVIPS, skipping search for globally-installed libvips
sharp: Detected globally-installed libvips v8.15.2
sharp: Attempting to build from source via node-gyp
sharp: Found node-addon-api
sharp: Found node-gyp version 10.1.0
sharp: See https://sharp.pixelplumbing.com/install#building-from-source
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/usr/bin/node',
gyp verb cli '/tmp/test2/node_modules/.bin/node-gyp',
gyp verb cli 'rebuild',
gyp verb cli '--directory=src'
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info chdir src
gyp verb clean removing "build" directory
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "/usr/bin/python3"
gyp verb find Python - executing "/usr/bin/python3" to get version
gyp verb find Python - version is "3.9.2"
gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
gyp verb get node dir no --target version specified, falling back to host node version: 20.15.0
gyp verb install input version string "20.15.0"
gyp verb install installing version: 20.15.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb get node dir target node version installed: 20.15.0
gyp verb build dir attempting to create "build" dir: /tmp/test2/node_modules/sharp/src/build
gyp verb build dir "build" dir needed to be created? Yes
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /tmp/test2/node_modules/sharp/src/build/config.gypi
gyp verb config.gypi checking for gypi file: /tmp/test2/node_modules/sharp/src/config.gypi
gyp verb common.gypi checking for gypi file: /tmp/test2/node_modules/sharp/src/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/tmp/test2/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 '/tmp/test2/node_modules/sharp/src/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/tmp/test2/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/mostafa/.cache/node-gyp/20.15.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/mostafa/.cache/node-gyp/20.15.0',
gyp info spawn args '-Dnode_gyp_dir=/tmp/test2/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/mostafa/.cache/node-gyp/20.15.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/tmp/test2/node_modules/sharp/src',
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 verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/mostafa/.cache/node-gyp/20.15.0
gyp verb python /usr/bin/python3
gyp verb
which
succeeded formake
/usr/bin/makegyp verb bin symlinks created symlink to "/usr/bin/python3" in "/tmp/test2/node_modules/sharp/src/build/node_gyp_bins" and added to PATH
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/tmp/test2/node_modules/sharp/src/build'
cc -o Release/obj.target/nothing/../../node-addon-api/nothing.o ../../../node-addon-api/nothing.c '-DNODE_GYP_MODULE_NAME=nothing' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' -I/home/mostafa/.cache/node-gyp/20.15.0/include/node -I/home/mostafa/.cache/node-gyp/20.15.0/src -I/home/mostafa/.cache/node-gyp/20.15.0/deps/openssl/config -I/home/mostafa/.cache/node-gyp/20.15.0/deps/openssl/openssl/include -I/home/mostafa/.cache/node-gyp/20.15.0/deps/uv/include -I/home/mostafa/.cache/node-gyp/20.15.0/deps/zlib -I/home/mostafa/.cache/node-gyp/20.15.0/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/nothing/../../node-addon-api/nothing.o.d.raw -c
rm -f Release/obj.target/../../node-addon-api/nothing.a Release/obj.target/../../node-addon-api/nothing.a.ar-file-list; mkdir -p
dirname Release/obj.target/../../node-addon-api/nothing.a
ar crs Release/obj.target/../../node-addon-api/nothing.a @Release/obj.target/../../node-addon-api/nothing.a.ar-file-list
ln -f "Release/obj.target/../../node-addon-api/nothing.a" "Release/nothing.a" 2>/dev/null || (rm -rf "Release/nothing.a" && cp -af "Release/obj.target/../../node-addon-api/nothing.a" "Release/nothing.a")
touch Release/obj.target/libvips-cpp.stamp
g++ -o Release/obj.target/sharp-linux-x64/common.o ../common.cc '-DNODE_GYP_MODULE_NAME=sharp-linux-x64' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_VERSION=9' '-DNODE_ADDON_API_DISABLE_DEPRECATED' '-DNODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS' '-DBUILDING_NODE_EXTENSION' -I/home/mostafa/.cache/node-gyp/20.15.0/include/node -I/home/mostafa/.cache/node-gyp/20.15.0/src -I/home/mostafa/.cache/node-gyp/20.15.0/deps/openssl/config -I/home/mostafa/.cache/node-gyp/20.15.0/deps/openssl/openssl/include -I/home/mostafa/.cache/node-gyp/20.15.0/deps/uv/include -I/home/mostafa/.cache/node-gyp/20.15.0/deps/zlib -I/home/mostafa/.cache/node-gyp/20.15.0/deps/v8/include -I../../../node-addon-api -I../. -I/glib-2.0 -I/tmp/test2/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -std=c++0x -fexceptions -Wall -Os -MMD -MF ./Release/.deps/Release/obj.target/sharp-linux-x64/common.o.d.raw -c
In file included from ../common.cc:13:
/usr/local/include/vips/vips8:35:10: fatal error: glib-object.h: No such file or directory
35 | #include <glib-object.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [sharp-linux-x64.target.mk:137: Release/obj.target/sharp-linux-x64/common.o] Error 1
make: Leaving directory '/tmp/test2/node_modules/sharp/src/build'
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp ERR! stack at ChildProcess. (/tmp/test2/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 4.9.0-13-amd64
gyp ERR! command "/usr/bin/node" "/tmp/test2/node_modules/.bin/node-gyp" "rebuild" "--directory=src"
gyp ERR! cwd /tmp/test2/node_modules/sharp/src
gyp ERR! node -v v20.15.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok
npm info run [email protected] install { code: 1, signal: null }
npm verbose stack Error: command failed
npm verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
npm verbose stack at ChildProcess.emit (node:events:519:28)
npm verbose stack at maybeClose (node:internal/child_process:1105:16)
npm verbose stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm verbose pkgid [email protected]
npm verbose cwd /tmp/test2
npm verbose Linux 4.9.0-13-amd64
npm verbose node v20.15.0
npm verbose npm v10.7.0
npm error code 1
npm error path /tmp/test2/node_modules/sharp
npm error command failed
npm error command sh -c node install/check
npm verbose exit 1
npm verbose code 1
npm error A complete log of this run can be found in: /home/mostafa/.npm/_logs/2024-07-03T10_25_49_466Z-debug-0.log
Regards.
The text was updated successfully, but these errors were encountered: