madMAx43v3r / chia-plotter

Apache License 2.0
2.28k stars 665 forks source link

[SOLVED] Centos 8: /usr/lib64/libgmp.so: File format not recognized #176

Closed ataa closed 3 years ago

ataa commented 3 years ago

When I run ./make_devel.sh on centos 8, I get this error:

[ 98%] Linking C static library ../lib/librelic_s.a
[ 98%] Built target relic_s
/usr/bin/ar: /usr/lib64/libgmp.so: File format not recognized
make[2]: *** [lib/bls-signatures/src/CMakeFiles/combined_custom.dir/build.make:73: lib/bls-signatures/src/CMakeFiles/combined_custom] Error 1
make[1]: *** [CMakeFiles/Makefile2:529: lib/bls-signatures/src/CMakeFiles/combined_custom.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 99%] Linking CXX executable test_phase_3
[ 99%] Built target test_phase_3
[ 99%] Linking CXX executable test_phase_1
[ 99%] Built target test_phase_1
make: *** [Makefile:136: all] Error 2

gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)

madMAx43v3r commented 3 years ago

See readme: sudo yum install cmake3 gmp-devel libsodium gmp-static libsodium-static -y

ataa commented 3 years ago

Thank you for your prompt response, Already tried that, but it seems those packages are for CentOS 7, On CentOS 8 I get:

# yum install cmake3 gmp-devel libsodium gmp-static libsodium-static
Last metadata expiration check: 1 day, 18:39:11 ago on Wed 09 Jun 2021 04:33:50 AM +04.
No match for argument: cmake3
Package gmp-devel-1:6.1.2-10.el8.x86_64 is already installed.
Package libsodium-1.0.18-2.el8.x86_64 is already installed.
No match for argument: gmp-static
Error: Unable to find a match: cmake3 gmp-static

cmake --version

cmake version 3.20.3

Hardcore-fs commented 3 years ago

did you add in the extended "yum" repositories?

ataa commented 3 years ago

Which repos are your referring too?

Hardcore-fs commented 3 years ago

Since i don't work with centos8 only 7.... Google is your friend.... bob2

ataa commented 3 years ago

Yes, I have Epel and Elrepo but gmp-static rpm for centos 8 is not available on any repo. I installed cmake manually but I don't know how to install gmp-static. The error "/usr/bin/ar: /usr/lib64/libgmp.so: File format not recognized" seems to be related to that missing package.

Hardcore-fs commented 3 years ago

ok so pull the git repository for that source & build from scratch. also note.... you can find an RPM package for another platform ubuntu and usually it will go in.

but centos8 is DEAD in the water.... everyone is abandoning it....

spencecopper commented 3 years ago

Jesus... why link to google thinking you are helping... Here is how to get it install on CentOS/RHEL/Rocky Linux 8 . You have to statically compile CMAKE and GMP



cd /tmp
wget https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3.tar.gz
tar -xvf cmake-3.20.3.tar.gz
cd cmake-3.20.3
./bootstrap 
make 
make install
sudo dnf install lzip -y 

cd /tmp
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz
tar -xvf gmp-6.2.1.tar.lz
cd gmp-6.2.1
./configure
make 
make install

echo PATH=$PATH:/usr/local/bin/ # for statically compiled cmake if not already in your PATH
ln -sf /usr/local/lib/libgmp.so.10.4.1 /usr/lib64/libgmp.so

git clone https://github.com/dendil/chia-plotter.git
cd chia-plotter
git submodule update --init
./make_devel.sh
madMAx43v3r commented 3 years ago

I disabled usage of GMP in latest master ./make_devel.sh, if it works I will disable in all make scripts.

madMAx43v3r commented 3 years ago

you have to uninstall libgmp-dev from system also

Hardcore-fs commented 3 years ago

Jesus... why link to google thinking you are helping... Here is how to get it install on CentOS/RHEL/Rocky Linux 8 . You have to statically compile CMAKE and GMP

Because...... i had to do the research for myself.... plus this is already covered in other threads, so people cannot even be bothered to read the other threads.

then you get people on here who cannot even be bothered to say thanks.... all they do is come into the forum with some sort of exotic build and expect others to give answers rather than standardizing their build to the group., all they care about is themselves.

ataa commented 3 years ago

Thank you, now that issue has been resolved, but I get different error now:

[ 99%] Building CXX object CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o
In file included from /home/ataa/chia-plotter/lib/bls-signatures/src/elements.hpp:22,
                 from /home/ataa/chia-plotter/lib/bls-signatures/src/privatekey.hpp:24,
                 from /home/ataa/chia-plotter/lib/bls-signatures/src/bls.hpp:18,
                 from /home/ataa/chia-plotter/src/chia_plot.cpp:15:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const uint8_t*, size_t)’:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp:62:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_ ’ {aka ‘long unsigned int’} [-Wsign-compare]
   62 |         for (int i=0; i < len; ++i)
      |                       ~~^~~~~
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const std::vector<unsigned char>&)’:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp:70:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   70 |         for (int i=0; i < data.size(); ++i)
      |                       ~~^~~~~~~~~~~~~
[100%] Linking CXX executable test_phase_3
[100%] Built target test_phase_3
[100%] Linking CXX executable test_phase_1
[100%] Built target test_phase_1
[100%] Linking CXX executable chia_plot
[100%] Built target chia_plot

Is it safe to ignore? the binary is working just fine. I will check the resulting plot with chia plots check and report back.

Thanks.

Hardcore-fs commented 3 years ago

lazy programmer... it needs a cast. ignore for now....

SebMoore commented 3 years ago

Thank you, now that issue has been resolved, but I get different error now:

[ 99%] Building CXX object CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o
In file included from /home/ataa/chia-plotter/lib/bls-signatures/src/elements.hpp:22,
                 from /home/ataa/chia-plotter/lib/bls-signatures/src/privatekey.hpp:24,
                 from /home/ataa/chia-plotter/lib/bls-signatures/src/bls.hpp:18,
                 from /home/ataa/chia-plotter/src/chia_plot.cpp:15:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const uint8_t*, size_t)’:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp:62:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_ ’ {aka ‘long unsigned int’} [-Wsign-compare]
   62 |         for (int i=0; i < len; ++i)
      |                       ~~^~~~~
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const std::vector<unsigned char>&)’:
/home/ataa/chia-plotter/lib/bls-signatures/src/util.hpp:70:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   70 |         for (int i=0; i < data.size(); ++i)
      |                       ~~^~~~~~~~~~~~~
[100%] Linking CXX executable test_phase_3
[100%] Built target test_phase_3
[100%] Linking CXX executable test_phase_1
[100%] Built target test_phase_1
[100%] Linking CXX executable chia_plot
[100%] Built target chia_plot

Is it safe to ignore? the binary is working just fine. I will check the resulting plot with chia plots check and report back.

Thanks.

Yes that should be fine to ignore. Everybody gets those warnings by the looks of it.

ataa commented 3 years ago

Thanks everyone, I managed to build the plotter on CentOS 8.3. Started the plotter last night, finished 20 Plots, all of them passed "chia plots check".