Opened 14 months ago

Last modified 14 months ago

#67057 new defect

Unable to install CPUMiner through MacPorts

Reported by: Lucasking2023 Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: cpuminer

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I am unable to install CPUMiner on my mac through MacPorts https://ports.macports.org/port/cpuminer/.

The script gets to the following point:

--->  Fetching archive for cpuminer
--->  Attempting to fetch cpuminer-2.5.1_0.darwin_18.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/cpuminer
--->  Attempting to fetch cpuminer-2.5.1_0.darwin_18.x86_64.tbz2 from http://packages.macports.org/cpuminer
--->  Attempting to fetch cpuminer-2.5.1_0.darwin_18.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/cpuminer

All of the above locations result in 404.

Can you please update the above with validated locations? A few examples:

--> https://github.com/JayDDee/cpuminer-opt/releases
--> https://github.com/MultiPoolMiner/MultiPoolMiner/releases/tag/v3.5.5.1

Thank you!

Attachments (2)

main.log (247.9 KB) - added by Lucasking2023 14 months ago.
Export of the main.log
config.log (11.6 KB) - added by Lucasking2023 14 months ago.
Confi.log attached

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: CPUMiner removed
Port: cpuminer added
Priority: HighNormal

comment:2 in reply to:  description Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to Lucasking2023:

All of the above locations result in 404.

That is not a problem. When MacPorts fails to fetch an archive, it builds from source. If that fails for you, please attach the main.log file so we can investigate why.

Changed 14 months ago by Lucasking2023

Attachment: main.log added

Export of the main.log

comment:3 Changed 14 months ago by Lucasking2023

Thank you, ryandesign - appreciate the prompt reply. I have attached the main.log for your reference.

See below errors from the main.log...

Thank you in advance for any insight you can provide.

:info:configure Exit code: 77
:error:configure Failed to configure cpuminer: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_cpuminer/cpuminer/work/cpuminer-2.5.1/config.log
:error:configure Failed to configure cpuminer: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_cpuminer/cpuminer/main.log for details.
Last edited 14 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_cpuminer/cpuminer/work/cpuminer-2.5.1" && ./configure --prefix=/opt/local
Exit code: 77
Failed to configure cpuminer: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_cpuminer/cpuminer/work/cpuminer-2.5.1/config.log

The main.log basically says we need to look in the config.log to see what the problem is, so please attach that as well.

Last edited 14 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 14 months ago by Lucasking2023

Attachment: config.log added

Confi.log attached

comment:5 Changed 14 months ago by Lucasking2023

Thank you for responding again so quickly. I have attached the config.log for your review as well. From what I can see, there were 4 warnings and 4 errors generated:

configure:4162: $? = 1
configure:4169: ./conftest
./configure: line 4171: ./conftest: No such file or directory
configure:4173: $? = 127
configure:4180: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_finance_cpuminer/cpuminer/work/cpuminer-2.5.1':
configure:4182: error: cannot run C compiled programs.

Apologies for all my noob questions!

Last edited 14 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 in reply to:  5 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to Lucasking2023:

configure:4182: error: cannot run C compiled programs.

Right, we knew from the main.log that this was the problem, but we needed the config.log to see why this was the problem. And the config.log tells us this test is failing because:

conftest.c:15:1: error: use of undeclared identifier 'FILE'
FILE *f = fopen ("conftest.out", "w");
^
conftest.c:15:11: warning: implicit declaration of function 'fopen' is invalid in C99 [-Wimplicit-function-declaration]
FILE *f = fopen ("conftest.out", "w");
          ^
conftest.c:15:11: warning: declaration of built-in function 'fopen' requires inclusion of the header <stdio.h> [-Wbuiltin-requires-header]
conftest.c:16:9: warning: implicit declaration of function 'ferror' is invalid in C99 [-Wimplicit-function-declaration]
 return ferror (f) || fclose (f) != 0;
        ^
conftest.c:16:23: warning: implicit declaration of function 'fclose' is invalid in C99 [-Wimplicit-function-declaration]
 return ferror (f) || fclose (f) != 0;
                      ^

These are some pretty basic things to be failing. FILE is the standard variable type for dealing with files. fopen, ferror, fclose are standard functions for dealing with files. If they're not there, something is wrong with your compiler setup (such as the standard headers are corrupted or aren't there at all).

The warning that <stdio.h> must be included seems promising at first, but if we look at the code in the configure script we see that it is already being included:

#include <stdio.h>
int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}

So we must look elsewhere for the culprit.

I see this at the top of your main.log:

version:1
:debug:main Starting logging for cpuminer @2.5.1_0
:debug:sysinfo macOS 10.14.6 (darwin/18.7.0) arch i386
:debug:sysinfo MacPorts 2.7.1
:debug:sysinfo Xcode none
:debug:sysinfo SDK 10.14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.14
:error:main Port cpuminer requires a full Xcode installation, which was not found on your system.
:error:main You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/
version:1
:debug:main Starting logging for cpuminer @2.5.1_0
:debug:sysinfo macOS 10.14.6 (darwin/18.7.0) arch i386
:debug:sysinfo MacPorts 2.8.1
:debug:sysinfo Xcode none, CLT 10.3.0.0.1.1562985497
:debug:sysinfo SDK 10.14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.14

This tells us you initially tried to install cpuminer while running MacPorts 2.7.1 and it failed saying this port requires Xcode to be installed. That's not actually true, but I think MacPorts base might erroneously say that if the command line tools aren't installed or aren't working properly.

You then upgraded to MacPorts 2.8.1 and retried the installation. MacPorts 2.8 now prints the command line tools version in the log and it claims you have CLT 10.3 installed but that information just comes from the installation receipt. It's possible for the command line tools to have been damaged or removed without the receipt having been affected.

I'd try reinstalling the command line tools. 10.3 is a perfectly reasonable version to use on macOS 10.14; you can get the installer here:

https://developer.apple.com/download/all/?q=command%20line%20tools%2010.3

Note: See TracTickets for help on using tickets.