Chia-Network / bls-signatures

BLS signatures in C++, using the blst library for BLS12-381
Apache License 2.0
297 stars 212 forks source link

Compiler Error on centos 8 #224

Closed ferdiina closed 3 years ago

ferdiina commented 3 years ago

[ 97%] Building CXX object src/CMakeFiles/runbench.dir/test-bench.cpp.o [ 98%] Building CXX object python-bindings/CMakeFiles/blspy.dir/pythonbindings.cpp.o [ 98%] Building CXX object src/CMakeFiles/runtest.dir/test.cpp.o /usr/bin/ar: /usr/lib64/libgmp.so: File format not recognized gmake[2]: [src/CMakeFiles/combined_custom.dir/build.make:79: src/CMakeFiles/combined_custom] Error 1 gmake[1]: [CMakeFiles/Makefile2:255: src/CMakeFiles/combined_custom.dir/all] Error 2 gmake[1]: *** Waiting for unfinished jobs.... In file included from /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/pytypes.h:12, from /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/cast.h:13, from /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/attr.h:13, from /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/pybind11.h:45, from /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/operators.h:12, from /opt/bls-signatures/python-bindings/pythonbindings.cpp:15: /opt/bls-signatures/build/_deps/pybind11-src/include/pybind11/detail/common.h:124:10: fatal error: Python.h: No such file or directory

include

      ^~~~~~~~~~

compilation terminated. gmake[2]: [python-bindings/CMakeFiles/blspy.dir/build.make:82: python-bindings/CMakeFiles/blspy.dir/pythonbindings.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:393: python-bindings/CMakeFiles/blspy.dir/all] Error 2 [ 99%] Linking CXX executable runbench [ 99%] Built target runbench [100%] Linking CXX executable runtest [100%] Built target runtest gmake: *** [Makefile:149: all] Error 2

it's look /usr/bin/ar: /usr/lib64/libgmp.so issue . how can i fix it ?

hoffmang9 commented 3 years ago

You need to yum install python-devel or whichever python-devel package matches your local install.

lihat1992 commented 3 years ago

I have installed Python3-devel , but I still have this problem,Can you help me?

xorinox commented 3 years ago

Suggested a workaround in https://github.com/Chia-Network/bls-signatures/issues/225 might work for Centos 7/8 also.

emlowe commented 3 years ago

For centos8 you likely need to install the static GMP and libsodium libraries, as by default the build process will find and try to use the dynamic ones

sudo yum install libsodium-static gmp-static