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

xkbcommon: fix single-profile build #20594

Closed
wants to merge 4 commits into from

Conversation

ericLemanissier
Copy link
Contributor

Specify library name and version: xkbcommon/*

fixes #20542


@github-actions
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/xkbcommon//'.

👋 @jwillikers you might be interested. 😉

@ericLemanissier
Copy link
Contributor Author

The build is now finished. You can take a look at the results here

@jwillikers
Copy link
Contributor

Hmmm, I can't seem to cross-compile the recipe with this change.

Build-time dependency wayland-protocols_build found: NO (tried pkgconfig and cmake)
Build-time dependency wayland-scanner_build found: NO (tried pkgconfig and cmake)

../src/meson.build:534:12: ERROR: Problem encountered: The Wayland xkbcli programs require wayland-client >= 1.2.0, wayland-protocols >= 1.7 which were not found.
You can disable the Wayland xkbcli programs with -Denable-wayland=false.

@ghost
Copy link

ghost commented Oct 16, 2023

I detected other pull requests that are modifying xkbcommon/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@ericLemanissier
Copy link
Contributor Author

ericLemanissier commented Oct 16, 2023

what does /home/....../.conan2/p/b/xkbco......../build-release/meson-logs/meson-log.txt say ?

@jwillikers
Copy link
Contributor

 799   │ Run-time dependency wayland-client found: YES 1.22.0
 800   │ Pkg-config binary for 0 is not cached.
 801   │ Pkg-config binary missing from cross or native file, or env var undefined.
 802   │ Trying a default Pkg-config fallback at pkg-config
 803   │ Found pkg-config: /usr/bin/pkg-config (2.0.3)
 804   │ Determining dependency 'wayland-protocols_BUILD' with pkg-config executable '/usr/bin/pkg-config'
 805   │ env[PKG_CONFIG_PATH]: 
 806   │ env[PKG_CONFIG_SYSROOT_MAP]: /usr/local/company-yocto-sdk/sysroots/cortexa53-crypto-company-linux
 807   │ env[PKG_CONFIG]: /home/jordan/.conan/data/pkgconf/2.0.3/_/_/package/77f233048f15709a5b7952a12eead7dd5a94d613/bin/pkgconf
 808   │ -----------
 809   │ Called: `/usr/bin/pkg-config --modversion wayland-protocols_BUILD` -> 1
 810   │ stderr:
 811   │ Package wayland-protocols_BUILD was not found in the pkg-config search path.
 812   │ Perhaps you should add the directory containing `wayland-protocols_BUILD.pc'
 813   │ to the PKG_CONFIG_PATH environment variable
 814   │ Package 'wayland-protocols_BUILD', required by 'virtual:world', not found
 815   │ -----------
...
       │ Build-time dependency wayland-protocols_build found: NO (tried pkgconfig and cmake)
 849   │ Pkg-config binary for 0 is cached.
 850   │ Determining dependency 'wayland-scanner_BUILD' with pkg-config executable '/usr/bin/pkg-config'
 851   │ env[PKG_CONFIG_PATH]: 
 852   │ env[PKG_CONFIG_SYSROOT_MAP]: /usr/local/company-yocto-sdk/sysroots/cortexa53-crypto-company-linux
 853   │ env[PKG_CONFIG]: /home/jordan/.conan/data/pkgconf/2.0.3/_/_/package/77f233048f15709a5b7952a12eead7dd5a94d613/bin/pkgconf
 854   │ -----------
 855   │ Called: `/usr/bin/pkg-config --modversion wayland-scanner_BUILD` -> 1
 856   │ stderr:
 857   │ Package wayland-scanner_BUILD was not found in the pkg-config search path.
 858   │ Perhaps you should add the directory containing `wayland-scanner_BUILD.pc'
 859   │ to the PKG_CONFIG_PATH environment variable
 860   │ Package 'wayland-scanner_BUILD', required by 'virtual:world', not found
 861   │ -----------

You still need to set build.pkg_config_path for Meson to find the pkg-config files in the build context. When cross-compiling, Meson will only look in build.pkg_config_path for pkg-config dependencies where native=true.

@jwillikers
Copy link
Contributor

That works! 👍

@ericLemanissier ericLemanissier marked this pull request as ready for review October 16, 2023 12:56
@AbrilRBS AbrilRBS self-assigned this Oct 16, 2023
these versions are not used on conan-center
@conan-center-bot

This comment has been minimized.

@ericLemanissier
Copy link
Contributor Author

@SpaceIm could you please try this recipe to test if it fixes the problem you face when building xkbcommon in a single profile context?

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 28, 2023

@SpaceIm could you please try this recipe to test if it fixes the problem you face when building xkbcommon in a single profile context?

I'll do when I have time. But I don't understand what you mean by single profile context. I don't use single profile. My issue comes from a build triggered from build context (with 2 profiles). It's a conan client issue, not a recipe issue.

@ericLemanissier
Copy link
Contributor Author

I mean "in the build context"

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 28, 2023

I'll try, but I don't understand how it could fix anything. _has_build_profile() is always True (or should, otherwise it's a bug) in conan v2, irrespective of context.

@ericLemanissier
Copy link
Contributor Author

The build is now finished. You can take a look at the results here

@ericLemanissier
Copy link
Contributor Author

I could reproduce the error with the following conanfile.txt:

[tool_requires]
xkbcommon/1.6.0

and running command conan install . -b xkbcommon/*

meson-log.txt shows the failure to detect wayland-client:

Determining dependency 'wayland-client' with pkg-config executable '/home/eric/.conan2/p/pkgco96229fb471f65/p/bin/pkgconf'
env[PKG_CONFIG]: /home/eric/.conan2/p/pkgco96229fb471f65/p/bin/pkgconf
env[PKG_CONFIG_PATH]: /home/eric/.conan2/p/b/xkbco79b95ed7858f7/b/build-release/conan
-----------
Called: `/home/eric/.conan2/p/pkgco96229fb471f65/p/bin/pkgconf --modversion wayland-client` -> 1
stderr:
Package wayland-client was not found in the pkg-config search path.
Perhaps you should add the directory containing `wayland-client.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wayland-client', required by 'virtual:world', not found
-----------
CMake binary for 1 is cached.
Preliminary CMake check failed. Aborting.
Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)

I could fix the detection issue by patching the wayland-client.pc file name in meson.build, but then link fails with:

FAILED: xkbcli-interactive-wayland
gcc  -o xkbcli-interactive-wayland xkbcli-interactive-wayland.p/meson-generated_xdg-shell-protocol.c.o xkbcli-interactive-wayland.p/tools_interactive-wayland.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group libtools-internal.a libxkbcommon.a /home/eric/.conan2/p/waylaf46d2984bd51a/p/lib/libwayland-client.a -lpthread -lm -lrt -Wl,--end-group
/usr/bin/ld: /home/eric/.conan2/p/waylaf46d2984bd51a/p/lib/libwayland-client.a(connection.c.o): in function `wl_closure_invoke':
connection.c:(.text+0x249a): undefined reference to `ffi_type_pointer'
/usr/bin/ld: connection.c:(.text+0x25b2): undefined reference to `ffi_type_pointer'
/usr/bin/ld: connection.c:(.text+0x25e8): undefined reference to `ffi_type_void'
/usr/bin/ld: connection.c:(.text+0x2602): undefined reference to `ffi_prep_cif'
/usr/bin/ld: connection.c:(.text+0x2630): undefined reference to `ffi_call'
/usr/bin/ld: connection.c:(.text+0x26c3): undefined reference to `ffi_type_sint32'
/usr/bin/ld: connection.c:(.text+0x26db): undefined reference to `ffi_type_uint32'
collect2: error: ld returned 1 exit status

cf https://github.com/ericLemanissier/proof-of-conan/actions/runs/6682411361/job/18157750381#step:7:2284
this error happens both in build context and in host context.
I don't have more time available for this issue, so I'm closing this.

@ericLemanissier ericLemanissier deleted the xkbcommon branch October 29, 2023 09:30
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 5 (0f6b83424b527818c214ba14f1c5f078161ad958):

  • xkbcommon/1.5.0:
    All packages built successfully! (All logs)

  • xkbcommon/1.6.0:
    All packages built successfully! (All logs)

  • xkbcommon/1.4.1:
    All packages built successfully! (All logs)

  • xkbcommon/1.3.1:
    All packages built successfully! (All logs)


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 5 (0f6b83424b527818c214ba14f1c5f078161ad958):

  • xkbcommon/1.3.1:
    CI failed to create some packages (All logs)

    Logs for packageID c76bf9a25637760221c667ef76912f0f8cb8ee8b:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
      199 |     int rc;
          |         ^~
    ../src/test/registry.c: In function 'find_models':
    ../src/test/registry.c:284:9: warning: unused variable 'idx' [-Wunused-variable]
      284 |     int idx = 0;
          |         ^~~
    ../src/test/registry.c: In function 'find_layouts':
    ../src/test/registry.c:331:9: warning: unused variable 'idx' [-Wunused-variable]
      331 |     int idx = 0;
          |         ^~~
    ../src/test/registry.c: In function 'find_options':
    ../src/test/registry.c:404:9: warning: unused variable 'idx' [-Wunused-variable]
      404 |     int idx = 0;
          |         ^~~
    At top level:
    ../src/test/registry.c:485:1: warning: 'cmp_option_groups' defined but not used [-Wunused-function]
      485 | cmp_option_groups(struct test_option_group *tg, struct rxkb_option_group *g,
          | ^~~~~~~~~~~~~~~~~
    ../src/test/registry.c:444:1: warning: 'cmp_layouts' defined but not used [-Wunused-function]
      444 | cmp_layouts(struct test_layout *tl, struct rxkb_layout *l)
          | ^~~~~~~~~~~
    ../src/test/registry.c:426:1: warning: 'cmp_models' defined but not used [-Wunused-function]
      426 | cmp_models(struct test_model *tm, struct rxkb_model *m)
          | ^~~~~~~~~~
    ../src/test/registry.c:400:1: warning: 'find_options' defined but not used [-Wunused-function]
      400 | find_options(struct rxkb_context *ctx, ...)
          | ^~~~~~~~~~~~
    ../src/test/registry.c:327:1: warning: 'find_layouts' defined but not used [-Wunused-function]
      327 | find_layouts(struct rxkb_context *ctx, ...)
          | ^~~~~~~~~~~~
    ../src/test/registry.c:280:1: warning: 'find_models' defined but not used [-Wunused-function]
      280 | find_models(struct rxkb_context *ctx, ...)
          | ^~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    INFO: autodetecting backend as ninja
    INFO: calculating backend command to run: /home/conan/w/prod-v2/bsr/29890/ffded/p/ninja6fed3c8400c5b/p/bin/ninja -j 3
    
    xkbcommon/1.3.1: ERROR: 
    Package 'c76bf9a25637760221c667ef76912f0f8cb8ee8b' build failed
    xkbcommon/1.3.1: WARN: Build folder /home/conan/w/prod-v2/bsr/29890/ffded/p/b/xkbcoe443b829ff563/b/build-release
    *********************************************************
    Recipe 'xkbcommon/1.3.1' cannot build its binary
    It is possible that this recipe is not Conan 2.0 ready
    If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
    If it is your recipe, check if it is updated to 2.0
    *********************************************************
    
    ERROR: xkbcommon/1.3.1: Error in build() method, line 119
    	meson.build()
    	ConanException: Error 1 while executing
    
  • xkbcommon/1.5.0:
    Didn't run or was cancelled before finishing

  • xkbcommon/1.6.0:
    Didn't run or was cancelled before finishing

  • xkbcommon/1.4.1:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

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