mir-core icon indicating copy to clipboard operation
mir-core copied to clipboard

linker error in algebraic.d / mir.format

Open WebFreak001 opened this issue 3 years ago • 4 comments

just encountered this, going to look into what I can do against this right now.

raw linker output:

ld: error: undefined symbol: _D3mir6format__T5printTaTSQy8appender__T12ScopedBufferTaVmi4096ZQyTSQCo9algebraic__T9AlgebraicTSQDq15algebraic_alias4json5Json_ZQBsZQEmFNbMKQElMAxSQFpQDb__TQCuTQCnZQDcZv
>>> referenced by algebraic.d:1600 (../../.dub/packages/mir-core-1.3.6/mir-core/source/mir/algebraic.d:1600)
>>>               .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o:(_D3mir9algebraic__T9AlgebraicTSQBd15algebraic_alias4json5Json_ZQBs__T12toStringImplTASQDgQDf__TQCyTQCrZQDgTSQEc8appender__T12ScopedBufferTaVmi4096ZQyZQDdMxFNaNbNiNlNfMKQCjZ12__dgliteral2MFZv)
>>> did you mean: _D3mir6format__T5printTaTSQy8appender__T12ScopedBufferTaVmi4096ZQyTSQCo9algebraic__T9AlgebraicTSQDq15algebraic_alias4json5Json_ZQBsZQEmFNbMKQElMKxSQFpQDb__TQCuTQCnZQDcZv
>>> defined in: .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o

ddemangle:

ld: error: undefined symbol: nothrow void mir.format.print!(char, mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic).print(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, scope const(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic)[])
>>> referenced by algebraic.d:1600 (../../.dub/packages/mir-core-1.3.6/mir-core/source/mir/algebraic.d:1600)
>>>               .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o:(void mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic.toStringImpl!(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic[], mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer).toStringImpl(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer).__dgliteral2())
>>> did you mean: nothrow void mir.format.print!(char, mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic).print(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, scope ref const(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic))
>>> defined in: .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o
collect2: error: ld returned 1 exit status

project + commit: https://github.com/Pure-D/serve-d/tree/a757a32e301fd6fa7be5bdbf8b727066cab5b9e0

WebFreak001 avatar Sep 26 '22 14:09 WebFreak001

seems like some issue auto-inferring ref or not across compilation units

WebFreak001 avatar Sep 26 '22 14:09 WebFreak001

How it is compiled?

9il avatar Sep 26 '22 15:09 9il

just dub build

for my linked code there I was using the code at https://github.com/libmir/mir-ion/pull/22

WebFreak001 avatar Sep 27 '22 08:09 WebFreak001

Please provide a link to the CI log that demonstrates this issue.

9il avatar Sep 28 '22 05:09 9il