-
-
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
Building on FreeBSD uses incorrect pkgconfig directories #3106
Comments
When building from source, the include path is determined by Line 89 in 83bb6a4
The salient part of the error message you're seeing is:
Which version of vips is installed? |
this was not the issue when I tried to build it by calling node-gyp configure and node-gyp build, it attempted to build but failed because vips/vips8 was not available, when it was in fact, available, in /usr/local/include, but the build script only told the compiler to look in /usr/include |
What is the output of running |
8.12.2 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libgsf-1 -I/usr/local/include/libxml2 -I/usr/local/include/ImageMagick-7 -I/usr/local/include/orc-0.4 -I/usr/local/include/OpenEXR -I/usr/local/include/Imath -I/usr/local/include/openjpeg-2.4 -I/usr/local/include/libvmaf -I/usr/local/include/poppler/glib -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/poppler -I/usr/local/include/librsvg-2.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz -I/usr/local/include/fribidi |
Thank you, that looks OK. I think it might be the call to Line 68 in 55efe56
If you're able to do so, please can you check/debug this logic to see if it's finding/using the relevant values for your system, thank you. |
seems like it should be in |
Yes, thank you, that will be it. Presumably we'll need to add Line 89 in 55efe56
Happy to accept a PR if you're able. I wonder why this hasn't come up before. Perhaps some flavours/versions of BSD automagically set |
Commit fc3b4a6 adds these two additional pkg-config paths. This will be in v0.30.2, thanks for reporting and helping diagnose. |
v0.30.2 now available. |
Possible install-time or require-time problem
npm install
is the same as the architecture and platform of Node.js used at runtime.Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.Is this a problem with filesystem permissions?
No.
What is the complete output of running
npm install --verbose sharp
?sharp: Installation error: BSD/SunOS systems require manual installation of libvips >= 8.12.2
sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm verb lifecycle sharp@0.30.1
install: unsafe-perm in lifecycle trueinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/home/fedi/test/node_modules/sharp/node_modules/.bin:/usr/home/fedi/test/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/fedi/binnpm verb lifecycle sharp@0.30.1
npm verb lifecycle sharp@0.30.1
install: CWD: /usr/home/fedi/test/node_modules/sharpinstall: Failed to exec install scriptnpm info lifecycle sharp@0.30.1
npm timing action:install Completed in 236ms
npm verb unlock done using /home/fedi/.npm/_locks/staging-48283a3cae8db060.lock for /usr/home/fedi/test/node_modules/.staging
npm timing stage:rollbackFailedOptional Completed in 63ms
npm timing stage:runTopLevelLifecycles Completed in 9870ms
npm WARN enoent ENOENT: no such file or directory, open '/usr/home/fedi/test/package.json'
npm verb enoent This is related to npm not being able to find a file.
npm verb enoent
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
npm verb stack Error: sharp@0.30.1 install:
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm verb stack Exit status 1
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
npm verb stack at EventEmitter.emit (node:events:390:28)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at ChildProcess.emit (node:events:390:28)
npm verb stack at maybeClose (node:internal/child_process:1064:16)
npm verb stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm verb pkgid sharp@0.30.1
npm verb cwd /usr/home/fedi/test
npm verb FreeBSD 13.0-RELEASE-p7
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--verbose" "sharp"
npm verb node v16.13.0
npm verb npm v6.14.8
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.30.1 install:
(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.30.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 10352ms
npm ERR! A complete log of this run can be found in:
npm ERR! /home/fedi/.npm/_logs/2022-02-23T02_46_35_982Z-debug.log
What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?npx: installed 1 in 0.85s
System:
OS: freebsd
CPU: (48) x64 Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz
Memory: 70.25 GB / 127.84 GB
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Additional information
Attempting to build using node-gyp has the build fail by not finding vips/vips8 despite it being available at /usr/local/include/vips/vips8, the build script likely did not include /usr/local/include as one of the include paths.
The text was updated successfully, but these errors were encountered: