Uvloop: Unable to install uvloop

Created on 9 May 2016  Â·  21Comments  Â·  Source: MagicStack/uvloop

pip install uvloop throws this error

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-3p6l9uj5/uvloop/setup.py", line 81, in <module>
        include_package_data=True
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
        self.run_command('build')
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 49, in run
        _build_ext.run(self)
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/tmp/pip-build-3p6l9uj5/uvloop/setup.py", line 40, in build_extensions
        self.build_libuv()
      File "/tmp/pip-build-3p6l9uj5/uvloop/setup.py", line 35, in build_libuv
        subprocess.run(['make', j_flag], cwd=LIBUV_DIR, env=env, check=True)
      File "/usr/lib/python3.5/subprocess.py", line 711, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2

    ----------------------------------------
resolved

Most helpful comment

@f0t0n Yeah, I'll comment out the new_MethodHandle2 func in the next release. In the meanwhile we're trying to figure out the build problems here, stay tuned.

All 21 comments

Looks like libuv has failed to build. Was there any other output on the screen?

Also, please try pip install -vvv uvloop

I have also experienced this error when trying to install from pypi with pip. I think this message may be pertinent to the install failure:

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/justin/github/mver/env/build/uvloop/vendor/libuv/missing aclocal-1.15 -I m4

/home/justin/github/mver/env/build/uvloop/vendor/libuv/missing: line 81: aclocal-1.15: command not found

WARNING: 'aclocal-1.15' is missing on your system.

         You should only need it if you modified 'acinclude.m4' or

         'configure.ac' or m4 files included by 'configure.ac'.

         The 'aclocal' program is part of the GNU Automake package:

         <http://www.gnu.org/software/automake>

         It also requires GNU Autoconf, GNU m4 and Perl in order to run:

         <http://www.gnu.org/software/autoconf>

         <http://www.gnu.org/software/m4/>

         <http://www.perl.org/>

make: *** [aclocal.m4] Error 127

As a workaround I cloned the repo from github, install cython and followed the instructions in the README and uvloop successfully installed.

@1st1 Full log

Collecting uvloop
  Using cached uvloop-0.4.16.tar.gz
