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

can not run install_flatc.sh sucecessfully #1004

Closed
luxunxiansheng opened this issue Oct 18, 2023 · 29 comments
Closed

can not run install_flatc.sh sucecessfully #1004

luxunxiansheng opened this issue Oct 18, 2023 · 29 comments
Assignees
Labels
bug Something isn't working need-user-input The issue needs more information from the reporter before moving forward triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@luxunxiansheng
Copy link

luxunxiansheng commented Oct 18, 2023

When following the instructions given by the tutorial, Cmake error occured:

executorch/third-party/flatbuffers" does not appear to contain CMakeLists.txt.

I missed something?

@iseeyuan iseeyuan assigned iseeyuan and dbort and unassigned iseeyuan Oct 18, 2023
@kimishpatel
Copy link
Contributor

Did you do git submodule sync/update? If you inspect third-party/flatbuffers folders and it is empty then likely submodule has not been fetched.

@JacobSzwejbka JacobSzwejbka added the bug Something isn't working label Oct 18, 2023
@dbort dbort added the need-user-input The issue needs more information from the reporter before moving forward label Oct 18, 2023
@dbort dbort changed the title can not run install_flact.sh sucecessfully can not run install_flatc.sh sucecessfully Oct 18, 2023
@luxunxiansheng
Copy link
Author

Did you do git submodule sync/update? If you inspect third-party/flatbuffers folders and it is empty then likely submodule has not been fetched.

I did run that commads but as you said the folder is empty. Is there any workarond before the bug fixed?

@kimishpatel
Copy link
Contributor

When I have run into this in past, I have done manual fetch or update of the submodule

try git submodule init and then sync. more details https://git-scm.com/book/en/v2/Git-Tools-Submodules

Also add your repro steps here

@cccclai
Copy link
Contributor

cccclai commented Oct 19, 2023

Usually these following commands can get me the submodules

git submodule update --init
git submodule update
git submodule sync

Are all the folders in executorch/third-party empty?

@luxunxiansheng
Copy link
Author

git submodule sync

I follow the steps given in tutorai. sync/ update --init .
Now a fatal occured :

fatal: unable to access 'https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
fatal: clone of 'https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git' into submodule path 'backends/arm/third-party/ethos-u-core-driver' failed

Is it for this ?

@luxunxiansheng
Copy link
Author

Usually these following commands can get me the submodules

git submodule update --init
git submodule update
git submodule sync

Are all the folders in executorch/third-party empty?
all the folders in 'executorch/third-party' are empty.

@cccclai
Copy link
Contributor

cccclai commented Oct 20, 2023

Hmm that's for the arm backend. Seperately, are there contents inside executorch/third-party/flatbuffers now?

@luxunxiansheng
Copy link
Author

Hmm that's for the arm backend. Seperately, are there contents inside executorch/third-party/flatbuffers now?

No contents as before.

@kimishpatel
Copy link
Contributor

try git submodule init and then sync. more details https://git-scm.com/book/en/v2/Git-Tools-Submodules

@luxunxiansheng did you try following these steps?

@luxunxiansheng
Copy link
Author

Yes, I tried different combinations of commands. No helps.

@kimishpatel
Copy link
Contributor

Something seems off in your setup. Have you tried starting from scratch again?

I tried following tutorial in a fresh dir and it seems to clone flatbuffers correctly for me.

Can you paste log of what happened (just terminal capture) when you follow the steps of clone + submodule update?

@luxunxiansheng
Copy link
Author

image

@luxunxiansheng
Copy link
Author

Something seems off in your setup. Have you tried starting from scratch again?

I tried following tutorial in a fresh dir and it seems to clone flatbuffers correctly for me.

Can you paste log of what happened (just terminal capture) when you follow the steps of clone + submodule update?

Is the screen shot helpful ?

@kimishpatel
Copy link
Contributor

Something seems off in your setup. Have you tried starting from scratch again?
I tried following tutorial in a fresh dir and it seems to clone flatbuffers correctly for me.
Can you paste log of what happened (just terminal capture) when you follow the steps of clone + submodule update?

Is the screen shot helpful ?

Did you try

git submodule sync
git submodule update --init

What is the output you saw for that?

@dbort dbort added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 23, 2023
@luxunxiansheng
Copy link
Author

Something seems off in your setup. Have you tried starting from scratch again?
I tried following tutorial in a fresh dir and it seems to clone flatbuffers correctly for me.
Can you paste log of what happened (just terminal capture) when you follow the steps of clone + submodule update?

Is the screen shot helpful ?

Did you try

git submodule sync
git submodule update --init

What is the output you saw for that?

image

@robell
Copy link
Collaborator

robell commented Oct 24, 2023

It looks like the submodule call fails as it tries to clone ethos-u first and other modules don't clone after that.

I can see no issues with the certificate and can fetch and browse to that repository. @luxunxiansheng can you browse (web browser) to https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/ ? perhaps there is a certificate issue with the LetsEncrypt root cert on your machine?

What version of git are you using? (git --version)

@kimishpatel
Copy link
Contributor

Thanks @robell . Sounds like thats the issue. @digantdesai @robell ideally we bring in these dep as part of "install requirements" of specific delegates.

