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

Correct the build for the ninja generator #7158

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

ykhrustalev
Copy link
Contributor

Summary

The devtools build fails when run with ninja multi-config generator.

The problem comes from the generated command that contains rm -f for the bid dir that in case of using ninja generator will contain several directories

FAILED: devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h devtools/include/executorch/devtools/etdump/scalar_type_reader.h devtools/include/executorch/devtools/etdump/scalar_type_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_builder.h
cd /Volumes/workplace/sample-project/build/default/vendor/executorch/devtools && /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/flatcc -cwr -o /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/etdump_schema_flatcc.fbs /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/scalar_type.fbs && rm -f /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/* /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/*

rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/RelWithDebInfo: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Release: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Debug: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/RelWithDebInfo: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Release: is a directory

Note the lines

rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory

Test plan

The CI will show the compatibility with the existing cmake intergations.

The way to check it works for ninja

cmake -S . -B build -G "Ninja Multi-Config" -DEXECUTORCH_BUILD_DEVTOOLS=ON 
cmake --build build --config Release

The problem comes from the generated command that contains `rm -f` for the bid dir that in case of using ninja generator will contain several directories

```
FAILED: devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h devtools/include/executorch/devtools/etdump/scalar_type_reader.h devtools/include/executorch/devtools/etdump/scalar_type_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_builder.h
cd /Volumes/workplace/sample-project/build/default/vendor/executorch/devtools && /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/flatcc -cwr -o /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/etdump_schema_flatcc.fbs /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/scalar_type.fbs && rm -f /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/* /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/*

rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/RelWithDebInfo: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Release: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Debug: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/RelWithDebInfo: is a directory
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Release: is a directory
```

Note the lines
```
rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory
```
Copy link

pytorch-bot bot commented Dec 3, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7158

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit e31cb6a with merge base cf16b85 (image):

NEW FAILURE - The following job has failed:

  • pull / unittest-arm / linux-job (gh)
    RuntimeError: Command docker exec -t d103caacd4b4d0b8a34ff99c4a019af92145ca36648d348976163df973cbbaf6 /exec failed with exit code 1

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

Hi @ykhrustalev!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 3, 2024
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

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

Thank you for this fix, and the detailed PR description and test plan! This change makes sense.

@dbort dbort merged commit 2dc9043 into pytorch:main Dec 4, 2024
40 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants