Installation failed on Archlinux #612

Closed
lxyu opened this Issue Jul 14, 2015 · 11 comments

Projects

None yet

4 participants

@lxyu
lxyu commented Jul 14, 2015

I already have libev and libevdev installed. The installation log as follows:

The directory '/home/lxyu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/lxyu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Processing ./gevent-1.1a2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.4.7 in /usr/lib/python3.4/site-packages (from gevent==1.1a2)
Building wheels for collected packages: gevent
  Running setup.py bdist_wheel for gevent
  Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-w4959nq6-build/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpuesy1cgfpip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.4
  creating build/lib.linux-x86_64-3.4/gevent
  copying gevent/wsgi.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/win32util.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/util.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/timeout.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/threadpool.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/threading.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/thread.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/subprocess.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/ssl.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/socket.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/server.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/select.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/resolver_thread.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/resolver_ares.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/queue.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/pywsgi.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/pool.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/os.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/monkey.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/lock.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/local.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/hub.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/greenlet.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/fileobject.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/event.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/coros.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/corecffi.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/core.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/baseserver.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/backdoor.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_util_py2.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_threading.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_tblib.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_sslgte279.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_ssl3.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_ssl2.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_socketcommon.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_socket3.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_socket2.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_semaphore.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_fileobjectcommon.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_fileobject3.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/_fileobject2.py -> build/lib.linux-x86_64-3.4/gevent
  copying gevent/__init__.py -> build/lib.linux-x86_64-3.4/gevent
  running build_ext
  configure: error: in `/tmp/pip-w4959nq6-build/build/temp.linux-x86_64-3.4/libev':
  configure: error: cannot run C compiled programs.
  If you meant to cross compile, use `--host'.
  See `config.log' for more details
  Running '/bin/sh /tmp/pip-w4959nq6-build/libev/configure > configure-output.txt' in /tmp/pip-w4959nq6-build/build/temp.linux-x86_64-3.4/libev
  building 'gevent.core' extension
  creating build/temp.linux-x86_64-3.4/gevent
  gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-3.4/libev -Ilibev -I/usr/include/python3.4m -c gevent/gevent.corecext.c -o build/temp.linux-x86_64-3.4/gevent/gevent.corecext.o
  In file included from gevent/libev.h:2:0,
                   from gevent/gevent.corecext.c:256:
  libev/ev.c:45:22: fatal error: config.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for gevent
Failed to build gevent
Installing collected packages: gevent
  Running setup.py install for gevent
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-w4959nq6-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-g21b8dov-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    running build_ext
    configure: error: in `/tmp/pip-w4959nq6-build/build/temp.linux-x86_64-3.4/libev':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    Running '/bin/sh /tmp/pip-w4959nq6-build/libev/configure > configure-output.txt' in /tmp/pip-w4959nq6-build/build/temp.linux-x86_64-3.4/libev
    building 'gevent.core' extension
    gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-3.4/libev -Ilibev -I/usr/include/python3.4m -c gevent/gevent.corecext.c -o build/temp.linux-x86_64-3.4/gevent/gevent.corecext.o
    In file included from gevent/libev.h:2:0,
                     from gevent/gevent.corecext.c:256:
    libev/ev.c:45:22: fatal error: config.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-w4959nq6-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-g21b8dov-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-w4959nq6-build
@jamadden
Member

gevent always uses its bundled version of libev, so any libev installed on the system should be irrelevant.

I cannot reproduce that using pip 7.1.0 and the command pip install gevent==1.1a2. What version of pip are you using? What was your working directory? What installation command did you use?

@jamadden
Member

Ah, the pip version is probably irrelevant. There seems to be a problem with your system and/or environment variables. This output indicates that a standard configure script couldn't be run:

 configure: error: in `/tmp/pip-w4959nq6-build/build/temp.linux-x86_64-3.4/libev':
  configure: error: cannot run C compiled programs.
  If you meant to cross compile, use `--host'.
  See `config.log' for more details

Check your compiler and compiler settings.

@lxyu
lxyu commented Jul 15, 2015
$ which pip
/usr/sbin/pip
$ pip --version
pip 7.1.0 from /usr/lib/python3.4/site-packages (python 3.4)

The system env is Arch Linux with Kernel: 4.0.7-2-ARCH, and I already have base-devel packages installed.

I tried install with pip, tar.gz file, from github source, all failed with same error. more logs here:
https://gist.github.com/lxyu/2457f2ad1873ffaf2337

@jamadden
Member

It's my guess that you'll need to set/reset CC, CFLAGS, etc, appropriately. To know more, we'll need to see config.log as indicated in the error message:

    configure: error: in `/tmp/pip-build-r29njtry/gevent/libev':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details

