www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - undefined symbol: _D3std7variant...

reply Andrey <saasecondbox yandex.ru> writes:
Hello,
During compilation on linking stage I get strange errors (LDC):
lld-link: error: undefined symbol: 
_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh4typeMxFNbNdNeZC8TypeInfo
 referenced by E:\Programs\LDC2\import\std\variant.d:753
               
 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T4peekT
DhZQkMNgFNdZPNgAyu)                       referenced by
E:\Programs\LDC2\import\std\variant.d:753
               
 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T4peekTQ
wZQkMNgFNdZPNgAAyu)                      referenced by
E:\Programs\LDC2\import\std\variant.d:820
               
 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T3getTQEdZQjMNgFNdZNgSQFxQEs__TQEmTQEjTQEjZQEy)
How to solve? This is the first time when linking fails on Phobos library.
Oct 22 2019
parent reply Daniel Kozak <kozzi11 gmail.com> writes:
On Tue, Oct 22, 2019 at 2:20 PM Andrey via Digitalmars-d-learn
<digitalmars-d-learn puremagic.com> wrote:
 Hello,
 During compilation on linking stage I get strange errors (LDC):
 lld-link: error: undefined symbol:
 _D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh4typeMxFNbNdNeZC8TypeInfo
 referenced by E:\Programs\LDC2\import\std\variant.d:753

 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T4peekT
DhZQkMNgFNdZPNgAyu)                       referenced by
E:\Programs\LDC2\import\std\variant.d:753

 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T4peekTQ
wZQkMNgFNdZPNgAAyu)                      referenced by
E:\Programs\LDC2\import\std\variant.d:820

 .dub\obj\builder.obj:(_D3std7variant__T8VariantNVmi56TSQBf8typecons__T5TupleTAyuTSQCgQCf__TQCaVmi32TSQCzQBu__TQBoTAQBmTQBqZQCbTQnTQCbZQDrZQCqTQBcTQCrZQEh__T3getTQEdZQjMNgFNdZNgSQFxQEs__TQEmTQEjTQEjZQEy)
How to solve? This is the first time when linking fails on Phobos library.
Have you try to clean all caches? Try to remove .dub folder
Oct 22 2019
parent reply Andrey <saasecondbox yandex.ru> writes:
On Tuesday, 22 October 2019 at 12:57:45 UTC, Daniel Kozak wrote:
 Have you try to clean all caches? Try to remove .dub folder
I removed .dub folder but this error appears again.
Oct 22 2019
parent reply baz <b2.temp gmx.com> writes:
On Tuesday, 22 October 2019 at 13:07:54 UTC, Andrey wrote:
 On Tuesday, 22 October 2019 at 12:57:45 UTC, Daniel Kozak wrote:
 Have you try to clean all caches? Try to remove .dub folder
I removed .dub folder but this error appears again.
Try the "-allinst" option. It's possibly a bug with speculative template instantiation. "-allinst" deactivates speculation and everything is always instantiated and therefore present in the object files.
Oct 23 2019
parent Johan <j j.nl> writes:
On Wednesday, 23 October 2019 at 20:45:55 UTC, baz wrote:
 On Tuesday, 22 October 2019 at 13:07:54 UTC, Andrey wrote:
 On Tuesday, 22 October 2019 at 12:57:45 UTC, Daniel Kozak 
 wrote:
 Have you try to clean all caches? Try to remove .dub folder
I removed .dub folder but this error appears again.
Try the "-allinst" option. It's possibly a bug with speculative template instantiation. "-allinst" deactivates speculation and everything is always instantiated and therefore present in the object files.
If `-allinst` works, then please minimize the testcase and put it in our bugtracker. We know there are template culling problems but it only appears in very complex code. I have not been able to reduce it to less than a < 20k line problem across a ton of files... -Johan
Oct 23 2019