OP-TEE / optee_docs

This git contains the official documentation for the OP-TEE project
BSD 2-Clause "Simplified" License
58 stars 96 forks source link

linkfile invalid, aarch64-linux-gnu-gdb: bad component #61

Closed dydxh closed 4 years ago

dydxh commented 4 years ago

I follow the build instruction but got an error error.ManifestInvalidPathError: <linkfile> invalid "src": ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb: bad component: ..

The environment is Ubuntu 18.04 and the Prerequisites are already installed.

$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.4.0
gpg: key 16530D5E920F5C65: "Repo Maintainer <repo@android.kernel.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Counting objects: 43, done
remote: Finding sources: 100% (660/660)
remote: Total 660 (delta 182), reused 660 (delta 182)
Receiving objects: 100% (660/660), 1.38 MiB | 687.00 KiB/s, done.
Resolving deltas: 100% (182/182), completed with 23 local objects.
From https://gerrit.googlesource.com/git-repo
   eceeb1b..d92076d  maint      -> origin/maint
   1e01a74..8c268c0  master     -> origin/master
 * [new branch]      repo-1     -> origin/repo-1
   34bc571..0b57eed  stable     -> origin/stable
 * [new tag]         v1.13.10   -> v1.13.10
 * [new tag]         v1.13.11   -> v1.13.11
 * [new tag]         v1.13.9    -> v1.13.9
 * [new tag]         v1.13.9.1  -> v1.13.9.1
 * [new tag]         v1.13.9.2  -> v1.13.9.2
 * [new tag]         v1.13.9.3  -> v1.13.9.3
 * [new tag]         v1.13.9.4  -> v1.13.9.4
 * [new tag]         v2.0       -> v2.0
 * [new tag]         v2.1       -> v2.1
 * [new tag]         v2.1.1     -> v2.1.1
 * [new tag]         v2.2       -> v2.2
 * [new tag]         v2.3       -> v2.3
Get https://github.com/OP-TEE/manifest.git
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Enumerating objects: 59, done.        
remote: Counting objects: 100% (59/59), done.        
remote: Compressing objects: 100% (43/43), done.        
remote: Total 980 (delta 45), reused 24 (delta 16), pack-reused 921        
Receiving objects: 100% (980/980), 212.61 KiB | 275.00 KiB/s, done.
Resolving deltas: 100% (716/716), done.
From https://github.com/OP-TEE/manifest
 * [new branch]      2.5.0      -> origin/2.5.0
 * [new branch]      2.5.0-rc1  -> origin/2.5.0-rc1
 * [new branch]      2.5.0-rc2  -> origin/2.5.0-rc2
 * [new branch]      2.6.0      -> origin/2.6.0
 * [new branch]      3.1.0      -> origin/3.1.0
 * [new branch]      3.2.0      -> origin/3.2.0
 * [new branch]      3.3.0      -> origin/3.3.0
 * [new branch]      3.4.0      -> origin/3.4.0
 * [new branch]      3.5.0      -> origin/3.5.0
 * [new branch]      3.6.0      -> origin/3.6.0
 * [new branch]      3.7.0      -> origin/3.7.0
 * [new branch]      3.8.0      -> origin/3.8.0
 * [new branch]      master     -> origin/master
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.0-rc1  -> 1.0.0-rc1
 * [new tag]         1.0.0-rc2  -> 1.0.0-rc2
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.1.0      -> 1.1.0
 * [new tag]         2.0.0      -> 2.0.0
 * [new tag]         2.1.0      -> 2.1.0
 * [new tag]         2.2.0      -> 2.2.0
 * [new tag]         2.3.0      -> 2.3.0
 * [new tag]         2.4.0      -> 2.4.0
 * [new tag]         2.5.0      -> 2.5.0
 * [new tag]         2.6.0      -> 2.6.0
 * [new tag]         3.0.0      -> 3.0.0
 * [new tag]         3.1.0      -> 3.1.0
 * [new tag]         3.2.0      -> 3.2.0
 * [new tag]         3.3.0      -> 3.3.0
 * [new tag]         3.4.0      -> 3.4.0
 * [new tag]         3.5.0      -> 3.5.0
 * [new tag]         3.6.0      -> 3.6.0
 * [new tag]         3.7.0      -> 3.7.0
 * [new tag]         3.7.0-rc1  -> 3.7.0-rc1
 * [new tag]         3.8.0      -> 3.8.0
Traceback (most recent call last):
  File "/home/dydxh/mytee/.repo/repo/main.py", line 568, in <module>
    _Main(sys.argv[1:])
  File "/home/dydxh/mytee/.repo/repo/main.py", line 542, in _Main
    result = run()
  File "/home/dydxh/mytee/.repo/repo/main.py", line 535, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dydxh/mytee/.repo/repo/main.py", line 213, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dydxh/mytee/.repo/repo/subcmds/init.py", line 463, in Execute
    self._LinkManifest(opt.manifest_name)
  File "/home/dydxh/mytee/.repo/repo/subcmds/init.py", line 315, in _LinkManifest
    self.manifest.Link(name)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 184, in Link
    self.Override(name)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 177, in Override
    self._Load()
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 483, in _Load
    self._ParseManifest(nodes)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 591, in _ParseManifest
    project = self._ParseProject(node)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 912, in _ParseProject
    self._ParseLinkFile(project, n)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 1047, in _ParseLinkFile
    self._ValidateFilePaths('linkfile', src, dest)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 1028, in _ValidateFilePaths
    '<%s> invalid "src": %s: %s' % (element, src, msg))
error.ManifestInvalidPathError: <linkfile> invalid "src": ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb: bad component: ..

Seems an linking error but I don't understand the meaning of bad component.

After adding some debug info, I found it tries to link two file

src: ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb
dest: build/gdb
===========================
abs src: /home/dydxh/toolchains/aarch64/bin/aarch64-linux-gnu-gdb
abs dest: /home/dydxh/mytee/build/gdb

So I prepare the aarch64-linux-gnu-gdb in the directory above and re-run. Unfortunatly, the same error occur :(

jforissier commented 4 years ago

Hi @dydxh,

Fixed on master, see https://github.com/OP-TEE/manifest/commit/017ade90e840a9da45c775e7146f322889986ca7.

Not sure how to clone an older version of OP-TEE, though. Use an older repo perhaps? Or maybe there is an option to revert to the old behavior?

jbech-linaro commented 4 years ago

I'm not 100% sure here, but I imagine this is due to repo recently being updated from 1.x to 2.x. The former is Python2 and the latter is Python3. So, maybe to check out the old version you need to downgrade your repo to a 1.x.

21212124 commented 4 years ago

I have a clean environment and when I run repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.4.0 I get the same error. how can I solve that?

jbech-linaro commented 4 years ago

I have a clean environment and when I run repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.4.0 I get the same error. how can I solve that?

My best explanation and to avoid repeating, you can have a look here: https://github.com/OP-TEE/manifest/issues/157

sander-visser commented 4 years ago

I can confirm it is no issue on 3.8.0 branch (while it is an issue with Ubuntu 18.04 LTSs repo tool on 3.7.0 branch).

@jbech-linaro This issue should be possible to close with resolution to use older repo tool or latest optee branch.

jbech-linaro commented 4 years ago

Thanks for confirming @sander-visser , closing the issue.