Open dennishendriksen opened 4 years ago
Looks like you don't have a compiler on the system.
I think I do:
foo:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-8.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 8.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,objc,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
gcc version 8.3.0 (Alpine 8.3.0)
It was used successfully in a previous 'make install' step.
Hmm, the error looks like it is failing to find a command...but not gcc
. There are a couple of shell tools required, maybe one is not present?
You can turn on debugging for the bootstrap script by exporting EASYBUILD_BOOTSTRAP_DEBUG
, maybe that will give more information?
Hmm, Alpine had a similar sounding problem in the past, see https://github.com/easybuilders/easybuild-framework/pull/2398
@alainvanhoof Maybe you have some tips here?
Thanks for your quick reply.
Hmm, the error looks like it is failing to find a command...but not
gcc
. There are a couple of shell tools required, maybe one is not present?
I verified that the required tools are present.
You can turn on debugging for the bootstrap script by exporting
EASYBUILD_BOOTSTRAP_DEBUG
, maybe that will give more information?
I do see additional logging after export EASYBUILD_BOOTSTRAP_DEBUG=1
, but it doesn't appear to be relevant to this issue.
When I run the following from a Python shell I get the same error:
>>> import subprocess
>>> subprocess.Popen('gcc -v')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Running the same command with shell=True results in:
>>> subprocess.Popen('gcc -v', shell=True)
<subprocess.Popen object at 0x7f7bfc7d3e10>
>>> Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-8.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 8.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,objc,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
Looking at https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/tools/run.py#L127 it appears that the script is run with shell=True
which makes me think that it should work (but it doesn't ...).
Any ideas?
Fails on Alpine Linux:
subprocess.Popen('gcc -v', shell=True, executable='/bin/bash')
Succeeds after installing bash:
apk add bash
Problem solved!
Apparently bash
is a requirement. Could someone add it to https://easybuild.readthedocs.io/en/latest/Installation.html#required-shell-tools?
Ah, EasyBuild is using bash explicitely: https://github.com/easybuilders/easybuild-framework/blob/4d4b24ec9ff5216332b063cb8065724a47af364e/easybuild/tools/run.py#L208
Maybe it shouldn't and use the one from "$SHELL" (potentially after matching against valid shells)? What is the default shell on popular systems apart from bash which should work? E.g. what is the one for alpine?
/bin/ash (https://en.wikipedia.org/wiki/Almquist_shell)
Seems this should work. It is however possible that somewhere (even in EasyBlocks) bashism is used. If this is changed to accept other shells, then this should be changed to use sh by default and bash as fallback to detect such issues.
Note that standard Ubuntu sh is dash (variant of ash)
I'm running into the following error when bootstrapping Easybuild:
Full logs:
These are the steps I took from an clean Alpine Linux system (failed to get things working on Ubuntu due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891541):
Any ideas on the cause of build error or how to solve it?