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

Failed to retrieve the master AOSP source code #124

Closed
tthsn opened this issue Apr 11, 2016 · 15 comments
Closed

Failed to retrieve the master AOSP source code #124

tthsn opened this issue Apr 11, 2016 · 15 comments

Comments

@tthsn
Copy link

tthsn commented Apr 11, 2016

# ~/repo init -u https://android.googlesource.com/platform/manifest
# ~/repo sync
...
Fetching projects: 100% (512/512), done.
Syncing work tree:  59% (303/512)  error: unable to create file tests/P_str_escape/str\\escape.rs (No such file or directory)
Traceback (most recent call last):
  File "/root/android/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/root/android/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/root/android/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/root/android/.repo/repo/subcmds/sync.py", line 769, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/root/android/.repo/repo/project.py", line 1247, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/root/android/.repo/repo/project.py", line 2393, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
root@localhost:~/android#
@sunilmut
Copy link
Member

Can you collect a strace to see which syscall is(are) failing towards the end?

@benhillis
Copy link
Member

I tried this locally and I was able to initialize and sync the repro without errors. I suspect that the root cause of this issue was the same as #313.

Now to try to compile android from my shiny new Android repo :)

@callingmedic911
Copy link

callingmedic911 commented Jul 3, 2016

This is still not fixed. I am trying to sync CyanogenMod (cm-13.0).
This is the error I'm seeing

Syncing work tree:  54% (284/525)  error: unable to create file tests/P_str_escape/str\\escape.rs (Invalid argument)
Traceback (most recent call last):
  File "/mnt/d/android/cm-13.0/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/mnt/d/android/cm-13.0/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/mnt/d/android/cm-13.0/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/mnt/d/android/cm-13.0/.repo/repo/subcmds/sync.py", line 769, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/mnt/d/android/cm-13.0/.repo/repo/project.py", line 1247, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/mnt/d/android/cm-13.0/.repo/repo/project.py", line 2393, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

I'm on build 14372.
Let me know if you need any additional information.
I really hope to see this Bash on Windows be of practical use.

UPDATE: I did a strace on repo sync output log was too big, here's tail-ed version: http://paste.ubuntu.com/18417560/

I hope this is useful to find the cause of error.

@onomatopellan
Copy link

@callingmedic911 It's looks like a limitation of DrvFs (/mnt/* folders). Try in a VolFs folder like /home/user and you should have better luck.
More info here: https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/

@callingmedic911
Copy link

@onomatopellan Thanks! This worked. Although, do you know any possible to use source code from other partition, or perhaps shift installation directory of BashOnWindows, if possible?

Android source is huge and compiling with ccache on is going to take a lot of space in Windows partition.

@onomatopellan
Copy link

onomatopellan commented Jul 4, 2016

@callingmedic911 No, not that I know of. Shifting Linux filesystem was discussed here #449 but I never tried the vhdx method.

@jakubschenk
Copy link

@benhillis is there any way you can fix this for people using other directories then for example /home/user/ ? when i'm using /mnt/d/android/ i just have the same error like the people above, but my windows disk is too small to sync a whole android source. fix would be lovely, also have you suceeded compiling? thank you very much

@benhillis
Copy link
Member

I remember running into another issue when trying to compile, I think it might have been java related. We've fixed some java-related issues recently but have not had a chance to try this again.

@jakubschenk
Copy link

jakubschenk commented Aug 9, 2016

oh, i freed up some space on my C drive so i will try if ill get any error, i guess alot of things will freak out lol, and what about the issue that i cant have it synced on DrvFs i would love to see a fix haha, anyway thanks for echo and have a nice day

@skyhover
Copy link

A workaround: create the file "tests/P_str_escape/str/escape.rs" manually (with empty content).
Can run "repo --trace sync" to find where to create the file; it's likely in the "frameworks/compile/slang" folder.

@WallyCZ
Copy link

WallyCZ commented Nov 3, 2016

@skyhover Did you tested it? I did not work for me. But this worked:

rm -rf frameworks/compile/slang/
mkdir /home/<user>/slang_helper
sudo ln -s /home/<user>/slang_helper frameworks/compile/slang

@ChouMing
Copy link

ChouMing commented Dec 2, 2016

@skyhover it worked!but i am still curious why it can not be created automaticly.

@xiaobaiyey
Copy link

@WallyCZ Thank you it worked for me

@NyaSik
Copy link

NyaSik commented Aug 12, 2017

Fix https://github.com/NyaSik/FixDownloadAnrdoid

I do not know if the tambourine and the sacrifice of the goat helped the neighbor. Or this fix.

1239

@David-76
Copy link

David-76 commented Nov 3, 2018

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

No branches or pull requests