@dbort dbort assigned digantdesai and robell and unassigned dbort Oct 24, 2023
@luxunxiansheng
Copy link
Author

It looks like the submodule call fails as it tries to clone ethos-u first and other modules don't clone after that.

I can see no issues with the certificate and can fetch and browse to that repository. @luxunxiansheng can you browse (web browser) to https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/ ? perhaps there is a certificate issue with the LetsEncrypt root cert on your machine?

What version of git are you using? (git --version)
My server doesn't have desktop that I can't visit the link via browser. But I can visit it from other machine.
My git version is 2.39.2

@robell
Copy link
Collaborator

robell commented Oct 25, 2023

@kimishpatel that would be a longer term fix, in the short term it appears to be a certificate issue on the end system @luxunxiansheng has. An easy workaround would be to remove the sub-module locally if as it seems no one else has this issue.

@luxunxiansheng:

  1. can you access (with a web browser) https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/ ?
  2. The certificates look correct and other people are able to clone this repo, what happens if you: git clone --progress --verbose https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/
  3. what about output forwget -vd https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/

@luxunxiansheng
Copy link
Author

  1. image
  2. I can get the index.html

@luxunxiansheng
Copy link
Author

@kimishpatel that would be a longer term fix, in the short term it appears to be a certificate issue on the end system @luxunxiansheng has. An easy workaround would be to remove the sub-module locally if as it seems no one else has this issue.

@luxunxiansheng:

  1. can you access (with a web browser) https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/ ?
  2. The certificates look correct and other people are able to clone this repo, what happens if you: git clone --progress --verbose https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/
  3. what about output forwget -vd https://git.mlplatform.org/ml/ethos-u/ethos-u-core-driver.git/

My server doesn't have desktop that I can't visit the link via browser. But I can visit it from other machine. BTW.

@robell
Copy link
Collaborator

robell commented Oct 25, 2023

can you try the wget command? this might help show whether the certificates file has a problem on the server.

@luxunxiansheng
Copy link
Author

can you try the wget command? this might help show whether the certificates file has a problem on the server.

image

@robell
Copy link
Collaborator

robell commented Oct 25, 2023

Ok, so we can see the ssl cert is valid and this machine can read via https in wget; it seems a problem then with git's use of ssl certificates in /etc/ssl/certs/.

A workaround would be to try git config --global http.sslVerify "false" (but be aware this disables all verification of certificates!)

An alternative workaround would be to remove the ethos-u submodule as this isn't relevant for you: https://www.educative.io/answers/how-to-delete-a-git-submodule (though you of course cannot push this change back). if you just want to get it working, i'd suggest trying this second option.

@luxunxiansheng
Copy link
Author

Ok, so we can see the ssl cert is valid and this machine can read via https in wget; it seems a problem then with git's use of ssl certificates in /etc/ssl/certs/.

A workaround would be to try git config --global http.sslVerify "false" (but be aware this disables all verification of certificates!)

An alternative workaround would be to remove the ethos-u submodule as this isn't relevant for you: https://www.educative.io/answers/how-to-delete-a-git-submodule (though you of course cannot push this change back). if you just want to get it working, i'd suggest trying this second option.

Sorry to bother you agagin and again . But it did not work when I tried the second option. I think I have remove the submodule.
image
When I run that install scripit, still the same errors that flatbuffers is empyt.

@robell
Copy link
Collaborator

robell commented Oct 25, 2023

This is a clean checkout flow:
git clone --branch v0.1.0 https://github.com/pytorch/executorch.git
cd executorch
git submodule deinit backends/arm/third-party/ethos-u-core-driver/
git submodule deinit backends/arm/third-party/serialization_lib/
git rm backends/arm/third-party/ethos-u-core-driver/
git rm backends/arm/third-party/serialization_lib/
rm -rf .git/modules/backends/arm/third-party/ethos-u-core-driver/
rm -rf .git/modules/backends/arm/third-party/serialization_lib/
git submodule update --init
git submodule update
git submodule sync

If this sequence does not populate third-party/flatbuffers/ then there is some other issue.

I suspect with a clean checkout even git config --global http.sslVerify "false" would work.

@luxunxiansheng
Copy link
Author

Thanks guys for your patience. Now it works even got some errors during installing.
image
Anyway, Thank you so much!

@robell
Copy link
Collaborator

robell commented Oct 26, 2023

great, you can also remove these from install to fix that error:

diff --git a/setup.py b/setup.py
index ddcdc158..4d3334ad 100644
--- a/setup.py
+++ b/setup.py
@@ -60,8 +60,6 @@ setup(
"executorch/sdk": "sdk",
"executorch/extension": "extension",
"executorch/bundled_program": "bundled_program",
- "tosa": "backends/arm/third-party/serialization_lib/python/tosa",
- "serializer": "backends/arm/third-party/serialization_lib/python/serializer",
},
cmdclass={
"install": CustomInstallCommand,

@kimishpatel
Copy link
Contributor

@robell is there a way to move backend/arm/ isntallation requirements to a separate install_requirements.sh, similar to https://github.com/pytorch/executorch/blob/main/backends/apple/coreml/scripts/install_requirements.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need-user-input The issue needs more information from the reporter before moving forward triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

8 participants