www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Missing Template Symbols

reply Andrew Wiley <wiley.andrew.j gmail.com> writes:
I've tried to start building my project with xfbuild today (running
everything through DMD was finally starting to get slow), and every so
often, Optlink dies with something like this:
OPTLINK (R) for Win32  Release 8.00.8
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
.objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y83__T6_spawnTOC9dinecraft5world7backen=C3=BFd12W=E2=
=82=AC=E2=80=9E=E2=80=94B=E2=82=AC=E2=80=A0=C5=BDTS=E2=82=AC=E2=80=98=C3=90=
3TidZ=E2=82=AC=E2=80=A1=C3=90FbPF=E2=82=AC=C2=B0=C3=93=E2=82=AC=E2=80=94=C3=
=92v=E2=82=AC=C3=87=C3=88=E2=82=AC=E2=80=93=E2=80=94
.objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y59__T5_sendTOC9dinecraft5world7back=E2=82=AC=C6=92=
=E2=80=BA6bridge13ChunkResponseZ=E2=82=AC=E2=80=A0=C2=B8FS=E2=82=AC=E2=80=
=98=C3=963Tid=E2=82=AC=C2=B1=C3=8Ev
.objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y60__T5_sendTOC9dinecraft5world7back=E2=82=AC=C6=92=
=E2=80=BA6bridge14PlayerResponseZ=E2=82=AC=E2=80=A0=C2=B9FS=E2=82=AC=E2=80=
=98=C3=973Tid=E2=82=AC=C2=B2=C3=8Fv
.objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
 Error 42: Symbol Undefined
_D3std11concurrency262__T8checkopsTDFOC9dinecraft6global11StopMessageZvTDFO=
C9dinecraft5world7bac16BA63AB4F5238EB56B8A073CCF850BC
.objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
 Error 42: Symbol Undefined
_D3std11concurrency10MessageBox257__T3getTDFOC9dinecraft6global11StopMessag=
eZvTDFOC9dinecraft5wo153D92039F751A809C20E14F769954BC
.objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y75__T6_spawnTOC9dinecraft5world3gen8=E2=82=AC=E2=80=
=A6=C5=A0=E2=82=AC=E2=80=9E=E2=80=B0W=E2=82=AC=E2=80=9E=E2=80=B0GenTS=E2=82=
=AC=E2=80=98=C3=883TidZ=E2=82=AC=E2=80=A1=C3=88FbPF=E2=82=AC=C2=A8=C3=8B=E2=
=82=AC=E2=80=94=C3=8Av=E2=82=AC=C2=BF=C3=80=E2=82=AC=E2=80=93=E2=80=94
.objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
 Error 42: Symbol Undefined
_D3std4conv62__T6toImplTAyaTC9dinecraft5world7backend6bridge12ChunkRequestZ=
=E2=82=AC=E2=80=A1=C2=BBF=E2=82=AC=C2=AE=C2=B7x=E2=82=AC=C6=92=C3=AAZ=C3=9A
.objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y102__T8checkopsTDFOC9dinecraft5world7backend6bridge1=
2ChunkRequestZv=E2=82=AC=EF=BF=BD=C2=B46global11StopMessageZvZ=E2=82=AC=E2=
=80=B0=C3=A3F=E2=82=AC=C2=B3=C3=A3=E2=82=AC=C2=A5=C3=A2v
.objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
 Error 42: Symbol Undefined
_D3std11concurre=C3=A9y10MessageBox97__T3getTDFOC9dinecraft5world7backend6b=
ridge12ChunkRequestZv=E2=82=AC=EF=BF=BD=C2=B46global11Stop=E2=82=AC=E2=80=
=A1=C3=A3ZvZ=E2=82=AC=E2=80=9E=C3=9EMF=E2=82=AC=C2=B3=C3=9F=E2=82=AC=C2=A5=
=C3=9Eb