Building wheels for collected packages: uvloop
  Running setup.py bdist_wheel for uvloop
  Complete output from command /home/anand/.virtualenvs/35/bin/python3.5 -c "import setuptools;__file__='/tmp/pip-build-tmzeiyue/uvloop/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpkclkg6qypip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/__init__.py -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/_testbase.py -> build/lib.linux-x86_64-3.5/uvloop
  running egg_info
  writing top-level names to uvloop.egg-info/top_level.txt
  writing dependency_links to uvloop.egg-info/dependency_links.txt
  writing uvloop.egg-info/PKG-INFO
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'uvloop.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
  warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
  warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
  writing manifest file 'uvloop.egg-info/SOURCES.txt'
  copying uvloop/cbhandles.pxd -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/cbhandles.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/dns.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/errors.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/loop.c -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/loop.pxd -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/loop.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/os_signal.pxd -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/os_signal.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/request.pxd -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/request.pyx -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/server.pxd -> build/lib.linux-x86_64-3.5/uvloop
  copying uvloop/server.pyx -> build/lib.linux-x86_64-3.5/uvloop
  creating build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/async_.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/async_.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/basetransport.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/basetransport.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/handle.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/handle.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/idle.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/idle.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/pipe.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/pipe.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/poll.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/poll.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/process.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/process.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/signal.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/signal.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/stream.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/stream.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/streamserver.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/streamserver.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/tcp.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/tcp.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/timer.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/timer.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/udp.pxd -> build/lib.linux-x86_64-3.5/uvloop/handles
  copying uvloop/handles/udp.pyx -> build/lib.linux-x86_64-3.5/uvloop/handles
  creating build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/__init__.py -> build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/consts.pxi -> build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/python.pxd -> build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/stdlib.pxi -> build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/system.pxd -> build/lib.linux-x86_64-3.5/uvloop/includes
  copying uvloop/includes/uv.pxd -> build/lib.linux-x86_64-3.5/uvloop/includes
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking build system type... x86_64-unknown-linux-gnu
  checking host system type... x86_64-unknown-linux-gnu
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether gcc understands -c and -o together... yes
  checking for style of include used by make... GNU
  checking dependency style of gcc... gcc3
  checking if gcc supports -fvisibility=hidden flag... yes
  checking if gcc supports -g flag... yes
  checking if gcc supports -std=gnu89 flag... yes
  checking if gcc supports -pedantic flag... yes
  checking if gcc supports -Wall flag... yes
  checking if gcc supports -Wextra flag... yes
  checking if gcc supports -Wno-unused-parameter flag... yes
  checking for ar... ar
  checking the archiver (ar) interface... ar
  checking how to print strings... printf
  checking for a sed that does not truncate output... /bin/sed
  checking for grep that handles long lines and -e... /bin/grep
  checking for egrep... /bin/grep -E
  checking for fgrep... /bin/grep -F
  checking for ld used by gcc... /usr/bin/ld
  checking if the linker (/usr/bin/ld) is GNU ld... yes
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking whether ln -s works... yes
  checking the maximum length of command line arguments... 1572864
  checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
  checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
  checking for /usr/bin/ld option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... pass_all
  checking for dlltool... no
  checking how to associate runtime and link libraries... printf %s\n
  checking for archiver @FILE support... @
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /bin/dd
  checking how to truncate binary pipes... /bin/dd bs=4096 count=1
  checking for mt... mt
  checking if mt is a manifest tool... no
  checking how to run the C preprocessor... gcc -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... no
  checking for gcc option to produce PIC... -fPIC -DPIC
  checking if gcc PIC flag -fPIC -DPIC works... yes
  checking if gcc static flag -static works... yes
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  checking whether -lc should be explicitly linked in... no
  checking dynamic linker characteristics... GNU/Linux ld.so
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... yes
  checking whether to build static libraries... yes
  checking whether make supports nested variables... (cached) yes
  checking for dlopen in -ldl... yes
  checking for kstat_lookup in -lkstat... no
  checking for kvm_open in -lkvm... no
  checking for gethostbyname in -lnsl... yes
  checking for perfstat_cpu in -lperfstat... no
  checking for pthread_mutex_init in -lpthread... yes
  checking for clock_gettime in -lrt... yes
  checking for sendfile in -lsendfile... no
  checking for socket in -lsocket... no
  checking for special C compiler options needed for large files... no
  checking for _FILE_OFFSET_BITS value needed for large files... no
  checking sys/ahafs_evProds.h usability... no
  checking sys/ahafs_evProds.h presence... no
  checking for sys/ahafs_evProds.h... no
  checking for pkg-config... yes
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating libuv.pc
  config.status: creating Makefile
  config.status: executing depfiles commands
  config.status: executing libtool commands
  CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /tmp/pip-build-tmzeiyue/uvloop/vendor/libuv/missing aclocal-1.15 -I m4
  /tmp/pip-build-tmzeiyue/uvloop/vendor/libuv/missing: line 81: aclocal-1.15: command not found
  WARNING: 'aclocal-1.15' is missing on your system.
           You should only need it if you modified 'acinclude.m4' or
           'configure.ac' or m4 files included by 'configure.ac'.
           The 'aclocal' program is part of the GNU Automake package:
           <http://www.gnu.org/software/automake>
           It also requires GNU Autoconf, GNU m4 and Perl in order to run:
           <http://www.gnu.org/software/autoconf>
           <http://www.gnu.org/software/m4/>
           <http://www.perl.org/>
  make: *** [aclocal.m4] Error 127
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 100, in <module>
      include_package_data=True
    File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 175, in run
      self.run_command('build')
    File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 49, in run
      _build_ext.run(self)
    File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/Cython/Distutils/build_ext.py", line 164, in run
      _build_ext.build_ext.run(self)
    File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
      self.build_extensions()
    File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 59, in build_extensions
      self.build_libuv()
    File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 46, in build_libuv
      subprocess.run(['make', j_flag], cwd=LIBUV_DIR, env=env, check=True)
    File "/usr/lib/python3.5/subprocess.py", line 711, in run
      output=stdout, stderr=stderr)
  subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2

  ----------------------------------------
