c++ - Error linking with CUDA code: multiple definitions of `__cudaRegisterLinkedBinary_ -
i have cuda code i'm compiling .a library, , (cuda-related) regular-c++ code app uses it. undergoing intermediate linking.
now, on 1 machine (with cuda 8.0 rc) build succeeds, on machine (with maxwell rather kepler card, in case matters) get:
/tmp/tmpxft_00001796_00000000-2_ktkernels_intermediate_link.reg.c:25: multiple definition of `__cudaregisterlinkedbinary_66_tmpxft_00007a5f_00000000_16_cuda_device_runtime_compute_52_cpp1_ii_8b1a5d37' cmakefiles/tester.dir/tester_intermediate_link.o:/tmp/tmpxft_0000180b_00000000-2_tester_intermediate_link.reg.c:4: first defined here collect2: error: ld returned 1 exit status cmakefiles/tester.dir/build.make:1766: recipe target 'bin/tester' failed make[2]: *** [bin/tester] error 1
i started removing files what's compiled binary makes calls library code - , if remove of them linking succeed.
my questions:
- under circumstances possible such inconsistent behavior occur?
- can possibly result of "second linking" both library , binary?
- what can determine in conflict (e.g. symbols in )?
- if nothing conflicting, should avoid this?
notes:
- on 1 machine i'm using cuda 7.5, on other machine it's cuda 8.0 rc.
- under circumstances possible such inconsistent behavior occur?
if attempt multiple device linkages within single application.
- can possibly result of "second linking" library , binary?
almost no doubt.
- what can determine in conflict (e.g. symbols in )?
the conflict multiple definitions of boilerplate runtime generated during device link phases , used load device code context runtime api.
- if nothing conflicting, should avoid this?
the conflicts real. , avoidance involves linking separately complied device code. beyond can't tell how fix because have chosen not tell doing.
Comments
Post a Comment