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

Closed
timmyyuan opened this issue Aug 7, 2020 · 4 comments
Closed

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

timmyyuan opened this issue Aug 7, 2020 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@timmyyuan
Copy link

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
-- 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

cmake ../llvm -DCMAKE_INSTALL_PREFIX=/root/gollvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_RTTI=On -DLLVM_USE_LINKER=gold -G Ninja

What did you expect to see?

no errors

What did you see instead?

configuration failed

@timmyyuan
Copy link
Author

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.

@ianlancetaylor
Copy link
Contributor

CC @thanm @cherrymui

@thanm
Copy link
Contributor

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).

@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 7, 2020
@gopherbot
Copy link

Change https://golang.org/cl/247198 mentions this issue: gollvm: set the shell variable correctly in CMakeLists.txt

@thanm thanm closed this as completed Aug 10, 2020
@golang golang locked and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants