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

[package] harfbuzz/5.3.1: Windows x64 to Windows ARM64 cross build fails #15335

Closed
szigetics opened this issue Jan 17, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@szigetics
Copy link

szigetics commented Jan 17, 2023

Description

Cross compilation from Windows x64 to Windows ARM64 fails for harfbuzz/5.3.1.
(Based on the error that I see, it could be that this is not a bug with the recipe, but a bug in conan's meson tool instead.)

Package and Environment Details

  • Package Name/Version: harfbuzz/5.3.1
  • Operating System+version: Windows
  • Compiler+version: Visual Studio 17
  • Conan version: conan 1.57.0
  • Python version: Python 3.10.8

Conan profile

Configuration (profile_host):
[settings]
arch=armv8
arch_build=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MDd
compiler.version=17
os=Windows
os_build=Windows
[options]
harfbuzz:with_glib=False
[build_requires]
[env]

Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MT
compiler.version=17
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

Steps to reproduce

Simplified version of my command :

conan create recipes/harfbuzz/all harfbuzz/5.3.1@jenkins-clt/stable --build=missing --profile:build=default --profile:host=hostProfile --test-folder=None -o harfbuzz:with_glib=False

Actual command that I use :

conan create recipes/harfbuzz/all harfbuzz/5.3.1@jenkins-clt/stable --build=missing --profile:build=default --profile:host=hostProfile --json conan-create-armv8-Debug.json --test-folder=None --require-override='boost/1.80.0@jenkins-clt/stable' --require-override='gtest/1.12.1@jenkins-clt/stable' --require-override='magic_enum/0.8.1@jenkins-clt/stable' --require-override='nlohmann_json/3.11.2@jenkins-clt/stable' --require-override='openssl/1.1.1s@jenkins-clt/stable' --require-override='protobuf/3.21.4@jenkins-clt/stable' --require-override='fmt/9.1.0@jenkins-clt/stable' --require-override='spdlog/1.11.0@jenkins-clt/stable' --require-override='zlib/1.2.13@jenkins-clt/stable' --require-override='cpp-jwt/1.4@jenkins-clt/stable' --require-override='opengl/system@jenkins-clt/stable' --require-override='double-conversion/3.2.1@jenkins-clt/stable' --require-override='sentry-native/0.5.2@jenkins-clt/stable' --require-override='brotli/1.0.9@jenkins-clt/stable' --require-override='bzip2/1.0.8@jenkins-clt/stable' --require-override='libjpeg-turbo/2.1.4@jenkins-clt/stable' --require-override='libpng/1.6.38@jenkins-clt/stable' --require-override='freetype/2.10.4@jenkins-clt/stable' --require-override='pcre2/10.37@jenkins-clt/stable' --require-override='md4c/0.4.8@jenkins-clt/stable' --require-override='di/1.2.0@jenkins-clt/stable' --require-override='d3dcompiler/6.3.9600.16384@jenkins-clt/stable' --require-override='fakeit/2.3.0@jenkins-clt/stable' --require-override='krabsetw/2022.09.29@jenkins-clt/stable' -o harfbuzz:with_glib=False

Logs

Click to expand log
[2023-01-17T18:58:20.652Z] Exporting package recipe
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable exports: File 'conandata.yml' found. Exporting it...
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable exports: Copied 1 '.yml' file: conandata.yml
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable: Calling export_sources()
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable: A new conanfile.py version was exported
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable: Folder: C:\Users\ContainerAdministrator\.conan\data\harfbuzz\5.3.1\jenkins-clt\stable\export
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable: Using the exported files summary hash as the recipe revision: 1bb9b6d571e1d5537035e1c6f8f3d40a 
[2023-01-17T18:58:20.652Z] harfbuzz/5.3.1@jenkins-clt/stable: Exported revision: 1bb9b6d571e1d5537035e1c6f8f3d40a
[2023-01-17T18:58:20.652Z] Configuration (profile_host):
[2023-01-17T18:58:20.652Z] [settings]
[2023-01-17T18:58:20.652Z] arch=armv8
[2023-01-17T18:58:20.652Z] arch_build=x86_64
[2023-01-17T18:58:20.652Z] build_type=Debug
[2023-01-17T18:58:20.652Z] compiler=Visual Studio
[2023-01-17T18:58:20.652Z] compiler.runtime=MDd
[2023-01-17T18:58:20.652Z] compiler.version=17
[2023-01-17T18:58:20.652Z] os=Windows
[2023-01-17T18:58:20.652Z] os_build=Windows
[2023-01-17T18:58:20.652Z] [options]
[2023-01-17T18:58:20.652Z] harfbuzz:with_glib=False
[2023-01-17T18:58:20.652Z] [build_requires]
[2023-01-17T18:58:20.652Z] [env]
[2023-01-17T18:58:20.652Z] 
[2023-01-17T18:58:20.652Z] Configuration (profile_build):
[2023-01-17T18:58:20.652Z] [settings]
[2023-01-17T18:58:20.652Z] arch=x86_64
[2023-01-17T18:58:20.652Z] arch_build=x86_64
[2023-01-17T18:58:20.652Z] build_type=Release
[2023-01-17T18:58:20.652Z] compiler=Visual Studio
[2023-01-17T18:58:20.652Z] compiler.runtime=MT
[2023-01-17T18:58:20.652Z] compiler.version=17
[2023-01-17T18:58:20.652Z] os=Windows
[2023-01-17T18:58:20.652Z] os_build=Windows
[2023-01-17T18:58:20.652Z] [options]
[2023-01-17T18:58:20.652Z] [build_requires]
[2023-01-17T18:58:20.652Z] [env]
[2023-01-17T18:58:20.652Z] 
...
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: meson/0.64.1
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: pkgconf/1.9.3
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: glib/2.75.0
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: ninja/1.11.1
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: libffi/3.4.3
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: pcre2/10.40
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: libgettext/0.21
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: zlib/1.2.13
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: bzip2/1.0.8
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Applying build-requirement: libiconv/1.17
[2023-01-17T19:20:38.352Z] harfbuzz/5.3.1@jenkins-clt/stable: Configuring sources in C:\.conan\8ca986\1\src
[2023-01-17T19:20:38.614Z] harfbuzz/5.3.1@jenkins-clt/stable: 
[2023-01-17T19:20:41.932Z] harfbuzz/5.3.1@jenkins-clt/stable: Copying sources to build folder
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Building your package in C:\.conan\59d48f\1
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Generator txt created conanbuildinfo.txt
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Calling generate()
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Aggregating env generators
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Calling build()
[2023-01-17T19:20:46.137Z] harfbuzz/5.3.1@jenkins-clt/stable: Meson configure cmd: meson setup --cross-file "C:\.conan\59d48f\1\build-debug\conan\conan_meson_cross.ini" "C:\.conan\59d48f\1\build-debug" "C:\.conan\59d48f\1\src" -Dprefix="C:\.conan\78bd72\1"
[2023-01-17T19:20:46.398Z] **********************************************************************
[2023-01-17T19:20:46.398Z] ** Visual Studio 2022 Developer Command Prompt v17.4.4
[2023-01-17T19:20:46.398Z] ** Copyright (c) 2022 Microsoft Corporation
[2023-01-17T19:20:46.398Z] **********************************************************************
[2023-01-17T19:20:48.305Z] [vcvarsall.bat] Environment initialized for: 'x64_arm64'
[2023-01-17T19:20:49.707Z] The Meson build system
[2023-01-17T19:20:49.707Z] Version: 0.64.1
[2023-01-17T19:20:49.707Z] Source dir: C:\.conan\59d48f\1\src
[2023-01-17T19:20:49.707Z] Build dir: C:\.conan\59d48f\1\build-debug
[2023-01-17T19:20:49.707Z] Build type: cross build
[2023-01-17T19:20:49.707Z] Project name: harfbuzz
[2023-01-17T19:20:49.707Z] Project version: 5.3.1
[2023-01-17T19:20:49.707Z] 
[2023-01-17T19:20:49.707Z] ..\src\meson.build:1:0: ERROR: 'c' compiler binary not defined in cross or native file
[2023-01-17T19:20:49.707Z] 
[2023-01-17T19:20:49.707Z] A full log can be found at C:\.conan\59d48f\1\build-debug\meson-logs\meson-log.txt
[2023-01-17T19:20:49.707Z] harfbuzz/5.3.1@jenkins-clt/stable: 
[2023-01-17T19:20:49.707Z]                                                                                                     
[2023-01-17T19:20:49.707Z] harfbuzz/5.3.1@jenkins-clt/stable: ERROR: Package '6f4f98d8855763a2611a2515b4914faacfb5c3c1' build failed
[2023-01-17T19:20:49.707Z] harfbuzz/5.3.1@jenkins-clt/stable: WARN: Build folder C:\.conan\59d48f\1\build-debug
[2023-01-17T19:20:49.707Z] 
[2023-01-17T19:20:49.707Z] JSON file created at 'C:\Jenkins\workspace\rfbuzz_update-conan-center-index\conan-create-armv8-Debug.json'
[2023-01-17T19:20:49.708Z] ERROR: harfbuzz/5.3.1@jenkins-clt/stable: Error in build() method, line 152
[2023-01-17T19:20:49.708Z] 	meson.configure()
[2023-01-17T19:20:49.708Z] 	ConanException: Error 1 while executing meson setup --cross-file "C:\.conan\59d48f\1\build-debug\conan\conan_meson_cross.ini" "C:\.conan\59d48f\1\build-debug" "C:\.conan\59d48f\1\src" 
[2023-01-17T19:20:49.708Z] -Dprefix="C:\.conan\78bd72\1"
script returned exit code 1
@szigetics szigetics added the bug Something isn't working label Jan 17, 2023
@szigetics
Copy link
Author

In the end it turned out that this was a Conan bug.

The solution suggested in
conan-io/conan#13139
by @SpaceIm worked like a charm :
=>
Add this to your host profile and it should work I think:

[conf]
tools.build:compiler_executables={"c": "cl", "cpp": "cl"}
[buildenv]
CC=cl
CXX=cl

He also opened a PR for Conan, so this won't be necessary in future conan releases : conan-io/conan#13141 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant