madMAx43v3r / chia-plotter

Apache License 2.0
2.27k stars 662 forks source link

Latest master fails build on macOS #784

Closed afxwin closed 3 years ago

afxwin commented 3 years ago

macOS version - 11.4

Followed the instructions under the macOS section in https://github.com/madMAx43v3r/chia-plotter#install

The ./make_devel.sh fails with below error:

[ 99%] Linking CXX executable chia_plot
clang: warning: argument unused during compilation: '-fmax-errors=1' [-Wunused-command-line-argument]
ld: library not found for -lgmp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [chia_plot] Error 1
make[1]: *** [CMakeFiles/chia_plot.dir/all] Error 2
make: *** [all] Error 2

Double checked that the gmp lib is installed:

Warning: gmp 6.2.1 is already installed and up-to-date.
To reinstall 6.2.1, run:
  brew reinstall gmp
madMAx43v3r commented 3 years ago

hm I don't think it needs gmp anymore, can you try a fresh clone?

afxwin commented 3 years ago

Tried a couple of times with the fresh clone. Deleted the old folder chia-plotter and did the fresh clone:

git clone https://github.com/madMAx43v3r/chia-plotter.git 
cd chia-plotter
git submodule update --init
./make_devel.sh

Still no joy with the same linking error at the end of the build. Below are the versions of Xcode, gcc and clang if it helps further troubleshooting

admin@admins-MacBook-Pro ~ % xcodebuild -version
Xcode 12.5
Build version 12E262
admin@admins-MacBook-Pro ~ % xcode-select -p
/Applications/Xcode.app/Contents/Developer
admin@admins-MacBook-Pro ~ % gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
admin@admins-MacBook-Pro ~ % llvm-gcc -v
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
admin@admins-MacBook-Pro ~ % clang -v
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
afxwin commented 3 years ago

Note - I was able to build and plot until I updated to the latest code.

afxwin commented 3 years ago

Removing the existing gmp lib on the machine fixes the issue. Please add this to the installation guide.

madMAx43v3r commented 3 years ago

Removing the existing gmp lib on the machine fixes the issue. Please add this to the installation guide.

Can you make a PR? I don't know the command to do that...

hoondy commented 3 years ago

Removing the existing gmp lib on the machine fixes the issue. Please add this to the installation guide.

Can you make a PR? I don't know the command to do that...

brew unlink gmp