Skip to content

Linux Build Error "unknown type name SC_HANDLE" on Ubuntu 20.04 #10

@cniweb

Description

@cniweb

On a Ubuntu 20.04 system:

gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

I get an error:

make  all-recursive
make[1]: Entering directory '/opt/rx2-cpuminer'
Making all in compat
make[2]: Entering directory '/opt/rx2-cpuminer/compat'
Making all in bos-jansson
make[3]: Entering directory '/opt/rx2-cpuminer/compat/bos-jansson'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/rx2-cpuminer/compat/bos-jansson'
make[3]: Entering directory '/opt/rx2-cpuminer/compat'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/opt/rx2-cpuminer/compat'
make[2]: Leaving directory '/opt/rx2-cpuminer/compat'
make[2]: Entering directory '/opt/rx2-cpuminer'
gcc -DHAVE_CONFIG_H -I.  -static -fno-strict-aliasing -std=gnu++11  -Iyes/include -Iyes/include -fno-strict-aliasing -I./compat/bos-jansson -I. -Iyes/include -Iyes/include -static -Wno-pointer-sign -Wno-pointer-to-int-cast  -g   -march=native  -Iyes/include -Iyes/include -MT cpuminer-cpu-miner.o -MD -MP -MF .deps/cpuminer-cpu-miner.Tpo -c -o cpuminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
cc1: warning: command line option ‘-std=gnu++11’ is valid for C++/ObjC++ but not for C
In file included from cpu-miner.c:40:
/usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
   21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
      |  ^~~~~~~
In file included from cpu-miner.c:48:
miner.h:409:8: error: unknown type name ‘SC_HANDLE’
  409 | static SC_HANDLE hManager;
      |        ^~~~~~~~~
miner.h:410:8: error: unknown type name ‘SC_HANDLE’
  410 | static SC_HANDLE hService;
      |        ^~~~~~~~~
miner.h:411:8: error: unknown type name ‘HANDLE’
  411 | static HANDLE hDriver;
      |        ^~~~~~
make[2]: *** [Makefile:1563: cpuminer-cpu-miner.o] Error 1
make[2]: Leaving directory '/opt/rx2-cpuminer'
make[1]: *** [Makefile:3462: all-recursive] Error 1
make[1]: Leaving directory '/opt/rx2-cpuminer'
make: *** [Makefile:782: all] Error 2

What can I do against it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions