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

Singularity 3.5.3 mconfig not recognizing installed go #5099

Closed
SpiderMonkey1975 opened this issue Mar 6, 2020 · 37 comments
Closed

Singularity 3.5.3 mconfig not recognizing installed go #5099

SpiderMonkey1975 opened this issue Mar 6, 2020 · 37 comments

Comments

@SpiderMonkey1975
Copy link

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.

@dtrudg
Copy link
Contributor

dtrudg commented Mar 6, 2020

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

@SpiderMonkey1975
Copy link
Author

SpiderMonkey1975 commented Mar 6, 2020 via email

@steveheistand
Copy link

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.

@dtrudg dtrudg closed this as completed Mar 17, 2020
@apiszcz
Copy link

apiszcz commented Jul 31, 2020

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

I am having the same problem on Ubuntu 18.04

@apiszcz
Copy link

apiszcz commented Sep 10, 2020 via email

@rohitfarmer
Copy link

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

kmanalo commented Sep 16, 2020

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

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

apiszcz commented Mar 11, 2021

user exact version specified, NOT the latest

@tahashmi
Copy link

tahashmi commented Apr 7, 2021

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

apoliakov commented Nov 19, 2021

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

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

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.

@vmikk
Copy link

vmikk commented Apr 19, 2022

In my case Go compiler was not found because of conda.
If you carefully check the output of go env, you may see that some variables point to /home/vmikk/miniconda3/...
To fix the problem, I've just used:

export GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
export GOROOT="/usr/local/go"

before running the ./mconfig ...

This works with Singularity v.3.9.8, Go v.1.18.1 (OS=linux ARCH=amd64)

@dylanmartin
Copy link

I'm having the same issue trying to install Singularity in WSL 2 on Windows 11.