Failed to build uvloop
Installing collected packages: uvloop
  Running setup.py install for uvloop
    Complete output from command /home/anand/.virtualenvs/35/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-tmzeiyue/uvloop/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8kkvvvo8-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/anand/.virtualenvs/35/include/site/python3.5/uvloop:
    running install
    running build
    running build_py
    running egg_info
    writing top-level names to uvloop.egg-info/top_level.txt
    writing dependency_links to uvloop.egg-info/dependency_links.txt
    writing uvloop.egg-info/PKG-INFO
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'uvloop.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
    writing manifest file 'uvloop.egg-info/SOURCES.txt'
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking if gcc supports -fvisibility=hidden flag... yes
    checking if gcc supports -g flag... yes
    checking if gcc supports -std=gnu89 flag... yes
    checking if gcc supports -pedantic flag... yes
    checking if gcc supports -Wall flag... yes
    checking if gcc supports -Wextra flag... yes
    checking if gcc supports -Wno-unused-parameter flag... yes
    checking for ar... ar
    checking the archiver (ar) interface... ar
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether make supports nested variables... (cached) yes
    checking for dlopen in -ldl... yes
    checking for kstat_lookup in -lkstat... no
    checking for kvm_open in -lkvm... no
    checking for gethostbyname in -lnsl... yes
    checking for perfstat_cpu in -lperfstat... no
    checking for pthread_mutex_init in -lpthread... yes
    checking for clock_gettime in -lrt... yes
    checking for sendfile in -lsendfile... no
    checking for socket in -lsocket... no
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking sys/ahafs_evProds.h usability... no
    checking sys/ahafs_evProds.h presence... no
    checking for sys/ahafs_evProds.h... no
    checking for pkg-config... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating libuv.pc
    config.status: creating Makefile
    config.status: executing depfiles commands
    config.status: executing libtool commands
    CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /tmp/pip-build-tmzeiyue/uvloop/vendor/libuv/missing aclocal-1.15 -I m4
    /tmp/pip-build-tmzeiyue/uvloop/vendor/libuv/missing: line 81: aclocal-1.15: command not found
    WARNING: 'aclocal-1.15' is missing on your system.
             You should only need it if you modified 'acinclude.m4' or
             'configure.ac' or m4 files included by 'configure.ac'.
             The 'aclocal' program is part of the GNU Automake package:
             <http://www.gnu.org/software/automake>
             It also requires GNU Autoconf, GNU m4 and Perl in order to run:
             <http://www.gnu.org/software/autoconf>
             <http://www.gnu.org/software/m4/>
             <http://www.perl.org/>
    make: *** [aclocal.m4] Error 127
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 100, in <module>
        include_package_data=True
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
        self.run_command('build')
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 49, in run
        _build_ext.run(self)
      File "/home/anand/.virtualenvs/35/lib/python3.5/site-packages/Cython/Distutils/build_ext.py", line 164, in run
        _build_ext.build_ext.run(self)
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 59, in build_extensions
        self.build_libuv()
      File "/tmp/pip-build-tmzeiyue/uvloop/setup.py", line 46, in build_libuv
        subprocess.run(['make', j_flag], cwd=LIBUV_DIR, env=env, check=True)
      File "/usr/lib/python3.5/subprocess.py", line 711, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2

    ----------------------------------------

@justinfay I tried as you mentioned, it is still throwing this error

running install
running bdist_egg
running egg_info
writing uvloop.egg-info/PKG-INFO
writing top-level names to uvloop.egg-info/top_level.txt
writing dependency_links to uvloop.egg-info/dependency_links.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'uvloop.loop' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/anand/.virtualenvs/35/include/python3.5m -Ivendor/libuv/include -c uvloop/loop.c -o build/temp.linux-x86_64-3.5/uvloop/loop.o
x86_64-linux-gnu-gcc: error: uvloop/loop.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

@ChillarAnand: These build failures are likely because the timestamps on aclocal.m4 and configure get messed up somehow during unpacking. To test this, can you please download the tarball from PyPI: https://pypi.python.org/pypi/uvloop/, unpack it, run the following:

$ cd uvloop-0.4.16/vendor/libuv && ./configure && make -d

And then attach the output. Thanks.

@elprans Above command ran successfully.

When i ran python setup.py install, it throwed this error

running install
running bdist_egg
running egg_info
writing top-level names to uvloop.egg-info/top_level.txt
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'uvloop.loop' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/anand/.virtualenvs/35/include/python3.5m -Ivendor/li
buv/include -c uvloop/loop.c -o build/temp.linux-x86_64-3.5/uvloop/loop.o
uvloop/loop.c: In function ‘__pyx_f_6uvloop_4loop___uv_udp_on_receive’:
uvloop/loop.c:78543:9: warning: passing argument 1 of ‘__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr’ discards ‘const’ qualifier fr
om pointer target type [enabled by default]
    __pyx_t_2 = __pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(__pyx_v_addr); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 314, __pyx_L9_error)
         ^
