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

bgfx: add new version and consolidated recipe #24423

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

RazielXYZ
Copy link
Contributor

@RazielXYZ RazielXYZ commented Jun 23, 2024

Summary

Changes to recipe: bgfx

Motivation

This adds a consolidated recipe for bgfx going forward. This is versioned using bgfx' versioning scheme (https://github.com/bkaradzic/bgfx/blob/93961afcfd45bdcbdb91bddfb133a621d340f136/src/bgfx.cpp#L3566), and integrates bx and bimg into this package. This was done after discussions about whether having bx and bimg separate is valuable, and how due to their interdependence, need for dependency sources, and reliance on specific versions, having them separate makes updates on CCI much slower and more cumbersome.

Details

The recipe is still based on the previous bgfx recipe, but with quite a few changes and additions.
It adds all things required for bimg and bx to be integrated into this recipe, such as defines, libs, and their headers.
It also adds an option for rtti, due to the fact that bgfx' (and bx', and bimg's) build scripts are hardcoded to build with rtti disabled. Packages on CCI are rtti enabled by default, and mixing these can cause linker issues, especially on linux in my experience.
There is also improved support for mingw and android, changes to make other things more consistent, and so on.
The new recipe has been locally tested on windows 11 msvc194 and mingw, linux gcc, and android.

Some questions I was pondering:
Would there be value in adding an option for overriding bx' CRT detection in order for this to build with something like musl?
Would there be value in exposing options for opengl version etc. and other compile-time options that bgfx has?


@conan-center-bot

This comment has been minimized.

@RazielXYZ
Copy link
Contributor Author

RazielXYZ commented Jun 23, 2024

This needs osx >= 13, how do we limit it to that? Looks like it's trying to use 11.3 and the cci profiles do not provide os.version or os.sdk_version for osx, it seems

Copy link
Contributor

@xoorath xoorath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending a new recipe folder name + updating the bx package to a different version so it's in sync with bgfx.

recipes/bgfx/config.yml Show resolved Hide resolved
recipes/bgfx/consolidated/conandata.yml Outdated Show resolved Hide resolved
@AbrilRBS AbrilRBS self-assigned this Jun 23, 2024
recipes/bgfx/consolidated/conanfile.py Outdated Show resolved Hide resolved
recipes/bgfx/consolidated/conanfile.py Outdated Show resolved Hide resolved
Move old recipe to cci2023
Use matching bx commit
Add cppstd handling for conan 1 to toolchain generators
Add apple sdk checks
Change warning for compiler check
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@RazielXYZ
Copy link
Contributor Author

On conan 1, it still doesn't seem to use C++17 even with setting tc.cppstd = "-std=c++17" manually. I'm guessing tc.generate() overwrites it from self.settings?
On mac, I guess we might need to skip macos builds on cci for now if the agents' macos sdk is too old.

tc.generate()
else:
tc = AutotoolsToolchain(self)
if not self.settings.get_safe("compiler.cppstd"):
tc.cppstd = "-std=c++17"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbrilRBS What's the fate of this following the closure of #16533 ?

Try with-macos=11 for macos [11, 13)
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@RazielXYZ
Copy link
Contributor Author

@AbrilRBS when you have the time, it would be great if we could figure out how to proceed on this.

Copy link
Contributor

@xoorath xoorath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I double checked the commits and hashes.

@xoorath
Copy link
Contributor

xoorath commented Oct 2, 2024

Hey @AbrilRBS, sorry to bother you but is there any way you're aware of to escalate this topic for assessment? Or any workarounds?

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Warning

Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement.

