[MacPorts] #67057: Unable to install CPUMiner through MacPorts
MacPorts
noreply at macports.org
Wed Mar 8 08:20:04 UTC 2023
#67057: Unable to install CPUMiner through MacPorts
----------------------------+--------------------
Reporter: Lucasking2023 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: cpuminer |
----------------------------+--------------------
Comment (by ryandesign):
Replying to [comment:5 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
--
Ticket URL: <https://trac.macports.org/ticket/67057#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list