Though in the build directory, the tests directory is created by running this command cmake -DQT_VERSION=6 -DBUILD_MOLEQUEUE=OFF -DENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Release -S ./openchemistry -B ./build but it is mainly empty.
You should probably add --recursive i.e. run git submodule update --remote --recursive, and I’ll change the docs to say that.
That shouldn’t make a difference to your current issue though really, as using --remote should be sufficient to update all submodules to point at the remote HEAD, as covered in the git documentation.
One thing to note is that when you run git submodule update --remote it will look to each submodule’s origin remote by default. This means that if you have forked any of the individual submodule repos yourself (avogadroapp, for instance) and have set it up as I have – so that the origin remote for avogadroapp is defined as matterhorn103/avogadroapp and OpenChemistry/avogadroapp is called upstream – then it will update to the current state of your own fork rather than to upstream. But if you haven’t changed anything about the remotes and don’t have any forks then by default origin will be OpenChemistry/avogadroapp, so git submodule update --remote should work fine. If in doubt, git config branch.master.remote will tell you the name of the remote that the submodule is tracking and git remote -vv lists all the configured remotes.
Like I say, it shouldn’t be necessary, but you certainly can simply run git pull from within individual submodules. You can also run git pull --recurse-submodules or git submodule foreach git pull to do it for all of the submodules at once. There is a subtle difference in what these recursive commands actually do in comparison to git submodule update --remote in that they do just essentially work like git pull does.
Don’t forget that the first time you run git submodule update you need to add the --init flag. You probably did that when you first cloned the repo, since it’s also on the page you linked, but just figured I’d mention it.
Don’t forget to make sure the openchemistry superrepo is up-to-date with OpenChemistry/openchemistry – you’ll need to run git pull or whatever for it too.
If none of that helps then it would be good if you could go into avogadroapp and avogadrolibs and use git log to work out which commit each submodule is pointing at, then you can see (by looking at GitHub) or we can tell whether you are definitely using the up-to-date code. Because if you are then naturally it’s a legitimate bug that needs fixing.
Finally, it looks like you’re running the build from within VS Code on Linux? Have you tried building from the command line using your normal terminal?
@ghutchis The big issue with telling people to run git submodule update --remote is that it will also update the third-party git submodules like VTK to point at the latest upstream code.
Our builds don’t do that, they checkout each OpenChemistry submodule individually and leave the third-party ones to point at the commits specified in OpenChemistry/openchemistry. So that becomes a point of difference.
IIRC I think you were suggesting some changes to openchemistry so there was a stable branch and then in main the remotes (e.g., avogadroapp and avogadrolibs etc.) would always point to the latest revisions?
Though rereading the stackoverflow thread that made me think it was possible, I’m no longer sure it is, now that I understand better how it all works. It seems like you’d still need to run git submodule update --remote, and possibly we are already doing what the answers suggest doing.
In any case I have a branch where I have set up the avogadroapp and avogadrolibs submodules to track the branches, which changes .gitmodules from
So we can see if it works any differently to the current setup by just waiting until a new commit is made to avogadrolibs; currently the link points to 05d2dd0. I’ll report back.
This means that if you have forked any of the individual submodule repos yourself (avogadroapp , for instance) and have set it up as I have – so that the origin remote for avogadroapp is defined as matterhorn103/avogadroapp and OpenChemistry/avogadroapp is called upstream – then it will update to the current state of your own fork rather than to upstream.
I use sync fork before doing that. Is that ok?
Finally, it looks like you’re running the build from within VS Code on Linux? Have you tried building from the command line using your normal terminal?
Yes I have sometimes tried that but I use VS code more often.
After updating the repos as you have mentioned I am still getting the same error.