dylan@DESKTOP-R2A04MG:/mnt/c/development/singularity-ce-3.10.1$ ./mconfig && \
e -C bu>     make -C builddir && \
>     sudo make -C builddir install
Configuring for project `singularity-ce' 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.17)... not found!
mconfig: could not complete configuration

@DrDaveD
Copy link
Collaborator

DrDaveD commented Jul 19, 2022

Since that's singularity-ce please make a new issue at https://github.com/sylabs/singularity/issues.

@mohsin996
Copy link

mohsin996 commented Aug 12, 2022

We are using Ansible role to install singularity in a VM with /tmp mounted as noexec, during our automated installations we came across this similar error "checking: host Go compiler (at least version 1.13) ... not found!", "mconfig: could not complete configuration".

As a workaround we are using environment variable TMDIR: /var/tmp in the playbook as below, this solved the above error in our automated singularity installations.

---
- name: Provision Linux machines
  hosts: localhost
  ignore_errors: "{{ ansible_check_mode }}"
  tasks:
    ######################## Singularity Installation ################################
    - name: Install Singularity from role
      include_role:
        name: lecorguille.singularity
        apply:
          become: true
          environment:
            TMPDIR: /var/tmp/

@DrDaveD
Copy link
Collaborator

DrDaveD commented Aug 12, 2022

I don't see how that message could be related to the setting of TMPDIR

@mwalzer
Copy link

mwalzer commented Oct 6, 2022

Had similar issue with singularity-ce 3.10 installation on WSL and I don't belive it's a singularity issue. (@dylanmartin)
I had go.1.13 installed previously and just paved it over with the latest go, which is where the real issue lies. The go installation was 'successful', as

user:~/singularity-ce-3.10.2$ go version
go version go1.19.2 linux/amd64

Solution: rm -r /usr/local/go and then reinstall latest go, then continue with mconfig
Credit goes here

@PeterMcGor
Copy link

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

This piece must be attached to the official installation instructions!

@DrDaveD
Copy link
Collaborator

DrDaveD commented Oct 21, 2022

This piece must be attached to the official installation instructions!

What do you mean? That is based on the (old) official installation instructions.

@Najmabms
Copy link

Najmabms commented Nov 8, 2022

cd ./builddir &&
make &&
sudo make install

Thanks a lot. you saved me from a lot of headach :)

@DrDaveD
Copy link
Collaborator

DrDaveD commented Nov 8, 2022

@Najmabms What did you find here that was more helpful than the official instructions in INSTALL.md?

@Najmabms
Copy link

Najmabms commented Nov 8, 2022

I am not an expert bioinformatition. Most of the time pass while I am trying to install the program then using it. Honestly, most of the problem fix mentioned above, I did not understand it.

I wanted to use nf-core so I had to install Singularity then Nextflow and I followed the instructions but when something works the other one do not. First GO did not work well so I did not get the binary files and I do not understand why. When I got that fixed wget stopped working when I was trying to fix GO and I did not know why again. I removed every thing and start from scratch. Then I got everything installed but when I run the test command I get errors that did not make sense and finally I got to understand it's version problem.
The above command got everything working without going through all the issues. I have to admit that finally I had to install Singularity verion3.5.3 instead of the one given above which is version 2.4.2, but I was glad that someone posted something that does not generate as much errors that I got when going through the tutorial.

What I want to say from all this is that it took me 2 full working days just to install Singularity, Nextflow and nf-core even though I followed the tutorial. I googled a lot until it was finally installed and running and I honestly don't know what fixed it. I just think it should not take this much time. May be the tutorial need a revision

@DrDaveD
Copy link
Collaborator

DrDaveD commented Nov 8, 2022

I'm afraid I would need more specific information about what exactly failed in order to make any improvements to the instructions. I don't even know what tutorial you are talking about. If it's from Nextflow or nf-core, you would have to let the owners of those projects know.

@Najmabms
Copy link

Najmabms commented Nov 9, 2022

I was trying to use nextflow on a redhat server. I followed this website: https://singularity-tutorial.github.io/01-installation/

I got to this step: ./mconfig

$ cd singularity
$ ./mconfig
$ cd builddir
$ make
$ sudo make install

I could not move forward after that, I think because of libssl. When I checked I found it in my system but the terminal says it cannot find it. This is the output from the terminal:
(base) [parasitology1@cphl-lab-srv 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)... /usr/local/go/bin/go checking: host C compiler option -Wall... yes checking: host C compiler option -Werror... yes checking: host C compiler option -Wfatal-errors... yes checking: host C compiler option -Wno-unknown-warning-option... yes checking: host C compiler option -Wstrict-prototypes... yes checking: host C compiler option -Wpointer-arith... yes checking: host C compiler option -Wbad-function-cast... yes checking: host C compiler option -Woverlength-strings... yes checking: host C compiler option -Wframe-larger-than=2047... yes checking: host C compiler option -Wno-sign-compare... yes checking: host C compiler option -Wclobbered... yes checking: host C compiler option -Wempty-body... yes checking: host C compiler option -Wmissing-parameter-type... yes checking: host C compiler option -Wtype-limits... yes checking: host C compiler option -Wunused-parameter... yes checking: host C compiler option -Wunused-but-set-parameter... yes checking: host C compiler option -Wno-discarded-qualifiers... yes checking: host C compiler option -Wno-incompatible-pointer-types... yes checking: host C compiler option -pipe... yes checking: host C compiler option -fmessage-length=0... yes checking: host C compiler option -fPIC... yes checking: host ar' path... ar
checking: host ld' path... ld checking: host ranlib' path... ranlib
checking: host objcopy' path... objcopy checking: target C compiler... cc checking: target C++ compiler... c++ checking: target ar' path... ar
checking: target ld' path... ld checking: target ranlib' path... ranlib
checking: target `objcopy' path... objcopy
checking: host compiles static binaries... no
checking: target compiles static binaries... no
checking: host os type... unix
checking: host architecture... x86_64
checking: target architecture... x86_64
checking: host architecture word size... 64
checking: target architecture word size... 64
checking: project version... 3.5.3
checking: project short version... 3.5.3
=> running post-basechecks project specific checks ...
checking: namespace: CLONE_NEWPID... yes
checking: namespace: CLONE_FS... yes
checking: namespace: CLONE_NEWNS... yes
checking: namespace: CLONE_NEWUSER... yes
checking: namespace: CLONE_NEWIPC... yes
checking: namespace: CLONE_NEWNET... yes
checking: namespace: CLONE_NEWUTS... yes
checking: namespace: CLONE_NEWCGROUP... no
checking: feature: NO_NEW_PRIVS... yes
checking: feature: MS_SLAVE... yes
checking: feature: MS_REC... yes
checking: feature: MS_PRIVATE... yes
checking: user capabilities... yes
checking: header linux/securebits.h... yes
checking: header linux/capability.h... yes
checking: function setns... no
checking: libssl+headers... no