Failure in build 9 (132a5a78bb2f6d0616cfa1cd64087ce1574431e7):

  • bgfx/1.127.8789:
    Error running command conan export recipes/bgfx/all/conanfile.py bgfx/1.127.8789@:
    [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK
    [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK
    [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK
    [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK
    [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 24.74609375 KB
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK
    [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK
    [HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK
    [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK
    [HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK
    [HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK
    [HOOK - conan-center.py] pre_export(): [NOT ALLOWED ATTRIBUTES (KB-H039)] OK
    [HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK
    [HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK
    [HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK
    [HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK
    [HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS RENAME (KB-H057)] OK
    [HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK
    [HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK
    [HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK
    [HOOK - conan-center.py] pre_export(): [NO BUILD SYSTEM FUNCTIONS (KB-H061)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS CROSS BUILDING (KB-H062)] OK
    [HOOK - conan-center.py] pre_export(): [INVALID TOPICS (KB-H064)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRED_CONAN_VERSION (KB-H065)] OK
    [HOOK - conan-center.py] pre_export(): [TEST_TYPE MANAGEMENT (KB-H068)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO DEFAULT OPTIONS (KB-H069)] OK
    [HOOK - conan-center.py] pre_export(): [MANDATORY SETTINGS (KB-H070)] OK
    [HOOK - conan-center.py] pre_export(): [PYLINT EXECUTION (KB-H072)] OK
    [HOOK - conan-center.py] pre_export(): [REQUIREMENT OVERRIDE PARAMETER (KB-H075)] OK
    [HOOK - conan-center.py] pre_export(): [NO DANGLING PATCHES (KB-H078)] OK
    WARN: **************************************************
    WARN: *** Conan 1 is legacy and on a deprecation path **
    WARN: *********** Please upgrade to Conan 2 ************
    WARN: **************************************************
    [HOOK - conan-center.py] pre_export(): ERROR: [CONFIG.YML HAS NEW VERSION (KB-H052)] The version "1.128.8832" exists in "conandata.yml" but not in "../config.yml", so it will not be built. Please update "../config.yml" to include newly added version "1.128.8832". (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H052-CONFIG.YML-HAS-NEW-VERSION) 
    ERROR: [HOOK - conan-center.py] pre_export(): Some checks failed running the hook, check the output
    

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.


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.

Failure in build 9 (132a5a78bb2f6d0616cfa1cd64087ce1574431e7):

  • bgfx/cci.20230216:
    Didn't run or was cancelled before finishing

  • bgfx/1.127.8789:
    CI failed to create some packages (All logs)

    Logs for packageID a5f0be4fefd13f50d7456f3e5f0fbea5c061825a:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    Setting up libxau-dev:amd64 (1:1.0.8-1) ...
    Setting up libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
    Setting up x11proto-input-dev (2.3.1-1) ...
    Setting up x11proto-kb-dev (1.0.7-0ubuntu1) ...
    Setting up xtrans-dev (1.3.5-1) ...
    Setting up libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libx11-dev:amd64 (2:1.6.3-1ubuntu2.2) ...
    Setting up libx11-xcb-dev:amd64 (2:1.6.3-1ubuntu2.2) ...
    Setting up libxcb-dri2-0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-dri3-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-glx0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-randr0:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-render0:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-render0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-randr0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-xfixes0:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-shape0:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-shape0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-xfixes0-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-sync-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up libxcb-present-dev:amd64 (1.11.1-1ubuntu1) ...
    Setting up x11proto-xext-dev (7.3.0-1) ...
    Setting up x11proto-fixes-dev (1:5.0-2ubuntu2) ...
    Setting up libxfixes-dev:amd64 (1:5.0.1-2) ...
    Setting up x11proto-damage-dev (1:1.2.1-2) ...
    Setting up libxdamage-dev:amd64 (1:1.1.4-2) ...
    Setting up libxext-dev:amd64 (2:1.3.3-1) ...
    Setting up libxshmfence-dev:amd64 (1.2-1) ...
    Setting up x11proto-xf86vidmode-dev (2.3.1-2) ...
    Setting up libxxf86vm-dev:amd64 (1:1.1.4-1) ...
    Setting up mesa-common-dev:amd64 (18.0.5-0ubuntu0~16.04.1) ...
    Setting up x11proto-dri2-dev (2.8-2) ...
    Setting up x11proto-gl-dev (1.4.17-1) ...
    Setting up libgl1-mesa-dev:amd64 (18.0.5-0ubuntu0~16.04.1) ...
    Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
    
    ======== Installing packages ========
    
    -------- Downloading 2 packages --------
    genie/1181: Retrieving package 3593751651824fb813502c69c971267624ced41a from remote 'conan-center' 
    genie/1181: Package installed 3593751651824fb813502c69c971267624ced41a
    genie/1181: Downloaded package revision b36b57f418eafca3f21aa42defc577d7
    opengl/system: Retrieving package da39a3ee5e6b4b0d3255bfef95601890afd80709 from remote 'conan-center' 
    opengl/system: Package installed da39a3ee5e6b4b0d3255bfef95601890afd80709
    opengl/system: Downloaded package revision 0ba8627bd47edc3a501e8f0eb9a79e5e
    genie/1181: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/104287/dfdcc/p/genie5f958b522af3e/p/bin
    bgfx/1.127.8789: Calling source() in /home/conan/workspace/prod-v2/bsr/104287/dfdcc/p/bgfx4bf7701b1c5ef/s/src
    ERROR: bgfx/1.127.8789: Error in source() method, line 156
    	get(self, **self.conan_data["sources"][self.version]["bgfx"], strip_root=True,
    	KeyError: 'sources'
    

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
Development

Successfully merging this pull request may close these issues.

4 participants