To me, this looks like I'm somehow missing template implementations. When I
delete all the object files and build again, everything generally works. Is
there any reason this happens and/or a way to fix it?
Apr 26 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-04-27 05:58, Andrew Wiley wrote:
 I've tried to start building my project with xfbuild today (running
 everything through DMD was finally starting to get slow), and every so
 often, Optlink dies with something like this:
 OPTLINK (R) for Win32  Release 8.00.8
 Copyright (C) Digital Mars 1989-2010  All rights reserved.
 http://www.digitalmars.com/ctg/optlink.html
 .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
   Error 42: Symbol Undefined
 _D3std11concurreéy83__T6_spawnTOC9dinecraft5world7backenÿd12W€„—B€†ŽTS€‘Ð3TidZ€‡ÐFbPF€°Ó€—Òv€ÇÈ€–—
 .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
   Error 42: Symbol Undefined
 _D3std11concurreéy59__T5_sendTOC9dinecraft5world7back€ƒ›6bridge13ChunkResponseZ€†¸FS€‘Ö3Tid€±Îv
 .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
   Error 42: Symbol Undefined
 _D3std11concurreéy60__T5_sendTOC9dinecraft5world7back€ƒ›6bridge14PlayerResponseZ€†¹FS€‘×3Tid€²Ïv
 .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
   Error 42: Symbol Undefined
 _D3std11concurrency262__T8checkopsTDFOC9dinecraft6global11StopMessageZvTDFOC9dinecraft5world7bac16BA63AB4F5238EB56B8A073CCF850BC
 .objs\dinecraft-world-backend-backend.obj(dinecraft-world-backend-backend)
   Error 42: Symbol Undefined
 _D3std11concurrency10MessageBox257__T3getTDFOC9dinecraft6global11StopMessageZvTDFOC9dinecraft5wo153D92039F751A809C20E14F769954BC
 .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
   Error 42: Symbol Undefined
 _D3std11concurreéy75__T6_spawnTOC9dinecraft5world3gen8€…Š€„‰W€„‰GenTS€‘È3TidZ€‡ÈFbPF€¨Ë€—Êv€¿À€–—
 .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
   Error 42: Symbol Undefined
 _D3std4conv62__T6toImplTAyaTC9dinecraft5world7backend6bridge12ChunkRequestZ€‡»F€®·x€ƒêZÚ
 .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
   Error 42: Symbol Undefined
 _D3std11concurreéy102__T8checkopsTDFOC9dinecraft5world7backend6bridge12ChunkRequestZv€�´6global11StopMessageZvZ€‰ãF€³ã€¥âv
 .objs\dinecraft-world-gen-worldgen.obj(dinecraft-world-gen-worldgen)
   Error 42: Symbol Undefined
 _D3std11concurreéy10MessageBox97__T3getTDFOC9dinecraft5world7backend6bridge12ChunkRequestZv€�´6global11Stop€‡ãZvZ€„ÞMF€³ß€¥Þb

 To me, this looks like I'm somehow missing template implementations.
 When I delete all the object files and build again, everything generally
 works. Is there any reason this happens and/or a way to fix it?
I think this is because DMD only output templates to one object file instead of to all object files. In addition to that there's now way to tell DMD or know in which object file it will output the templates. I think Walter has said that DMD will output templates to all object files if you compile with the -lib switch. You can try and see if you can modify xfbuild to use the -lib switch. -- /Jacob Carlborg
Apr 27 2011
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 27/04/2011 09:59, Jacob Carlborg wrote:
 I think this is because DMD only output templates to one object file
 instead of to all object files. In addition to that there's now way to
 tell DMD or know in which object file it will output the templates.

 I think Walter has said that DMD will output templates to all object
 files if you compile with the -lib switch. You can try and see if you
 can modify xfbuild to use the -lib switch.
What was Walter's reasoning for this? Would he be willing to accept a pull request for a command line switch to output templates to all object files for situations like these? -- Robert http://octarineparrot.com/
Apr 27 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-04-27 15:24, Robert Clipsham wrote:
 On 27/04/2011 09:59, Jacob Carlborg wrote:
 I think this is because DMD only output templates to one object file
 instead of to all object files. In addition to that there's now way to
 tell DMD or know in which object file it will output the templates.

 I think Walter has said that DMD will output templates to all object
 files if you compile with the -lib switch. You can try and see if you
 can modify xfbuild to use the -lib switch.
What was Walter's reasoning for this? Would he be willing to accept a pull request for a command line switch to output templates to all object files for situations like these?
I have no idea if he will accept a pull request for this. I think it would be great if DMD had a switch like that. This would make it easier to build an incremental build tool. Also pull request 11 would help a lot: https://github.com/D-Programming-Language/dmd/pull/11 -- /Jacob Carlborg
Apr 27 2011