Open FieryFlames opened 1 year ago
Originally posted at https://github.com/mmomtchev/node-magickwand/issues/51#issue-1948826621
Thanks for the report @FieryFlames
In order to debug this, we would need a bit more of context and isolation. If the build of some recipe from ConanCenter is failing we should be able to reproduce it. I would suggest:
conan install harfbuzz/7.1.0@ --build=harfbuzz
(Conan 1.X command, there is already Conan 2.0, but it seems that this is not what is being used). Some things that could be failing:
https://github.com/mmomtchev/node-magickwand/blob/main/conanfile.txt
seems old, using old versions, and specially legacy generators like pkg_config
and compiler_args
that have been superseded years ago with modern alternativesI couldn't determine the Conan version, I've never used Conan before. I will continue debugging and try to reproduce outside of node-imagemagick later today.
Okay, I believe I have Conan 1.61.
The following is the end of the result of conan install harfbuzz/7.1.0@ --build=harfbuzz --build=brotli --build=glib --build=libpng
(the original suggested I add those as there was no prebuilts). I was unable to copy the full output out of my terminal.
harfbuzz/7.1.0: Applying build-requirement: meson/1.1.0
harfbuzz/7.1.0: Applying build-requirement: pkgconf/1.9.3
harfbuzz/7.1.0: Applying build-requirement: gettext/0.21
harfbuzz/7.1.0: Applying build-requirement: ninja/1.11.1
harfbuzz/7.1.0: WARN: Build folder is dirty, removing it: /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b
harfbuzz/7.1.0: Copying sources to build folder
harfbuzz/7.1.0: Building your package in /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b
harfbuzz/7.1.0: Generator txt created conanbuildinfo.txt
harfbuzz/7.1.0: Calling generate()
harfbuzz/7.1.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
harfbuzz/7.1.0: Aggregating env generators
harfbuzz/7.1.0: Calling build()
harfbuzz/7.1.0: apply_conandata_patches(): No patches defined in conandata
harfbuzz/7.1.0: Meson configure cmd: meson setup --native-file "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release/conan/conan_meson_native.ini" "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release" "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/src" -Dprefix="/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/package/4b6a6193d24485c01c73fda8ce1844d971a9fd4b"
The Meson build system
Version: 1.1.0
Source dir: /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/src
Build dir: /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release
Build type: native build
Project name: harfbuzz
Project version: 7.1.0
../src/meson.build:1:0: ERROR: Unable to detect linker for compiler `clang -Wl,--version -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -arch arm64`
stdout:
stderr: ld: unknown options: --version
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A full log can be found at /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release/meson-logs/meson-log.txt
harfbuzz/7.1.0:
harfbuzz/7.1.0: ERROR: Package '4b6a6193d24485c01c73fda8ce1844d971a9fd4b' build failed
harfbuzz/7.1.0: WARN: Build folder /Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release
ERROR: harfbuzz/7.1.0: Error in build() method, line 161
meson.configure()
ConanException: Error 1 while executing meson setup --native-file "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release/conan/conan_meson_native.ini" "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/build-release" "/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/build/4b6a6193d24485c01c73fda8ce1844d971a9fd4b/src" -Dprefix="/Users/jackmatthews/.conan/data/harfbuzz/7.1.0/_/_/package/4b6a6193d24485c01c73fda8ce1844d971a9fd4b"
Hi @FieryFlames,
I faced the same problem, which seems related to meson < 1.2.x and the latest version of macOS Sonoma + Clang 15. I just opened an issue in the meson repository: https://github.com/mesonbuild/meson/issues/12399
As a workaround, you can override the meson/1.1.0 version by adding another profile or changing your default one.
Let's create a little wrapper of your default profile in your current working directory.
Create an empty file named using_meson_1_2_2
and add this content:
using_meson_1_2_2
include(default)
[tool_requires]
meson/1.2.2
Now, run your latest command, but adding this param -pr using_meson_1_2_2
at the end of it:
conan install harfbuzz/7.1.0@ --build=harfbuzz --build=brotli --build=glib --build=libpng -pr using_meson_1_2_2
It should work now:
....
a4346565c0645d6abe24f/lib/cmake/harfbuzz
Installing /Users/franchuti/.conan/data/harfbuzz/7.1.0/_/_/build/fb058d56e1d5c473125a4346565c0645d6abe24f/build-release/meson-private/harfbuzz-gobject.pc to /Users/franchuti/.conan/data/harfbuzz/7.1.0/_/_/package/fb058d56e1d5c473125a4346565c0645d6abe24f/lib/pkgconfig
harfbuzz/7.1.0 package(): Packaged 1 file: COPYING
harfbuzz/7.1.0 package(): Packaged 37 '.h' files
harfbuzz/7.1.0 package(): Packaged 1 '.hh' file: hb-cplusplus.hh
harfbuzz/7.1.0 package(): Packaged 3 '.a' files: libharfbuzz-gobject.a, libharfbuzz.a, libharfbuzz-subset.a
harfbuzz/7.1.0: Package 'fb058d56e1d5c473125a4346565c0645d6abe24f' created
harfbuzz/7.1.0: Created package revision c5a5afcfb71fec20efde11c72c95f85d
Aggregating env generators
Environment details
Steps to reproduce
npm i node-imagemagick
Logs