Unable to find the libssl, need package openssl-devel (libssl-dev on Debian/Ubuntu)

(base) [parasitology1@cphl-lab-srv singularity]$ whereis libssl
libssl: /usr/lib64/libssl3.so

(base) [parasitology1@cphl-lab-srv singularity]$ whereis openssl
openssl: /usr/bin/openssl /usr/lib64/openssl /home/parasitology1/bin/anaconda3/bin/openssl /usr/share/man/man1/openssl.1ssl.gz

(base) [parasitology1@cphl-lab-srv singularity]$ cd builddir/

(base) [parasitology1@cphl-lab-srv builddir]$ make
make: *** No targets specified and no makefile found. Stop.
(base) [parasitology1@cphl-lab-srv builddir]$ ls
config.c config.h makeit-intermediate

(base) [parasitology1@cphl-lab-srv builddir]$ sudo make install
[sudo] password for parasitology1:
make: *** No rule to make target `install'. Stop.

I went back and tried to install openssl-devel again but still things did not work so I deleted everything and started fresh.

In my second trail wget did not work. I thing because of some thing I did when I tried to fix the first problem but I am not sure what was it. It keeps giving me this error.

(base) [parasitology1@cphl-lab-srv noTrimming]$ wget
wget: /lib64/libssl.so.3: version `OPENSSL_3.0.0' not found (required by wget)

I checked for the file if it present and I copied it in my /usr/local/lib files and I am still getting the same error.
(base) [parasitology1@cphl-lab-srv noTrimming]$ whereis libssl.so.3
libssl.so: /usr/lib64/libssl.so.10 /usr/lib64/libssl.so /usr/lib64/libssl.so.3

