[regression] cmake missing from path
gengjiawen opened this issue · 5 comments
Bug description
> cmake .
> }
bash: cmake: command not found
Steps to reproduce
Any repo
Expected behavior
No response
Example repository
No response
Anything else?
No response
Hi @gengjiawen, could you provide an example-repo/steps that we can follow to reproduce this?
I've run into this same issue:
Example Repo
https://github.com/azanar/gitpod-issue-1020
Steps to reproduce
Launch the above repo in GitLab, see the following output:
HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
cmake .
}
gitpod /workspace/gitpod-issue-1020 (main) $ HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> cmake .
> }
bash: cmake: command not found
gitpod /workspace/gitpod-issue-1020 (main) $
Expected Behavior
cmake
is found, executed and create a build environment.
Rationale
The following documentation link indicates that cmake
will be present and functional as part of the standard GitPod Workspace-Full image:
https://www.gitpod.io/docs/introduction/languages/cpp#c-tools
I also did a bit of investigation. It appears that brew
believes it has installed cmake
.
gitpod /workspace/gitpod-issue-1020 (main) $ brew list -1
==> Formulae
ca-certificates
cmake
glibc
linux-headers@5.15
ncurses
openssl@1.1
However, when running brew doctor
, it appears cmake
is unlinked.
gitpod /workspace/gitpod-issue-1020 (main) $ brew doctor
*snip*
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
cmake
Running brew link cmake
appears to work, but then running cmake
against produces the following error:
gitpod /workspace/gitpod-issue-1020 (main) $ cmake
cmake: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
This is as far as I've gotten so far.
brew reinstall gettext
fix error while loading shared libraries: libstdc++.so.6
issue.
This should be fixed in 38abd9f, which should land Monday.
Tested like so from the jammy branch:
# or, alternatively, docker run --rm -it gitpod/workspace-full
docker run --rm -it localhost:5000/dazzle:full
brew install cmake
gitpod ~ $ which cmake
/home/linuxbrew/.linuxbrew/bin/cmake
gitpod ~ $ echo $PATH | grep linuxbrew
/home/gitpod/.sdkman/candidates/maven/current/bin:/home/gitpod/.sdkman/candidates/java/current/bin:/home/gitpod/.sdkman/candidates/gradle/current/bin:/workspace/.cargo/bin:/home/gitpod/.rvm/gems/ruby-3.1.3/bin:/home/gitpod/.rvm/gems/ruby-3.1.3@global/bin:/home/gitpod/.rvm/rubies/ruby-3.1.3/bin:/home/gitpod/.pyenv/shims:/workspace/go/bin:/home/gitpod/.nix-profile/bin:/home/gitpod/go/bin:/home/gitpod/go-packages/bin:/home/gitpod/.nvm/versions/node/v16.19.1/bin:/home/gitpod/.yarn/bin:/home/gitpod/.pnpm:/home/gitpod/.pyenv/bin:/home/gitpod/.rvm/bin:/home/gitpod/.cargo/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:/home/gitpod/.local/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/gitpod/.nvm/versions/node/v16.19.1/bin
gitpod ~ $ cmake --version
cmake version 3.25.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).