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

gollvm: set the shell variable correctly in CMakeLists.txt #40631

timmyyuan opened this issue Aug 7, 2020 · 4 comments

gollvm: set the shell variable correctly in CMakeLists.txt #40631

timmyyuan opened this issue Aug 7, 2020 · 4 comments


Copy link

@timmyyuan timmyyuan commented Aug 7, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15rc1 gollvm LLVM 12.0.0git linux/amd64

Does this issue reproduce with the latest release?

Yes, I run the configure step of gollvm in a docker container (ubuntu 18.04), but fail with following logs:

-- Performing Test SPLIT_STACK_FUNCTIONAL - Success
-- starting libgo configuration.
CMake Error at tools/gollvm/cmake/modules/GoVars.cmake:41 (message):
  fatal: shell missing or not functional
Call Stack (most recent call first):
  tools/gollvm/libgo/CMakeLists.txt:11 (include)

-- Configuring incomplete, errors occurred!
See also "/root/release/CMakeFiles/CMakeOutput.log".
See also "/root/release/CMakeFiles/CMakeError.log".

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

I fetch a fresh gollvm to a docker container (ubuntu 18.04) then configure the building by


What did you expect to see?

no errors

What did you see instead?

configuration failed

Copy link

@timmyyuan timmyyuan commented Aug 7, 2020

The root cause is that the ${shell} variable is incorrectly set in CMakeLists.txt if there is no such a SHELL environment variable exists. I think I can submit a patch to fix this issue.

Copy link

@ianlancetaylor ianlancetaylor commented Aug 7, 2020

Copy link

@thanm thanm commented Aug 7, 2020

Yes please, feel free to submit a patch. I seem to recall at least one other person running into this same issue. Another option would be to require folks to set SHELL prior to running cmake (e.g. update the build instructions).

Copy link

@gopherbot gopherbot commented Aug 8, 2020

Change mentions this issue: gollvm: set the shell variable correctly in CMakeLists.txt

@thanm thanm closed this Aug 10, 2020
pingw33n pushed a commit to pingw33n/gollvm that referenced this issue Oct 6, 2020
Currently CMakeLists.txt in gollvm sets a work shell from SHELL environment variable. If there is no variable named SHELL in the environment, the configuration of gollvm will fail. This patch fix this issue by setting the default shell to /bin/bash.

Fixes golang/go#40631

Change-Id: Ifcd41611549134bbe5ce11373627b33eba6e75c1
Reviewed-by: Than McIntosh <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.