(base) [parasitology1@cphl-lab-srv noTrimming]$ ls -al /usr/local/lib/ | grep -E "libcryp|libssl"
(base) [parasitology1@cphl-lab-srv noTrimming]$ ls -al /usr/local/lib
total 0
drwxr-xr-x 2 root root 6 Dec 14 2017 .
drwxr-xr-x 14 root root 152 Nov 8 11:57 ..
(base) [parasitology1@cphl-lab-srv noTrimming]$ ls -al /usr/lib64/ | grep -E "libcryp|libssl"
-rwxr-xr-x 1 root root 40600 May 19 2020 libcrypt-2.17.so
lrwxrwxrwx 1 root root 19 Nov 8 08:04 libcrypto.so -> libcrypto.so.1.0.2k
lrwxrwxrwx 1 root root 19 Jan 30 2022 libcrypto.so.10 -> libcrypto.so.1.0.2k
-rwxr-xr-x 1 root root 2521008 Apr 9 2019 libcrypto.so.1.0.2k
-rw-r--r-- 1 root root 65 Apr 9 2019 .libcrypto.so.1.0.2k.hmac
lrwxrwxrwx 1 root root 25 Jan 30 2022 .libcrypto.so.10.hmac -> .libcrypto.so.1.0.2k.hmac
-rwxr-xr-x 1 root root 5209984 Nov 8 09:31 libcrypto.so.3
lrwxrwxrwx 1 root root 23 Jan 30 2022 libcryptsetup.so.12 -> libcryptsetup.so.12.3.0
-rwxr-xr-x 1 root root 355584 Aug 27 2019 libcryptsetup.so.12.3.0
lrwxrwxrwx 1 root root 22 Jan 30 2022 libcryptsetup.so.4 -> libcryptsetup.so.4.7.0
-rwxr-xr-x 1 root root 166704 Aug 27 2019 libcryptsetup.so.4.7.0
lrwxrwxrwx 1 root root 25 Mar 17 2022 libcrypt.so -> ../../lib64/libcrypt.so.1
lrwxrwxrwx 1 root root 16 Jan 30 2022 libcrypt.so.1 -> libcrypt-2.17.so
-rwxr-xr-x 1 root root 370584 Dec 6 2019 libssl3.so
lrwxrwxrwx 1 root root 16 Nov 8 08:04 libssl.so -> libssl.so.1.0.2k
lrwxrwxrwx 1 root root 16 Jan 30 2022 libssl.so.10 -> libssl.so.1.0.2k
-rwxr-xr-x 1 root root 470360 Apr 9 2019 libssl.so.1.0.2k
-rw-r--r-- 1 root root 65 Apr 9 2019 .libssl.so.1.0.2k.hmac
lrwxrwxrwx 1 root root 22 Jan 30 2022 .libssl.so.10.hmac -> .libssl.so.1.0.2k.hmac
lrwxrwxrwx 1 root root 9 Nov 8 09:38 libssl.so.3 -> libssl.so

Fortunately, wget command is used to fetch files that I already have. so I continue with the files that I downloaded them when wget was working and what ever I needed next I used curl for it.
Then I used conda to create an environment and download nf-core. Inside the environment wget works to fetch what ever nf-core needs

@DrDaveD
Copy link
Collaborator

DrDaveD commented Nov 9, 2022

Oh I had not heard of that site before. Maybe @GodloveD can comment. That website probably ought to have some disclaimers on the front page to explain its limitations. It is certainly outdated.

In your particular failure case, that wget error makes it look like the operating system is not properly installed. What is the host operating system? It's surprising that you got it to work with the instructions in this issue but not the other instructions. I think it may have just been a coincidence that these are the instructions you tried when you had the operating system in a good condition. The official instructions are in INSTALL.md with the source code.

@GodloveD
Copy link
Collaborator

GodloveD commented Nov 9, 2022

Yeah that site is definitely outdated. I can try to bring it up to speed if I have time but no promises. PRs welcome! 😸

@Najmabms
Copy link

Najmabms commented Nov 13, 2022 via email

@markchang2006
Copy link

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
`

Thanks to PeterMcGor! It works to solve the problems which took me several days to overcome. It's really nice to have your kind help!

@sameehj
Copy link

sameehj commented Feb 8, 2023

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 .

This worked for me. Only when I installed go 1.17, mconfig executed successfully.

@tedicruz
Copy link

tedicruz commented Jul 10, 2023

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

For my hardened Linux image, setting the TMPDIR=/path/other/tmp worked. The TMP_DIR didn't work for my Linux.

@DrDaveD
Copy link
Collaborator

DrDaveD commented Jul 10, 2023

Yes I don't think that TMP_DIR is a real thing. It is TMPDIR or APPTAINER_TMPDIR or SINGULARITY_TMPDIR.

@bihengliu
Copy link

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.

I strongly suggest you to check the version of Go, if someone has this error report since there is a minimum version requirement. Remember to set the correct version as you need.

@lucyintheskyzzz
Copy link

@bihengliu did you figure it out? I am having the same issue

@DrDaveD
Copy link
Collaborator

DrDaveD commented May 3, 2024

@lucyintheskyzzz this repository is closed. If you are trying to build sylabs singularity please make a new issue at https://github.com/sylabs/singularity, otherwise make a new issue at https://github.com/apptainer/apptainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests