JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
775 stars 545 forks source link

Error while compiling - "cannot find -lz" #138

Closed ghost closed 6 years ago

ghost commented 6 years ago

I downloaded the latest version of cpuminer-opt, v3.8.8, and attempted to compile the software on a DigitalOcean droplet. However, upon issuing the make command, I get this error:

/usr/bin/x86_64-linux-gnu-ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile:1850: recipe for target 'cpuminer' failed
make[2]: *** [cpuminer] Error 1
make[2]: Leaving directory '/root/cpuminer-opt-3.8.8'
Makefile:5713: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/cpuminer-opt-3.8.8'
Makefile:907: recipe for target 'all' failed
make: *** [all] Error 2

I had completed the ./autogen.sh and CFLAGS="-O3 -march=native -Wall" ./configure --with-curl steps, but it only throws an error when I attempt to compile.

Output of uname -a: Linux digital-ocean 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

CPU info from lshw:

description: CPU
product: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
vendor: Intel Corp.
physical id: 401
bus info: cpu@0
slot: CPU 1
size: 2GHz
capacity: 2GHz
width: 64 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp x86-64 constant_tsc arch_perfmon rep_good nopl cpuid pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt
JayDDee commented 6 years ago

Instal the missing zlib development package, it's in the instructions.

ghost commented 6 years ago

Your instructions were not clear enough. Including it in the sudo apt-get install command you instructed users to run would avoid issues like this in the future.