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

x86_64-conda_cos6-linux-gnu-cc #5265

Closed
kataksk opened this issue Apr 30, 2020 · 3 comments
Closed

x86_64-conda_cos6-linux-gnu-cc #5265

kataksk opened this issue Apr 30, 2020 · 3 comments

Comments

@kataksk
Copy link

kataksk commented Apr 30, 2020

Version of Singularity:

$ cat VERSION
3.5.3

Expected behavior

Configure singularity properly and fully after running the following command:

$ ./mconfig --without-suid --prefix=/home/kataoka/singularity && make -C ./builddir && make -C ./builddir install

Actual behavior

When probably running "make", configuration stops with error message about "x86_64-conda_cos6-linux-gnu-cc".

$ ./mconfig --without-suid --prefix=/home/kataoka/singularity && make -C ./builddir && make -C ./builddir install
.
.
. 
checking: libuuid+headers... yes
 checking: libseccomp+headers... no
 checking: cryptsetup... yes
=> generating fragments ...
=> building Makefile ...
=> generating singularity.spec ...
=> project singularity setup with :
    - host arch: x86_64
    - host wordsize: 64-bit
    - host C compiler: cc
    - host Go compiler: /home/kataoka/anaconda3/envs/pasa/bin/go
    - host system: unix
      ---
    - target arch: x86_64
    - target wordsize: 64-bit
    - target C compiler: cc
      ---
    - config profile: release
      ---
    - SUID install: no
    - Network plugins: yes
      ---
    - verbose: no
      ---
    - cryptsetup: /sbin/cryptsetup
      ---
    - version: 3.5.3
=> /home/kataoka/singularity/builddir/Makefile ready, try:
   $ cd /home/kataoka/singularity/builddir
   $ make
make: Entering directory `/home/kataoka/singularity/builddir'
 GO singularity
    [+] GO_TAGS "containers_image_openpgp sylog imgbuild_engine oci_engine singularity_engine fakeroot_engine apparmor selinux"
# runtime/cgo
exec: "x86_64-conda_cos6-linux-gnu-cc": executable file not found in $PATH
make: *** [singularity] error 2
make: Leaving directory `/home/kataoka/singularity/builddir'

Steps to reproduce this behavior

I created an environment with anaconda, and installed the requirements (e.g. openssl, libuuid, libseccomp etc) there with anaconda as well.

What OS/distro are you running

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

How did you install Singularity

I downloaded "singularity-3.5.3.tar.gz" from https://github.com/sylabs/singularity/releases/tag/v3.5.3

@dtrudg
Copy link
Contributor

dtrudg commented Apr 30, 2020

This is an issue with the C compiler that is configured in the conda environment that will be used when cgo C compilation inside a Go project is performed. I'm not sure exactly how the go conda package is setup, but in more recent version of conda prefixed compiler names and hard coded paths in languages that call out to them have widely caused issues, from a quick web search.

You may need gcc_linux-64 installed in your conda environment, if you do not have it.

Check the output of which x86_64-conda_cos6-linux-gnu-cc - where does it show?

You may need to set the mconfig C compiler with -c <path> where is the full path to the C compiler in your conda environment.

@kataksk
Copy link
Author

kataksk commented Apr 30, 2020

Thank you very much for your quick response!

Indeed there was no gcc_linux-64 in my conda environment.
After installing it with conda, I have got the following output:

$ which x86_64-conda_cos6-linux-gnu-cc
~/anaconda3/envs/pasa/bin/x86_64-conda_cos6-linux-gnu-cc

However, I'm now getting the error message regarding openssl.

$ ./mconfig --without-suid --prefix=/home/kataoka/singularity && make -C ./builddir && make -C ./builddir install
.
.
. 
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)

Nevertheless, I have already installed it.

$ which openssl
~/anaconda3/envs/pasa/bin/openssl

@dtrudg
Copy link
Contributor

dtrudg commented Apr 30, 2020

which openssl is giving you the location of the openssl executable. When compiling singularity what it needs are the code headers and the library. It can't find the headers.

Note also that conda-forge appears to be building singularity. See their recipe here: https://github.com/conda-forge/singularity-feedstock

The recipe/meta.yaml may give hints on the requirements you might need.

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

2 participants