uvloop/loop.c:72213:18: note: expected ‘struct sockaddr *’ but argument is of type ‘const struct sockaddr *’
 static PyObject *__pyx_f_6uvloop_4loop___convert_sockaddr_to_pyaddr(struct sockaddr *__pyx_v_addr) {
                  ^
uvloop/loop.c: At top level:
uvloop/loop.c:36870:18: warning: ‘__pyx_f_6uvloop_4loop_new_MethodHandle2’ defined but not used [-Wunused-function]
 static PyObject *__pyx_f_6uvloop_4loop_new_MethodHandle2(struct __pyx_obj_6uvloop_4loop_Loop *__pyx_v_loop, PyObject *__pyx_v_name, __pyx_t_6uvloop_4loop_method2_t *__pyx_v_callback, PyObject *__pyx_v_ctx, PyObject *__pyx_v_arg1, PyObject *__pyx_v_arg2) {
                  ^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/uvloop/loop.o vendor/libuv/.libs/libuv.a -lrt -o build/lib.linux-x86_64-3.5/uvloop/loop.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: vendor/libuv/.libs/libuv.a(libuv_la-threadpool.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
vendor/libuv/.libs/libuv.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@ChillarAnand Which platform are you running this on?

Also, please do attach the output of the "make -d" command, even though it succeeds. Please remove the uvloop dir, unpack again and re-run the command.

$ rm -rf uvloop-0.4.16
$ tar xzf uvloop-0.4.16.tar.gz
$ cd uvloop-0.4.16/vendor/libuv && ./configure && make -d 2>&1 >make.log

Please attach "make.log" here.

Thanks.

@elprans

OS details

# anand at anand in ~/sandbox/tmp/uvloop-0.4.16/vendor/libuv [9:47:17]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty
(3)
# anand at anand in ~/sandbox/tmp/uvloop-0.4.16/vendor/libuv [9:47:31]
$ uname -a
Linux anand 3.16.0-51-generic #69~14.04.1-Ubuntu SMP Wed Oct 7 15:32:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Attached make.log here.

Strange. What's the version of pip?

$ pip -V
pip 8.1.2 from /home/anand/.virtualenvs/35/lib/python3.5/site-packages (python 3.5)

https://github.com/MagicStack/uvloop/issues/20#issuecomment-218211914
Got the same exit code and traceback while installing in container with pip.
OS: Alpine Linux Edge, pip version: 8.0.3.

The warning about the unused function is enabled with gcc's flag -Wall which enables all warnings or with -Wunused-function. So that it requires to change these flags or to remove the unused function.

@f0t0n I had succes with python:3.5.1-slim docker image. You can take a look here: https://github.com/aio-libs/aioodbc/blob/master/ci%2FDockerfile

But on travis ci can not build uvloop:
https://travis-ci.org/aio-libs/aioodbc/jobs/128160252

So basically new_MethodHandle2() is never used in the source code and this is why gcc fails to compile with default flag -Wall.
Cython guys talked about CYTHON_UNUSED macro which should suppress the warning, but I don't get how to use it in Cython source code. Maybe you guys know.

@f0t0n Yeah, I'll comment out the new_MethodHandle2 func in the next release. In the meanwhile we're trying to figure out the build problems here, stay tuned.

@1st1 There's gcc flag -Wno-unused-function that will suppress this as well. Though I'm not sure if it's available in all versions of gcc.

So we were able to track down the aclocal issue. On Ubuntu 14.04 and Pip 7.1, the timestamps on extracted files are not preserved properly, which triggers a rebuild.

@ChillarAnand @justinfay @f0t0n @jettify Please try v0.4.21. I think @elprans and I have figured this out.

@1st1 I can confirm that I successfully installed 0.4.21 using pip, below is some info from my system:

(env)➜ uvl cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
(env)➜ uvl pip --version
pip 1.5.4 from /home/justin/github/uvl/env/lib/python3.5/site-packages (python 3.5)
(env)➜ uvl pip freeze
uvloop==0.4.21

Able to install correctly. Thanks @1st1 @elprans

Just installed 0.4.24 successfully. Thanks guys!

try pip install -vvv uvloop
This worked for me

Was this page helpful?
0 / 5 - 0 ratings