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

why this happen in centos 6 ? #93

Open
werdegars opened this issue Apr 23, 2021 · 11 comments
Open

why this happen in centos 6 ? #93

werdegars opened this issue Apr 23, 2021 · 11 comments

Comments

@werdegars
Copy link

werdegars commented Apr 23, 2021

Python 3.6.6
CentOs 6.10


python3.6 -m pip install coincurve

Collecting coincurve
Using cached coincurve-15.0.0.tar.gz (219 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: cffi>=1.3.0 in /usr/local/lib/python3.6/site-packages (from coincurve) (1.3.0)
Requirement already satisfied: asn1crypto in /usr/local/lib/python3.6/site-packages (from coincurve) (1.4.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/site-packages (from cffi>=1.3.0->coincurve) (2.20)
Building wheels for collected packages: coincurve
Building wheel for coincurve (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpgf834dif
cwd: /tmp/pip-install-2fm8b76q/coincurve_acc7c657b22b41cbb1caa277cfd64a45
Complete output (66 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/coincurve
copying coincurve/utils.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/flags.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/_windows_libsecp256k1.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/types.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/context.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/keys.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/init.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/ecdsa.py -> build/lib.linux-x86_64-3.6/coincurve
copying coincurve/py.typed -> build/lib.linux-x86_64-3.6/coincurve
running build_clib
configure.ac:407: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
build-aux/m4/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded from...
configure.ac:407: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in
main()
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 205, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 222, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 207, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 259, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 150, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 309, in
**setup_kwargs
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 95, in run
_bdist_wheel.run(self)
File "/tmp/pip-build-env-v6f3cuc2/overlay/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 152, in run
subprocess.check_call([autogen], cwd=absolute('libsecp256k1'))
File "/usr/local/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/tmp/pip-install-2fm8b76q/coincurve_acc7c657b22b41cbb1caa277cfd64a45/libsecp256k1/autogen.sh']' returned non-zero exit status 1.
ERROR: Failed building wheel for coincurve
Failed to build coincurve
ERROR: Could not build wheels for coincurve which use PEP 517 and cannot be installed directly

@werdegars werdegars changed the title why this happen in cent os 6 ? why this happen in centos 6 ? Apr 23, 2021
@sigkill
Copy link

sigkill commented Aug 8, 2021

Facing same issue on Centos 7, looking into it, there appears to be a failure related to autogen.sh in the temporary dir that pip sets up.

@sigkill
Copy link

sigkill commented Aug 8, 2021

You probably will face same error output of:

/var/volatile/tmp/test/libsecp256k1# ./autogen.sh configure.ac:407: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O build-aux/m4/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded from... configure.ac:407: the top level autom4te: /usr/bin/env failed with exit status: 1 aclocal: /usr/bin/autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1

@ofek
Copy link
Owner

ofek commented Aug 8, 2021

Hmm, any idea why?

@sigkill
Copy link

sigkill commented Aug 8, 2021

Not sure, but I was able to run the build script from https://github.com/spesmilo/electrum just now and successfully built libsecp256k1.so.0

The script that was able to produce a working build is in contrib/make_libsecp256k1.sh in the https://github.com/spesmilo/electrum repo. The files built, but I'm having to move them by hand. No idea if this will fix the issue, but I'm going to try and install coincurve against those.

@sigkill
Copy link

sigkill commented Aug 8, 2021

When I attempt to build coincurve with python3 setup.py build which calls: autogen.sh

Output here:

running build_clib downloading libsecp256k1 source code configure.ac:407: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O build-aux/m4/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded from... configure.ac:407: the top level autom4te: /usr/bin/env failed with exit status: 1 aclocal: /usr/bin/autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1 Traceback (most recent call last): File "/micNfs/tools/tmp/coincurve/setup.py", line 260, in <module> setup( File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.9/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/micNfs/tools/tmp/coincurve/setup.py", line 152, in run subprocess.check_call([autogen], cwd=absolute('libsecp256k1')) File "/usr/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd)

@sigkill
Copy link

sigkill commented Aug 8, 2021

I've set the ENV variables as follows:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/micNfs/tools/tmp/electrum/contrib/secp256k1/dist/lib" export LIBDIR="$LIBDIR:/micNfs/tools/tmp/electrum/contrib/secp256k1/dist/lib" echo /micNfs/tools/tmp/electrum/contrib/secp256k1/dist/lib >> /etc/ld.so.conf

(Building on an Intel Xeon Phi 5110p)

Manually copied to:
./include/secp256k1.h ./include/secp256k1_preallocated.h ./include/secp256k1_ecdh.h ./include/secp256k1_recovery.h ./include/secp256k1_generator.h ./include/secp256k1_rangeproof.h ./include/secp256k1_whitelist.h ./include/secp256k1_surjectionproof.h ./include/secp256k1_ecdsa_s2c.h ./lib/pkgconfig/libsecp256k1.pc ./lib/libsecp256k1.la ./lib/libsecp256k1.a

Now executing python3 setup.py build in the coincurve dir, that failed.

I manually copied the built libsecp256k1 dir from electrum to the copy of the pip created coincurve dir, and the dir from the latest branch of this repo, commented out the portion of setup.py where the installer downloads the source and builds libsecp256k1 ... So far the installer stated that the contents of libsecp256k1 were already created and would need to be made distclean ... I ran that and still get the same error as before, but this time perhaps a bit better info?

python3 setup.py build running build running build_py running build_clib checking build system type... k1om-unknown-linux-gnu checking host system type... k1om-unknown-linux-gnu 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 how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... no configure: error: in/var/volatile/tmp/test2/build/temp.linux-k1om-3.9':
configure: error: C compiler cannot create executables
See config.log' for more details Traceback (most recent call last): File "/var/volatile/tmp/test2/setup.py", line 260, in <module> setup( File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.9/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/var/volatile/tmp/test2/setup.py", line 191, in run subprocess.check_call(cmd, cwd=build_temp) File "/usr/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/var/volatile/tmp/test2/libsecp256k1/configure', '--disable-shared', '--enable-static', '--disable-dependency-tracking', '--with-pic', '--enable-module-recovery', '--prefix', '/var/volatile/tmp/test2/build/temp.linux-k1om-3.9', '--enable-experimental', '--enable-module-ecdh', '--enable-benchmark=no', '--enable-tests=no', '--enable-openssl-tests=no', '--enable-exhaustive-tests=no']' returned non-zero exit status 77.

So something is triggering the working gcc compiler to fail, but this works fine with electrums contrib libsecp256k1.

I'm surprised there isn't something checking to see if the libsecp256k1 libraries are installed already, instead of just building it.

@sigkill
Copy link

sigkill commented Aug 8, 2021

Hmm, any idea why?

Interesting ... If you could do the same on your Centos 6 system - and preserve the files that get generated by python3.6 -m pip install coincurve you might be able to get some additional details from the autogen.sh output that gets run.

I saved my cached copy, there may be a flag for that...

pip --verbose install coincurve also might provide more info to what is failing.

@sigkill
Copy link

sigkill commented Aug 8, 2021

from verbose output - the location pip attempts the install will be after the --prefix flag:

--prefix /var/volatile/tmp/pip-build-env-skxkqr4l/overlay on my most recent failure. 😆

@sigkill
Copy link

sigkill commented Aug 8, 2021

Here are the flags from the "working" libsecp256k1 compile:

./configure --prefix=/micNfs/tools/tmp/electrum/contrib/secp256k1/dist --enable-module-recovery --enable-experimental --enable-module-ecdh --disable-benchmark --disable-tests --disable-exhaustive-tests --disable-static --enable-shared

@sigkill
Copy link

sigkill commented Aug 8, 2021

the flags in coincurve from pip are:
cmd = [ absolute('libsecp256k1/configure'), '--disable-shared', '--enable-static', '--disable-dependency-tracking', '--with-pic', '--enable-module-recovery', '--prefix', os.path.abspath(self.build_clib), '--enable-experimental', '--enable-module-ecdh', '--enable-benchmark=no', '--enable-tests=no', '--enable-openssl-tests=no', '--enable-exhaustive-tests=no',

@sigkill
Copy link

sigkill commented Aug 8, 2021

After hacking on it for some time, I have no idea if it's going to be stable, but I was able to build a weird version for my cpu on Centos 7:

`
root@heater-mic0:/var/volatile/tmp/test3# export CFLAGS="-m64"
root@heater-mic0:/var/volatile/tmp/test3# python setup.py
Traceback (most recent call last):
File "setup.py", line 15, in
from setuptools import Distribution as _Distribution, setup, find_packages, version as setuptools_version
ImportError: No module named setuptools
root@heater-mic0:/var/volatile/tmp/test3# pip install setuptools
Requirement already satisfied: setuptools in /usr/lib/python3.9/site-packages (56.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@heater-mic0:/var/volatile/tmp/test3# python setup.py
Traceback (most recent call last):
File "setup.py", line 15, in
from setuptools import Distribution as _Distribution, setup, find_packages, version as setuptools_version
ImportError: No module named setuptools
root@heater-mic0:/var/volatile/tmp/test3# python setup.py build
Traceback (most recent call last):
File "setup.py", line 15, in
from setuptools import Distribution as _Distribution, setup, find_packages, version as setuptools_version
ImportError: No module named setuptools
root@heater-mic0:/var/volatile/tmp/test3# python setup.py build
Traceback (most recent call last):
File "setup.py", line 15, in
from setuptools import Distribution as _Distribution, setup, find_packages, version as setuptools_version
ImportError: No module named setuptools
root@heater-mic0:/var/volatile/tmp/test3# ls
LICENSE-APACHE MANIFEST.in README.md _cffi_build coincurve libsecp256k1 pyproject.toml setup.py
LICENSE-MIT PKG-INFO pycache build coincurve.egg-info libsecp256k1.broke setup.cfg setup_support.py
root@heater-mic0:/var/volatile/tmp/test3# pwd
/var/volatile/tmp/test3
root@heater-mic0:/var/volatile/tmp/test3# pip3 install setuptools
Requirement already satisfied: setuptools in /usr/lib/python3.9/site-packages (56.0.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@heater-mic0:/var/volatile/tmp/test3# python3 setup.py build
running build
running build_py
running build_clib
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /var/volatile/tmp/test3/build/temp.linux-k1om-3.9
checking build system type... k1om-mpss-linux-gnu
checking host system type... k1om-mpss-linux-gnu
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 how to print strings... printf
checking for style of include used by make... GNU
checking for k1om-mpss-linux-gcc... k1om-mpss-linux-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 k1om-mpss-linux-gcc accepts -g... yes
checking for k1om-mpss-linux-gcc option to accept ISO C89... none needed
checking dependency style of k1om-mpss-linux-gcc... gcc3
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 k1om-mpss-linux-gcc... /usr/k1om-mpss-linux/bin/ld
checking if the linker (/usr/k1om-mpss-linux/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 whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert k1om-mpss-linux-gnu file names to k1om-mpss-linux-gnu format... func_convert_file_noop
checking how to convert k1om-mpss-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/k1om-mpss-linux/bin/ld option to reload object files... -r
checking for k1om-mpss-linux-objdump... k1om-mpss-linux-objdump
checking how to recognize dependent libraries... pass_all
checking for k1om-mpss-linux-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for k1om-mpss-linux-ar... k1om-mpss-linux-ar
checking for archiver @file support... @
checking for k1om-mpss-linux-strip... k1om-mpss-linux-strip
checking for k1om-mpss-linux-ranlib... k1om-mpss-linux-ranlib
checking command to parse /usr/bin/nm -B output from k1om-mpss-linux-gcc object... ok
checking for sysroot... no
checking for k1om-mpss-linux-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... k1om-mpss-linux-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 k1om-mpss-linux-gcc supports -fno-rtti -fno-exceptions... no
checking for k1om-mpss-linux-gcc option to produce PIC... -fPIC -DPIC
checking if k1om-mpss-linux-gcc PIC flag -fPIC -DPIC works... yes
checking if k1om-mpss-linux-gcc static flag -static works... yes
checking if k1om-mpss-linux-gcc supports -c -o file.o... yes
checking if k1om-mpss-linux-gcc supports -c -o file.o... (cached) yes
checking whether the k1om-mpss-linux-gcc linker (/usr/k1om-mpss-linux/bin/ld -m elf_k1om) 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... no
checking for k1om-mpss-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for k1om-mpss-linux-ar... /usr/bin/k1om-mpss-linux-ar
checking for k1om-mpss-linux-ranlib... /usr/bin/k1om-mpss-linux-ranlib
checking for k1om-mpss-linux-strip... /usr/bin/k1om-mpss-linux-strip
checking for gcc... /usr/bin/gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... (cached) none needed
checking dependency style of /usr/bin/gcc... gcc3
checking how to run the C preprocessor... /usr/bin/gcc -E
checking whether k1om-mpss-linux-gcc and cc understand -c and -o together... yes
checking for k1om-mpss-linux-gcc option to accept ISO C89... (cached) none needed
checking dependency style of k1om-mpss-linux-gcc... gcc3
checking if k1om-mpss-linux-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 k1om-mpss-linux-gcc supports -fvisibility=hidden... yes
checking for __int128... yes
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking if native /usr/bin/gcc supports -Wall -Wextra -Wno-unused-function... yes
checking for working native compiler: /usr/bin/gcc... yes
checking for x86_64 assembly availability... yes
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking whether byte ordering is bigendian... no
configure: ******
configure: WARNING: experimental build
configure: Experimental features do not have stable APIs or properties, and may not be safe for production use.
configure: Building ECDH module: yes
configure: ******
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libsecp256k1.pc
config.status: creating src/libsecp256k1-config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Build Options:
with endomorphism = no
with ecmult precomp = yes
with external callbacks = no
with benchmarks = no
with coverage = no
module ecdh = yes
module recovery = yes

asm = x86_64
bignum = gmp
field = 64bit
scalar = 64bit
ecmult window size = 15
ecmult gen prec. bits = 4

valgrind = no
CC = k1om-mpss-linux-gcc
CFLAGS = -O2 -fvisibility=hidden -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -m64
CPPFLAGS =
LDFLAGS =

(CDPATH="${ZSH_VERSION+.}:" && cd /var/volatile/tmp/test3/libsecp256k1 && /bin/sh /var/volatile/tmp/test3/libsecp256k1/build-aux/missing --run autoheader)
rm -f src/stamp-h1
touch /var/volatile/tmp/test3/libsecp256k1/src/libsecp256k1-config.h.in
cd . && /bin/sh ./config.status src/libsecp256k1-config.h
config.status: creating src/libsecp256k1-config.h
config.status: src/libsecp256k1-config.h is unchanged
/usr/bin/gcc -I/var/volatile/tmp/test3/libsecp256k1 -I./src -Wall -Wextra -Wno-unused-function -g -O2 -c /var/volatile/tmp/test3/libsecp256k1/src/gen_context.c -o gen_context.o
/usr/bin/gcc -Wall -Wextra -Wno-unused-function -g -O2 gen_context.o -o gen_context
./gen_context
CC src/libsecp256k1_la-secp256k1.lo
CCLD libsecp256k1.la
make[1]: Entering directory `/var/volatile/tmp/test3/build/temp.linux-k1om-3.9'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /usr/bin/install -c libsecp256k1.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libsecp256k1.so.0.0.0 /usr/local/lib/libsecp256k1.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libsecp256k1.so.0.0.0 libsecp256k1.so.0 || { rm -f libsecp256k1.so.0 && ln -s libsecp256k1.so.0.0.0 libsecp256k1.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libsecp256k1.so.0.0.0 libsecp256k1.so || { rm -f libsecp256k1.so && ln -s libsecp256k1.so.0.0.0 libsecp256k1.so; }; })
libtool: install: /usr/bin/install -c .libs/libsecp256k1.lai /usr/local/lib/libsecp256k1.la
libtool: finish: PATH="/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/sbin" ldconfig -n /usr/local/lib
ldconfig: /usr/local/lib/libsecp256k1.so is for unknown machine 181.

ldconfig: /usr/local/lib/libsecp256k1.so.0 is for unknown machine 181.

ldconfig: /usr/local/lib/libsecp256k1.so.0.0.0 is for unknown machine 181.

ldconfig: /usr/local/lib/libexslt.so is for unknown machine 181.

ldconfig: /usr/local/lib/libexslt.so.0 is for unknown machine 181.

ldconfig: /usr/local/lib/libexslt.so.0.8.19 is for unknown machine 181.

ldconfig: /usr/local/lib/libxslt.so is for unknown machine 181.

ldconfig: /usr/local/lib/libxslt.so.1 is for unknown machine 181.

ldconfig: /usr/local/lib/libxslt.so.1.1.31 is for unknown machine 181.


Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR' linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
/usr/bin/install -c -m 644 /var/volatile/tmp/test3/libsecp256k1/include/secp256k1.h /var/volatile/tmp/test3/libsecp256k1/include/secp256k1_preallocated.h /var/volatile/tmp/test3/libsecp256k1/include/secp256k1_ecdh.h /var/volatile/tmp/test3/libsecp256k1/include/secp256k1_recovery.h '/usr/local/include'
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 libsecp256k1.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory `/var/volatile/tmp/test3/build/temp.linux-k1om-3.9'
running build_ext
generating cffi module 'build/temp.linux-k1om-3.9/_libsecp256k1.c'
building '_libsecp256k1' extension
creating build/temp.linux-k1om-3.9/build
creating build/temp.linux-k1om-3.9/build/temp.linux-k1om-3.9
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -DCFFI_ENABLE_RECOVERY -I/usr/include/python3.9 -Ibuild/temp.linux-k1om-3.9/include -I/usr/local/include -c build/temp.linux-k1om-3.9/_libsecp256k1.c -o build/temp.linux-k1om-3.9/build/temp.linux-k1om-3.9/_libsecp256k1.o
gcc -pthread -shared -L /usr/local/lib64 -m64 build/temp.linux-k1om-3.9/build/temp.linux-k1om-3.9/_libsecp256k1.o -Lbuild/temp.linux-k1om-3.9/lib -L/usr/lib -L/usr/local/lib -Lbuild/temp.linux-k1om-3.9 -lsecp256k1 -lsecp256k1 -lgmp -o build/lib.linux-k1om-3.9/coincurve/_libsecp256k1.cpython-39-x86_64-linux-gnu.so
root@heater-mic0:/var/volatile/tmp/test3# python3 setup.py install
running install
running bdist_egg
running egg_info
writing coincurve.egg-info/PKG-INFO
writing dependency_links to coincurve.egg-info/dependency_links.txt
writing requirements to coincurve.egg-info/requires.txt
writing top-level names to coincurve.egg-info/top_level.txt
adding license file 'LICENSE-MIT' (matched pattern 'LICEN[CS]E*')
adding license file 'LICENSE-APACHE' (matched pattern 'LICEN[CS]E*')
reading manifest file 'coincurve.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'coincurve.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-k1om/egg
running install_lib
running build_py
running build_ext
generating cffi module 'build/temp.linux-k1om-3.9/_libsecp256k1.c'
already up-to-date
creating build/bdist.linux-k1om
creating build/bdist.linux-k1om/egg
creating build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/_libsecp256k1.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/py.typed -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/init.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/_windows_libsecp256k1.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/context.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/ecdsa.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/flags.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/keys.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/types.py -> build/bdist.linux-k1om/egg/coincurve
copying build/lib.linux-k1om-3.9/coincurve/utils.py -> build/bdist.linux-k1om/egg/coincurve
byte-compiling build/bdist.linux-k1om/egg/coincurve/init.py to init.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/_windows_libsecp256k1.py to _windows_libsecp256k1.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/context.py to context.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/ecdsa.py to ecdsa.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/flags.py to flags.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/keys.py to keys.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/types.py to types.cpython-39.pyc
byte-compiling build/bdist.linux-k1om/egg/coincurve/utils.py to utils.cpython-39.pyc
creating stub loader for coincurve/_libsecp256k1.cpython-39-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-k1om/egg/coincurve/_libsecp256k1.py to _libsecp256k1.cpython-39.pyc
creating build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/PKG-INFO -> build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/SOURCES.txt -> build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/dependency_links.txt -> build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/not-zip-safe -> build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/requires.txt -> build/bdist.linux-k1om/egg/EGG-INFO
copying coincurve.egg-info/top_level.txt -> build/bdist.linux-k1om/egg/EGG-INFO
writing build/bdist.linux-k1om/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/coincurve-15.0.1-py3.9-linux-k1om.egg' and adding 'build/bdist.linux-k1om/egg' to it
removing 'build/bdist.linux-k1om/egg' (and everything under it)
Processing coincurve-15.0.1-py3.9-linux-k1om.egg
creating /usr/lib/python3.9/site-packages/coincurve-15.0.1-py3.9-linux-k1om.egg
Extracting coincurve-15.0.1-py3.9-linux-k1om.egg to /usr/lib/python3.9/site-packages
Adding coincurve 15.0.1 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/coincurve-15.0.1-py3.9-linux-k1om.egg
Processing dependencies for coincurve==15.0.1
Searching for asn1crypto
Reading https://pypi.org/simple/asn1crypto/
Downloading https://files.pythonhosted.org/packages/b5/a8/56be92dcd4a5bf1998705a9b4028249fe7c9a035b955fe93b6a3e5b829f8/asn1crypto-1.4.0-py2.py3-none-any.whl#sha256=4bcdf33c861c7d40bdcd74d8e4dd7661aac320fcdf40b9a3f95b4ee12fde2fa8
Best match: asn1crypto 1.4.0
Processing asn1crypto-1.4.0-py2.py3-none-any.whl
Installing asn1crypto-1.4.0-py2.py3-none-any.whl to /usr/lib/python3.9/site-packages
Adding asn1crypto 1.4.0 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/asn1crypto-1.4.0-py3.9.egg
Searching for cffi==1.14.6
Best match: cffi 1.14.6
Adding cffi 1.14.6 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for pycparser==2.20
Best match: pycparser 2.20
Adding pycparser 2.20 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Finished processing dependencies for coincurve==15.0.1
`

I changed the flags in the setup.py file from the coincurve pip directory to match the flags from the electrum repo and had to add a -m64 to my CFLAG.

Anyhow, this likely was a different issue than @ofek ... but the steps to troubleshoot should be the same.

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

3 participants