Skip to content

Conversation

@jonasehrlich
Copy link

@jonasehrlich jonasehrlich commented Oct 17, 2025

Previously, multi-config generators were detected by the value of the CMAKE_CFG_INTDIR variable. If a multi-config generator was detected, the CMAKE_CFG_INTDIR was included.

This has different values from the $ generator expression into which the ExternalUtil.hpp file is generated for each configuration.

This change uses CMAKE_CONFIGURATION_TYPES for multi-config generator detection and provides a more robust dependency handling for the generated files. Additionally it uses the $<CONFIG> generator expression to set the include directory for multi-config generators.

Closes #3314

@jenkins-droid
Copy link
Collaborator

Can one of the admins verify this patch?

@AlexandreEichenberger
Copy link
Collaborator

@jenkins-droid test this please

Previously, multi-config generators were detected by the value of the
`CMAKE_CFG_INTDIR` variable. If a multi-config generator was detected,
the CMAKE_CFG_INTDIR was included.

This has different values from the $<CONFIG> generator expression into
which the ExternalUtil.hpp file is generated for each configuration.

This change uses `CMAKE_CONFIGURATION_TYPES` for multi-config generator
detection and provides a more robust dependency handling for the
generated files. Additionally it uses the `$<CONFIG>` generator
expression to set the include directory for multi-config generators.

See onnx#3314

Signed-off-by: Jonas Ehrlich <[email protected]>
@jonasehrlich jonasehrlich force-pushed the je/ninja-multi-config branch from 2877b79 to a334033 Compare December 5, 2025 07:28
@jenkins-droid
Copy link
Collaborator

Can one of the admins verify this patch?

@AlexandreEichenberger
Copy link
Collaborator

@jonasehrlich seems like there is an issue with the new changes; do you mind to look into fixing the cause of the error. Let me know if you cannot see the log. I would start to look at the linux amd64, probably more familiar with that machine.

Otherwise, maybe close the PR. Thanks

@jonasehrlich
Copy link
Author

jonasehrlich commented Dec 5, 2025

@AlexandreEichenberger The initial job triggered by you failed with

[2025-12-04 14:40:49][298] INFO: remote image ghcr.io/onnxmlir/onnx-mlir-llvm-static:amd64 labels: {'llvm_project_dockerfile_sha1': '8b654a9d4cfe139d054b8dc8400857e972b8d3be77eda0dbfc70ddd12db5d3fa', 'llvm_project_sha1': '42a8ff877d47131ecb1280a1cc7e5e3c3bca6952', 'llvm_project_sha1_date': '2025-10-31T03:30:49Z', 'llvm_project_successfully_built': 'yes', 'onnx_mlir_pr_number': 'main', 'onnx_mlir_pr_number2': '3338', 'org.opencontainers.image.ref.name': 'ubuntu', 'org.opencontainers.image.version': '22.04'}
[2025-12-04 14:40:49][149] INFO: released read lock for pulling ghcr.io/onnxmlir/onnx-mlir-llvm-static:amd64
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/ONNX-MLIR-Pipeline-Docker-Build@pr_3315/.buildbot/jenkins-build-llvm-project.py", line 233, in <module>
    main()
  File "/var/lib/jenkins/workspace/ONNX-MLIR-Pipeline-Docker-Build@pr_3315/.buildbot/jenkins-build-llvm-project.py", line 228, in main
    setup_per_pr_llvm_project("static", exp)
  File "/var/lib/jenkins/workspace/ONNX-MLIR-Pipeline-Docker-Build@pr_3315/.buildbot/jenkins-build-llvm-project.py", line 219, in setup_per_pr_llvm_project
    raise Exception("PR source out of date, rebase then rebuild")
Exception: PR source out of date, rebase then rebuild

Afterwards I rebased the PR as the build log suggests and this latest job fails with:

[Pipeline] {
[Pipeline] sh
[Pipeline] sh
[Pipeline] sh
{
  "url": "https://api.github.com/repos/onnx/onnx-mlir/statuses/a334033a246c404a562db906c01eb4f9a66f2562",
  "state": "failure",
  "description": "Build #17708 [synchronize] Fix multi-config generat... failed after 1.2 sec",
  "context": "Jenkins Linux amd64",
  "message": null
}
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // node
[Pipeline] error
[Pipeline] End of Pipeline
ERROR: Exception: java.lang.Exception: admin authentication failed

Just from a first look at the pipeline, I would assume you would have to retrigger it. But I am currently rebuilding again to check the build itself

@AlexandreEichenberger
Copy link
Collaborator

Thanks @jonasehrlich. Ping me with a new "@" message when you are ready, and I will authorize the run again.

@jonasehrlich
Copy link
Author

@AlexandreEichenberger My local build is done and the macOS build stage in GitHub actions passed as well and the tests are running. Please trigger the Jenkins run again, thank you!

Would it make sense to include multi config generator builds in the CI pipeline? Just as a test if these are working?

@AlexandreEichenberger
Copy link
Collaborator

@jenkins-droid test this please

@jonasehrlich
Copy link
Author

@AlexandreEichenberger I updated the MR again with a merge commit (through the GitHub UI), so the pipelines are stuck waiting for approval again. Tomorrow morning EU time, I can also do the rebase if that works better.

Is there any guideline on what still needs to be done to get this merged?

Thanks for the feedback!

@AlexandreEichenberger
Copy link
Collaborator

I think the PR should be in good shape. We always appreciate fixes for users that do things a bit differently and catches some of the idiosyncrasies of our local build. Thanks. I am adding @tungld also here as I will go away for a break soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails with Ninja multi-config generator

3 participants