Probably the easiest way to get ahold of that is to start from a source checkout and run setup.py yourself (pip cleans up all the temporary files when it's done, although you could try suspending it with ^Z at an appropriate point).

@lxyu
lxyu commented Jul 16, 2015

Strangely if I clone the source and install with

$ python setup.py install

It'll successfully build and install.

If I build a package local and then install from the targz file, it fail with the error above.

$ python setup.py sdist
$ pip install dist/gevent-1.1a2.tar.gz
@jamadden
Member

Interesting. setup.py doesn't know any differences between those two cases, so perhaps pip is setting up the environment differently. The config.log would still be very helpful.

@mzdaniel

It sounds like an environment issue. @lxyu: I tried the same commands you did and couldn't replicate this issue. I found that pip does 'lots' of things and sometimes caching and errors get in the way with not clear output. The good thing is pip has an extensive logging report. You could try pip install -v dist/gevent-1.1a2.tar.gz ? Or even better, try that with the master branch (pip install -v dist/gevent-1.1a3.dev0.tar.gz)

@lxyu
lxyu commented Jul 17, 2015

The -v flag do not work, however I succeed in keep the config.log from deletion by this command:

$ pip install --no-clean dist/gevent-1.1a3.dev0.tar.gz

The content of libev/config.log, it seems to failed with permission denied, but the command is running as root.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = snow
uname -m = x86_64
uname -r = 4.0.7-2-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/bin/vendor_perl
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/bin/core_perl


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2253: checking for a BSD-compatible install
configure:2321: result: /usr/bin/install -c
configure:2332: checking whether build environment is sane
configure:2387: result: yes
configure:2538: checking for a thread-safe mkdir -p
configure:2577: result: /usr/sbin/mkdir -p
configure:2584: checking for gawk
configure:2600: found /usr/sbin/gawk
configure:2611: result: gawk
configure:2622: checking whether make sets $(MAKE)
configure:2644: result: yes
configure:2673: checking whether make supports nested variables
configure:2690: result: yes
configure:2820: checking whether to enable maintainer-specific portions of Makefiles
configure:2829: result: no
configure:2891: checking for gcc
configure:2907: found /usr/sbin/gcc
configure:2918: result: gcc
configure:3147: checking for C compiler version
configure:3156: gcc --version >&5
gcc (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3167: $? = 0
configure:3156: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-5-20150623/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
gcc version 5.1.0 (GCC) 
configure:3167: $? = 0
configure:3156: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3167: $? = 1
configure:3156: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3167: $? = 1
configure:3187: checking whether the C compiler works
configure:3209: gcc    conftest.c  >&5
configure:3213: $? = 0
configure:3261: result: yes
configure:3264: checking for C compiler default output file name
configure:3266: result: a.out
configure:3272: checking for suffix of executables
configure:3279: gcc -o conftest    conftest.c  >&5
configure:3283: $? = 0
configure:3305: result: 
configure:3327: checking whether we are cross compiling
configure:3335: gcc -o conftest    conftest.c  >&5
configure:3339: $? = 0
configure:3346: ./conftest
./configure: line 3348: ./conftest: Permission denied
configure:3350: $? = 126
configure:3357: error: in `/tmp/pip-xgk47l7p-build/libev':
configure:3359: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/sbin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /tmp/pip-xgk47l7p-build/libev/missing aclocal-1.14'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /tmp/pip-xgk47l7p-build/libev/missing autoconf'
AUTOHEADER='${SHELL} /tmp/pip-xgk47l7p-build/libev/missing autoheader'
AUTOMAKE='${SHELL} /tmp/pip-xgk47l7p-build/libev/missing automake-1.14'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /tmp/pip-xgk47l7p-build/libev/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/sbin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='libev'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='4.20'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /tmp/pip-xgk47l7p-build/libev/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "libev"
#define VERSION "4.20"

configure: exit 1
@jamadden
Member

One difference between a manual install and a pip install is that the manual install uses the current working directory, while pip pushes things off into a temporary directory in /tmp. So perhaps files aren't executable on /tmp. Can you verify that manually? What filesystem is mounted on /tmp? In particular, is it mounted with the noexec option? If so, you'll need to change that.

@lxyu
lxyu commented Jul 25, 2015

You're right, I have noexec mount option enabled on /tmp... It works now.

Thanks!

@lxyu lxyu closed this Jul 25, 2015
@shtrom
shtrom commented Feb 1, 2016

👍

/dev/sda6 on /tmp type ext4 (rw,noexec,relatime,data=ordered)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment