Skip to content

Singularity 3.5.3 mconfig not recognizing installed go #5099

@SpiderMonkey1975

Description

@SpiderMonkey1975

I am trying to install Singularity 3.5.3 on an Ubuntu 18.04 VM instance. I have downloaded and installed go Version 1.13 and the Singularity source tarball on Github. When I try running ./mconfig, I get the error:

markc@mark-vm:~/singularity$ ./mconfig
Configuring for project `singularity' with languages: C, Golang
=> running pre-basechecks project specific checks ...
=> running base system checks ...
checking: host C compiler... cc
checking: host C++ compiler... c++
checking: host Go compiler (at least version 1.13)... not found!
mconfig: could not complete configuration

I have updated both my PATH and LD_LIBRARY_PATH environment variables to include the relevant directories for Go. I have also tried using the newest go Version 1.14 as well without success.

Activity

dtrudg

dtrudg commented on Mar 6, 2020

@dtrudg
Contributor

Please can you provide an echo $PATH and go env output?

SpiderMonkey1975

SpiderMonkey1975 commented on Mar 6, 2020

@SpiderMonkey1975
Author
steveheistand

steveheistand commented on Mar 16, 2020

@steveheistand

for automated installs of singularity HOME/GOCACHE/GOPATH/TMPDIR should all be defined before
trying to build and install.
as an fyi in case others find this while searching.

apiszcz

apiszcz commented on Jul 31, 2020

@apiszcz

Seeing same configuration check issue.

$:/home/u1/singularity# ./mconfig &&     make -C builddir &&     sudo make -C builddir install
Configuring for project `singularity' with languages: C, Golang
=> running pre-basechecks project specific checks ...
=> running base system checks ...
 checking: host C compiler... cc
 checking: host C++ compiler... c++
 checking: host Go compiler (at least version 1.13)... not found!
mconfig: could not complete configuration

**$:/home/u1/singularity# go version
go version go1.14.2 linux/amd64**

rohitfarmer

rohitfarmer commented on Sep 10, 2020

@rohitfarmer

I am having the same problem on Ubuntu 18.04

apiszcz

apiszcz commented on Sep 10, 2020

@apiszcz
rohitfarmer

rohitfarmer commented on Sep 11, 2020

@rohitfarmer

use the exact version specified, not the latest.

On Thu, Sep 10, 2020 at 4:32 PM Rohit Farmer @.***> wrote: I am having the same problem on Ubuntu 18.04 — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5099 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK5KTNGWQNWR2WYPG26J43SFEZUDANCNFSM4LDE7XEA .

I am exactly following this tutorial https://sylabs.io/guides/3.5/user-guide/quick_start.html#quick-installation-steps from sylabs.io

kmanalo

kmanalo commented on Sep 16, 2020

@kmanalo

Thanks @steveheistand I should have paid attention to your comment more, that fixed my problem working on an Azure VM for fresh Singuarity installs.

nclowell

nclowell commented on Mar 11, 2021

@nclowell

I'm a similar boat to @rohitfarmer, I'm following the same tutorial and getting the same error.

I'm trying to install singularity 3.7.2 on a VM instance of Ubuntu 20.04.2 LTS and getting the following

$ sudo ./mconfig 
[sudo] password for nclowell: 
Configuring for project `singularity' with languages: C, Golang
=> running pre-basechecks project specific checks ...
=> running base system checks ...
 checking: host C compiler... cc
 checking: host C++ compiler... c++
 checking: host Go compiler (at least version 1.13)... not found!
mconfig: could not complete configuration

Here's my output of go env

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nclowell/.cache/go-build"
GOENV="/home/nclowell/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/nclowell/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/usr/bin/singularity/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build219607794=/tmp/go-build -gno-record-gcc-switches"

and echo $PATH

$ echo $PATH
/home/nclowell/go:/usr/local/go/bin:/usr/local/go/bin/go:/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Can anyone help? Thanks!

apiszcz

apiszcz commented on Mar 11, 2021

@apiszcz

user exact version specified, NOT the latest

tahashmi

tahashmi commented on Apr 7, 2021

@tahashmi

If someone faces this issue, follow this installation guide.

sudo apt-get update && \
sudo apt-get install -y build-essential \
libseccomp-dev pkg-config squashfs-tools cryptsetup

sudo rm -r /usr/local/go

export VERSION=1.13.15 OS=linux ARCH=amd64  # change this as you need

wget -O /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/go${VERSION}.${OS}-${ARCH}.tar.gz && \
sudo tar -C /usr/local -xzf /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz

echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \
echo 'export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin' >> ~/.bashrc && \
source ~/.bashrc

curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh |
sh -s -- -b $(go env GOPATH)/bin v1.21.0

mkdir -p ${GOPATH}/src/github.com/sylabs && \
cd ${GOPATH}/src/github.com/sylabs && \
git clone https://github.com/sylabs/singularity.git && \
cd singularity

git checkout v3.6.3

cd ${GOPATH}/src/github.com/sylabs/singularity && \
./mconfig && \
cd ./builddir && \
make && \
sudo make install

singularity version
apoliakov

apoliakov commented on Nov 19, 2021

@apoliakov

Hey all!

I just lost like 4 hours due to this problem and I wanted to leave something behind so that others don't go thru the same pain. I got the dreaded

checking: host Go compiler (at least version 1.13)... not found!

I came here. I ran those instructions above like 3 times. But they didn't do it. My problem was that I was running a "security hardened linux" (CentOS 7) that did not allow execution of code from the /tmp directory. And the "go checker" runs something out of that directory. This isolates the failing step:

$ env GO111MODULE=off go run mlocal/checks/version.go go1.13
fork/exec /tmp/go-build189166955/b001/exe/version: permission denied

In my case this happened because /tmp is mounted with the noexec flag. So there was nothing wrong with the version of go. The checker just crashed on permission denied and then reported the wrong error. Probably could use better error handling. So the fix is to either mount /tmp without noexec (which for me happened in a systemd service) or just export like TMP_DIR=/path/to/other/tmp

otavio-santini

otavio-santini commented on Mar 23, 2022

@otavio-santini

Hi all!

For me the only thing that works was use recursive cloning of syngularity files.
I used the command:

git clone --recursive https://github.com/sylabs/singularity.git

Another problem I faced was related to Seccomp, it was necessary to install it by using:

#'zardus/preeny#56 (comment)

Good luck!

rohitfarmer

rohitfarmer commented on Mar 23, 2022

@rohitfarmer

I recently had the same problem, so I had to completely uninstall GO and reinstall it following the procedure on Singularity docs. It worked afterward.

26 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @athos@apiszcz@kmanalo@DrDaveD@apoliakov

        Issue actions

          Singularity 3.5.3 mconfig not recognizing installed go · Issue #5099 · apptainer/singularity