ludbb / secp256k1-py

Python FFI bindings for secp256k1 :dizzy:
MIT License
107 stars 53 forks source link

OSX Installation Broken #15

Closed Miserlou closed 8 years ago

Miserlou commented 8 years ago
pip install secp256k1
Collecting secp256k1
  Using cached secp256k1-0.13.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.3.0 in ./env/lib/python2.7/site-packages (from secp256k1)
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./env/lib/python2.7/site-packages (from cffi>=1.3.0->secp256k1)
Building wheels for collected packages: secp256k1
  Running setup.py bdist_wheel for secp256k1 ... error
  Complete output from command /Users/rjones/Projects/DVoting/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/tmpr6EKeMpip-wheel- --python-tag cp27:
  0.29
  Using bundled libsecp256k1
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.10-x86_64-2.7
  creating build/lib.macosx-10.10-x86_64-2.7/secp256k1
  copying secp256k1/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/secp256k1
  running build_clib
  /usr/local/bin/glibtoolize: line 406: /usr/local/Library/ENV/4.3/sed: No such file or directory
  /usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
  /usr/local/bin/glibtoolize: line 2513: /usr/local/Library/ENV/4.3/sed: No such file or directory
  /usr/local/bin/glibtoolize: line 3601: /usr/local/Library/ENV/4.3/sed: No such file or directory
  /usr/local/bin/glibtoolize: line 3845: /usr/local/Library/ENV/4.3/sed: No such file or directory
  /usr/local/bin/glibtoolize: line 861: /usr/local/Library/ENV/4.3/sed: No such file or directory
  : putting auxiliary files in '.'.
  : copying file './ltmain.sh'
  /usr/local/bin/glibtoolize: line 3771: /usr/local/Library/ENV/4.3/sed: No such file or directory
  configure.ac:10: installing 'build-aux/compile'
  configure.ac:5: installing 'build-aux/config.guess'
  configure.ac:5: installing 'build-aux/config.sub'
  configure.ac:9: installing 'build-aux/install-sh'
  configure.ac:10: error: required file 'build-aux/ltmain.sh' not found
  configure.ac:9: installing 'build-aux/missing'
  Makefile.am: installing 'build-aux/depcomp'
  parallel-tests: installing 'build-aux/test-driver'
  autoreconf: automake failed with exit status: 1
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py", line 274, in <module>
      "Topic :: Security :: Cryptography"
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/Users/rjones/Projects/DVoting/env/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py", line 151, in run
      cwd=absolute("libsecp256k1"),
    File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/libsecp256k1/autogen.sh']' returned non-zero exit status 1

  ----------------------------------------
  Failed building wheel for secp256k1
  Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1
  Running setup.py install for secp256k1 ... error
    Complete output from command /Users/rjones/Projects/DVoting/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-g7qrqK-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rjones/Projects/DVoting/env/bin/../include/site/python2.7/secp256k1:
    0.29
    Using bundled libsecp256k1
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.10-x86_64-2.7
    creating build/lib.macosx-10.10-x86_64-2.7/secp256k1
    copying secp256k1/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/secp256k1
    running build_clib
    checking build system type... x86_64-apple-darwin14.5.0
    checking host system type... x86_64-apple-darwin14.5.0
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/libsecp256k1/build-aux/install-sh -c -d
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking how to print strings... printf
    checking for style of include used by make... 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 dependency style of gcc... none
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
    checking the name lister (/usr/bin/nm) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 196608
    checking how to convert x86_64-apple-darwin14.5.0 file names to x86_64-apple-darwin14.5.0 format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin14.5.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
    checking for objdump... no
    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 ar... ar
    checking for archiver @FILE support... no
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm 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... no
    checking if : is a manifest tool... no
    checking for dsymutil... dsymutil
    checking for nmedit... nmedit
    checking for lipo... lipo
    checking for otool... otool
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exported_symbols_list linker flag... yes
    checking for -force_load linker flag... yes
    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... yes
    checking for gcc option to produce PIC... -fno-common -DPIC
    checking if gcc PIC flag -fno-common -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin14.5.0 dyld
    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... no
    checking whether to build static libraries... yes
    checking whether make supports nested variables... (cached) yes
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for ar... /usr/bin/ar
    checking for ranlib... /usr/bin/ranlib
    checking for strip... /usr/bin/strip
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking whether gcc understands -c and -o together... (cached) yes
    checking dependency style of gcc... (cached) none
    checking how to run the C preprocessor... gcc -E
    checking for gcc option to accept ISO C89... (cached) none needed
    checking for brew... /usr/local/bin/brew
    checking if gcc supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
    checking if gcc supports -fvisibility=hidden... yes
    checking for __int128... yes
    checking for __builtin_expect... yes
    checking for x86_64 assembly availability... no
    checking gmp.h usability... yes
    checking gmp.h presence... yes
    checking for gmp.h... yes
    checking for __gmpz_init in -lgmp... yes
    checking for CRYPTO... yes
    checking for main in -lcrypto... yes
    checking for EC functions in libcrypto... yes
    checking whether byte ordering is bigendian... no
    configure: Using assembly optimizations: no
    configure: Using field implementation: 64bit
    configure: Using bignum implementation: gmp
    configure: Using scalar implementation: 64bit
    configure: Using endomorphism optimizations: no
    configure: Building ECDSA pubkey recovery module: yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: error: cannot find input file: `Makefile.in'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py", line 274, in <module>
        "Topic :: Security :: Cryptography"
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/Users/rjones/Projects/DVoting/env/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py", line 194, in run
        cwd=build_temp,
      File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/libsecp256k1/configure', '--disable-shared', '--enable-static', '--disable-dependency-tracking', '--with-pic', '--enable-module-recovery', '--prefix', '/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/build/temp.macosx-10.10-x86_64-2.7']' returned non-zero exit status 1

    ----------------------------------------
Command "/Users/rjones/Projects/DVoting/env/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-g7qrqK-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rjones/Projects/DVoting/env/bin/../include/site/python2.7/secp256k1" failed with error code 1 in /private/var/folders/00/vp4bg2md3ng4sqkg3hrz_j1003frjd/T/pip-build-zkoBvE/secp256k1/

:(

deerdear commented 8 years ago

Same problem :(

ludbb commented 8 years ago

Did you try installing the C libsecp256k1 first?

Miserlou commented 8 years ago

I'm not sure how, but this seems to have resolved itself for me. Install worked fine, as did pyethapp install, which was the goal. Thanks for the reply.

ludbb commented 8 years ago

Ok, closing it in that case. The general recommendation is to install the C lib first before installing this Python module.

wxy122221 commented 5 years ago

I have the same problem with python 3.6. I have installed the libsecp256k1 first. @ludbb