Skip to content

/usr/bin/ld: sgminer-api.o:(.bss+0xe0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here #521

@yhilg

Description

@yhilg

Trying to build on Debian 12 and it's dying at make

/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-marucoin.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/marucoin.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/marucoin.c:114:41: warning: ‘base_contexts’ is static but used in inline function ‘maruhash’ which is not static
  114 |     memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                                         ^~~~~~~~~~~~~
algorithm/marucoin.c:114:19: warning: ‘base_contexts’ is static but used in inline function ‘maruhash’ which is not static
  114 |     memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                   ^~~~~~~~~~~~~
  CC       algorithm/sgminer-maxcoin.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/maxcoin.c:2:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-talkcoin.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/talkcoin.c:28:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/talkcoin.c:86:39: warning: ‘base_contexts’ is static but used in inline function ‘talkhash’ which is not static
   86 |   memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                                       ^~~~~~~~~~~~~
algorithm/talkcoin.c:86:17: warning: ‘base_contexts’ is static but used in inline function ‘talkhash’ which is not static
   86 |   memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                 ^~~~~~~~~~~~~
  CC       algorithm/sgminer-bitblock.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/bitblock.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/bitblock.c:120:41: warning: ‘base_contexts’ is static but used in inline function ‘bitblockhash’ which is not static
  120 |     memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                                         ^~~~~~~~~~~~~
algorithm/bitblock.c:120:19: warning: ‘base_contexts’ is static but used in inline function ‘bitblockhash’ which is not static
  120 |     memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                   ^~~~~~~~~~~~~
  CC       algorithm/sgminer-x14.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/x14.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/x14.c:115:39: warning: ‘base_contexts’ is static but used in inline function ‘x14hash’ which is not static
  115 |   memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                                       ^~~~~~~~~~~~~
algorithm/x14.c:115:17: warning: ‘base_contexts’ is static but used in inline function ‘x14hash’ which is not static
  115 |   memcpy(&ctx, &base_contexts, sizeof(base_contexts));
      |                 ^~~~~~~~~~~~~
  CC       algorithm/sgminer-fresh.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/fresh.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/fresh.c: In function ‘fresh_regenhash’:
algorithm/fresh.c:141:9: warning: unused variable ‘scratchbuf’ [-Wunused-variable]
  141 |   char *scratchbuf;
      |         ^~~~~~~~~~
algorithm/fresh.c: In function ‘scanhash_fresh’:
algorithm/fresh.c:156:9: warning: unused variable ‘scratchbuf’ [-Wunused-variable]
  156 |   char *scratchbuf;
      |         ^~~~~~~~~~
  CC       algorithm/sgminer-whirlcoin.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/whirlcoin.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-neoscrypt.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/neoscrypt.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-whirlpoolx.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/whirlpoolx.c:31:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-lyra2re.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/lyra2re.c:29:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
  CC       algorithm/sgminer-lyra2.o
  CC       algorithm/sgminer-sponge.o
  CC       algorithm/sgminer-pluck.o
In file included from /usr/include/CL/cl.h:20,
                 from ./algorithm.h:7,
                 from ./miner.h:6,
                 from algorithm/pluck.c:29:
/usr/include/CL/cl_version.h:22:9: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |         ^~~~~~~
algorithm/pluck.c: In function ‘pluckrehash’:
algorithm/pluck.c:341:19: warning: unused variable ‘scratchbuf’ [-Wunused-variable]
  341 |         uint8_t * scratchbuf = (uint8_t*)malloc(HASH_MEMORY);
      |                   ^~~~~~~~~~
algorithm/pluck.c: At top level:
algorithm/pluck.c:386:17: warning: ‘xor_salsa8’ is static but used in inline function ‘pluckrehash’ which is not static
  386 |                 xor_salsa8(randbuffer, randseed);
      |                 ^~~~~~~~~~
algorithm/pluck.c:365:17: warning: ‘xor_salsa8’ is static but used in inline function ‘pluckrehash’ which is not static
  365 |                 xor_salsa8(randbuffer, randseed);
      |                 ^~~~~~~~~~
  CCLD     sgminer
/usr/bin/ld: sgminer-api.o:(.bss+0xe0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-util.o:(.bss+0x20): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-logging.o:(.bss+0x20): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-driver-opencl.o:(.data.rel.local+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-ocl.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-findnonce.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-pool.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-algorithm.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-config_parser.o:(.bss+0x180): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: sgminer-events.o:(.bss+0x20): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: ocl/sgminer-build_kernel.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: ocl/sgminer-binary_kernel.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-scrypt.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-darkcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-qubitcoin.o:(.bss+0x480): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-quarkcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-myriadcoin-groestl.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-fuguecoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-inkcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-animecoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-groestlcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-sifcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-twecoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-marucoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-maxcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-talkcoin.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-bitblock.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-x14.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-fresh.o:(.bss+0x0): multiple definition of `base_contexts'; algorithm/sgminer-qubitcoin.o:(.bss+0x0): first defined here
/usr/bin/ld: algorithm/sgminer-fresh.o:(.bss+0x600): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-whirlcoin.o:(.bss+0x0): multiple definition of `base_contexts'; algorithm/sgminer-qubitcoin.o:(.bss+0x0): first defined here
/usr/bin/ld: algorithm/sgminer-whirlcoin.o:(.bss+0x220): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-neoscrypt.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-whirlpoolx.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-lyra2re.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-pluck.o:(.bss+0x0): multiple definition of `opencl_drv'; sgminer-sgminer.o:(.bss+0x16e0): first defined here
/usr/bin/ld: algorithm/sgminer-qubitcoin.o: in function `qubitcoin_test':
qubitcoin.c:(.text+0x7c): undefined reference to `qhash'
/usr/bin/ld: algorithm/sgminer-qubitcoin.o: in function `qubitcoin_regenhash':
qubitcoin.c:(.text+0xef): undefined reference to `qhash'
/usr/bin/ld: algorithm/sgminer-qubitcoin.o: in function `scanhash_qubitcoin':
qubitcoin.c:(.text+0x162): undefined reference to `qhash'
/usr/bin/ld: algorithm/sgminer-quarkcoin.o: in function `quarkcoin_test':
quarkcoin.c:(.text+0x2c): undefined reference to `quarkhash'
/usr/bin/ld: algorithm/sgminer-quarkcoin.o: in function `quarkcoin_regenhash':
quarkcoin.c:(.text+0x9f): undefined reference to `quarkhash'
/usr/bin/ld: algorithm/sgminer-quarkcoin.o: in function `scanhash_quarkcoin':
quarkcoin.c:(.text+0x112): undefined reference to `quarkhash'
/usr/bin/ld: algorithm/sgminer-animecoin.o: in function `animecoin_test':
animecoin.c:(.text+0x2c): undefined reference to `animehash'
/usr/bin/ld: algorithm/sgminer-animecoin.o: in function `animecoin_regenhash':
animecoin.c:(.text+0x9f): undefined reference to `animehash'
/usr/bin/ld: algorithm/sgminer-animecoin.o: in function `scanhash_animecoin':
animecoin.c:(.text+0x112): undefined reference to `animehash'
/usr/bin/ld: algorithm/sgminer-sifcoin.o: in function `sifcoin_test':
sifcoin.c:(.text+0x2c): undefined reference to `sifhash'
/usr/bin/ld: algorithm/sgminer-sifcoin.o: in function `sifcoin_regenhash':
sifcoin.c:(.text+0x9f): undefined reference to `sifhash'
/usr/bin/ld: algorithm/sgminer-sifcoin.o: in function `scanhash_sifcoin':
sifcoin.c:(.text+0x112): undefined reference to `sifhash'
/usr/bin/ld: algorithm/sgminer-twecoin.o: in function `twecoin_test':
twecoin.c:(.text+0x2c): undefined reference to `twehash'
/usr/bin/ld: algorithm/sgminer-twecoin.o: in function `twecoin_regenhash':
twecoin.c:(.text+0x9f): undefined reference to `twehash'
/usr/bin/ld: algorithm/sgminer-twecoin.o: in function `scanhash_twecoin':
twecoin.c:(.text+0x112): undefined reference to `twehash'
/usr/bin/ld: algorithm/sgminer-marucoin.o: in function `marucoin_test':
marucoin.c:(.text+0xdc): undefined reference to `maruhash'
/usr/bin/ld: algorithm/sgminer-marucoin.o: in function `marucoin_regenhash':
marucoin.c:(.text+0x14f): undefined reference to `maruhash'
/usr/bin/ld: algorithm/sgminer-marucoin.o: in function `scanhash_marucoin':
marucoin.c:(.text+0x1c2): undefined reference to `maruhash'
/usr/bin/ld: algorithm/sgminer-talkcoin.o: in function `talkcoin_test':
talkcoin.c:(.text+0x7c): undefined reference to `talkhash'
/usr/bin/ld: algorithm/sgminer-talkcoin.o: in function `talkcoin_regenhash':
talkcoin.c:(.text+0xef): undefined reference to `talkhash'
/usr/bin/ld: algorithm/sgminer-talkcoin.o: in function `scanhash_talkcoin':
talkcoin.c:(.text+0x162): undefined reference to `talkhash'
/usr/bin/ld: algorithm/sgminer-bitblock.o: in function `bitblock_test':
bitblock.c:(.text+0xec): undefined reference to `bitblockhash'
/usr/bin/ld: algorithm/sgminer-bitblock.o: in function `bitblock_regenhash':
bitblock.c:(.text+0x15f): undefined reference to `bitblockhash'
/usr/bin/ld: algorithm/sgminer-bitblock.o: in function `scanhash_bitblock':
bitblock.c:(.text+0x1d2): undefined reference to `bitblockhash'
/usr/bin/ld: algorithm/sgminer-x14.o: in function `x14_test':
x14.c:(.text+0xdc): undefined reference to `x14hash'
/usr/bin/ld: algorithm/sgminer-x14.o: in function `x14_regenhash':
x14.c:(.text+0x14f): undefined reference to `x14hash'
/usr/bin/ld: algorithm/sgminer-x14.o: in function `scanhash_x14':
x14.c:(.text+0x1c2): undefined reference to `x14hash'
/usr/bin/ld: algorithm/sgminer-fresh.o: in function `fresh_test':
fresh.c:(.text+0x7c): undefined reference to `freshHash'
/usr/bin/ld: algorithm/sgminer-fresh.o: in function `fresh_regenhash':
fresh.c:(.text+0xef): undefined reference to `freshHash'
/usr/bin/ld: algorithm/sgminer-fresh.o: in function `scanhash_fresh':
fresh.c:(.text+0x162): undefined reference to `freshHash'
/usr/bin/ld: algorithm/sgminer-lyra2re.o: in function `lyra2re_regenhash':
lyra2re.c:(.text+0x1af): undefined reference to `lyra2rehash'
/usr/bin/ld: algorithm/sgminer-pluck.o: in function `pluck_test':
pluck.c:(.text+0x24cc): undefined reference to `pluckrehash'
/usr/bin/ld: algorithm/sgminer-pluck.o: in function `pluck_regenhash':
pluck.c:(.text+0x253f): undefined reference to `pluckrehash'
/usr/bin/ld: algorithm/sgminer-pluck.o: in function `scanhash_pluck':
pluck.c:(.text+0x25b2): undefined reference to `pluckrehash'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:840: sgminer] Error 1
make[2]: Leaving directory '/opt/crypto/sgminer'
make[1]: *** [Makefile:1502: all-recursive] Error 1
make[1]: Leaving directory '/opt/crypto/sgminer'
make: *** [Makefile:672: all] Error 2
# uname -r
6.1.0-18-amd64
#

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