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

Fetching boost submodule as dep fails with object not found #76

Open
pziggo opened this issue Nov 2, 2023 · 8 comments
Open

Fetching boost submodule as dep fails with object not found #76

pziggo opened this issue Nov 2, 2023 · 8 comments

Comments

@pziggo
Copy link

pziggo commented Nov 2, 2023

I am trying to build a project locally that has a dependency on boost. While fetching the boost dependency, tipi runs into an exception claiming that the corresponding SHA1 of the submodule could not be found.

[...]
Initializing submodule context
⣻ Indexing - 100.00% (objects: 7645 of 7645 / deltas: 4872 of 4872)
⏳ done.          
● [err] Dynamic exception type: std::runtime_error
std::exception::what: Error updating and cloning submodule: context [-3] - object not found - no match for id (dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e)

● [err] Something went wrong, for help on your issue, we would enjoy getting your report at https://tipi.build/#contact

Cloning and initialising the boost repo outside of tipi works and the SHA1 exists.

Repro available here:
https://github.com/pziggo/vsomeip/tree/5a28c2dc59a15232a9e4b38be0a11fe447d44058

tipi version: v0.0.55

.tipi/deps:

{
    "u" : true,
    "boostorg/boost": { "@" : "boost-1.82.0", "u" : true }
}

tipi command: tipi -t linux-cxx17 .

@pziggo pziggo changed the title Cloning boost submodule as dep fails with object not found Fetching boost submodule as dep fails with object not found Nov 2, 2023
@daminetreg
Copy link
Contributor

daminetreg commented Nov 2, 2023

Thanks for the report, indeed boost-1.82.0 is being affected by this issue.

We have been working on a fix that will be released soon, but it also seem that boost-1.82.0 actually has tagged a commit of boostorg/context that doesn't belong really to the boostorg/context repository, as the referenced commit doesn't exists in any branches :
image

In the meantime changing to boost 1.80.0 or 1.83.0 should solve that issue as boost now points to a commit that exists in branches of boostorg/context.

@daminetreg
Copy link
Contributor

Thank you for the very great and detailed report. ❤️

@pziggo
Copy link
Author

pziggo commented Nov 3, 2023

IMHO the GitHub notation is a bit misleading. Actually, it's true that the commit does not belong to an existing branch, but since it still belongs to a tag, the commit is still available in the repo and thus a valid reference.

git branch -a --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
* (HEAD detached at dbe0b27)
git tag --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
boost-1.81.0
boost-1.81.0.beta1
boost-1.82.0
boost-1.82.0.beta1

@pziggo
Copy link
Author

pziggo commented Nov 3, 2023

Tried boost 1.80.0:

Initializing submodule spirit
Submodule url is : ../spirit.git
⏳ {        ●●●  }libc++abi: terminating with uncaught exception of type std::runtime_error: Could not read HEAD oid [-3] - reference 'refs/heads/main' not found

Aborted (core dumped)

@pziggo
Copy link
Author

pziggo commented Nov 3, 2023

Works with boost 1.83.0 (at least for now until branches get deleted again 😨 )

@daminetreg
Copy link
Contributor

daminetreg commented Nov 3, 2023

IMHO the GitHub notation is a bit misleading. Actually, it's true that the commit does not belong to an existing branch, but since it still belongs to a tag, the commit is still available in the repo and thus a valid reference.

git branch -a --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
* (HEAD detached at dbe0b27)
git tag --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
boost-1.81.0
boost-1.81.0.beta1
boost-1.82.0
boost-1.82.0.beta1

Thanks for this thorough analysis, yes indeed you are right it's incorrect from tipi's client, and the commit-id fetching of tagged only commit is the issue. I'll double check with the maintainer of this part to see if it's well understood and point him to this thread to be sure.

Works with boost 1.83.0 (at least for now until branches get deleted again 😨 )

Regarding the crash on boost-1.80.0, we have many occurences of it and are not failing on the checkout, I think you are hit by another bug we have an incoming bugfix for ( internal id nxxm/nxxm-src#1196 ).

It happens that the version released of tipi you are using doesn't cleans up failed submodule cloning state, so I suspect that you have been hit by this as well.

Essentially if you are hit again by this problem (which happens on any crash/abort/CTRL-C during submodules cloning), in the current version released you can work the bug around by deleting the folders :
- /usr/local/share/.tipi/2e56202/v*.d/boostorg/
- /usr/local/share/.tipi/v*.d/boostorg/
- /usr/local/share/.tipi/v*.w/97861a7-boost*

@daminetreg
Copy link
Contributor

IMHO the GitHub notation is a bit misleading. Actually, it's true that the commit does not belong to an existing branch, but since it still belongs to a tag, the commit is still available in the repo and thus a valid reference.

git branch -a --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
* (HEAD detached at dbe0b27)
git tag --contains dbe0b27303c2a834b87ef67ac07e6a8e22f7ad8e
boost-1.81.0
boost-1.81.0.beta1
boost-1.82.0
boost-1.82.0.beta1

EDIT: I'll double check with the maintainer of this part to see if it's well understood and point him to this thread to be sure that we actually ship the right bugfix.

@pziggo
Copy link
Author

pziggo commented Nov 3, 2023

Regarding the crash on boost-1.80.0, we have many occurences of it and are not failing on the checkout, I think you are hit by another bug we have an incoming bugfix for ( internal id nxxm/nxxm-src#1196 ).

It happens that the version released of tipi you are using doesn't cleans up failed submodule cloning state, so I suspect that you have been hit by this as well.

Indeed, deleting the folders you mentioned made boost-1.80.0 work as well. Thanks for the hint !

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

No branches or pull requests

2 participants