Weird Link Error

freeman freeman at no-one.com
Thu Sep 20 07:37:15 PDT 2012


I started seeing these same errors after installing 2.6.  Perhaps
it is a linker problem tied to some conf file (in debian or dmd)?
The crude solution that works for me is to delete / re-establish
soft-linked libraries.

On Thursday, 20 September 2012 at 13:08:19 UTC, Daniel wrote:
> I have searched everywhere and I can't find anything so I 
> decided to come here. I have a simple Hello World program in 
> the file Test.d, it compiles just fine but when I try this...
>
> [daniel at arch D]$ dmd Test.o
> /usr/lib/libphobos2.a(dmain2_459_1a5.o): In function 
> `_D2rt6dmain24mainUiPPaZi7runMainMFZv':
> (.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined 
> reference to `_Dmain'
> /usr/lib/libphobos2.a(deh2_43b_525.o): In function 
> `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable':
> (.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): 
> undefined reference to `_deh_beg'
> /usr/lib/libphobos2.a(deh2_43b_525.o): In function 
> `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable':
> (.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): 
> undefined reference to `_deh_beg'
> /usr/lib/libphobos2.a(deh2_43b_525.o): In function 
> `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable':
> (.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): 
> undefined reference to `_deh_end'
> /usr/lib/libphobos2.a(deh2_43b_525.o): In function 
> `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable':
> (.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): 
> undefined reference to `_deh_end'
> /usr/lib/libphobos2.a(thread_18f_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): 
> undefined reference to `_tlsend'
> /usr/lib/libphobos2.a(thread_18f_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): 
> undefined reference to `_tlsstart'
> /usr/lib/libphobos2.a(thread_19f_6e4.o): In function 
> `thread_attachThis':
> (.text.thread_attachThis+0xb7): undefined reference to 
> `_tlsstart'
> /usr/lib/libphobos2.a(thread_19f_6e4.o): In function 
> `thread_attachThis':
> (.text.thread_attachThis+0xbc): undefined reference to `_tlsend'
> /usr/lib/libphobos2.a(thread_17d_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): 
> undefined reference to `_tlsend'
> /usr/lib/libphobos2.a(thread_17d_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): 
> undefined reference to `_tlsstart'
> /usr/lib/libphobos2.a(thread_17e_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): 
> undefined reference to `_tlsend'
> /usr/lib/libphobos2.a(thread_17e_1b8.o): In function 
> `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread':
> (.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): 
> undefined reference to `_tlsstart'
> /usr/lib/libphobos2.a(thread_17a_713.o): In function 
> `thread_entryPoint':
> (.text.thread_entryPoint+0x64): undefined reference to `_tlsend'
> /usr/lib/libphobos2.a(thread_17a_713.o): In function 
> `thread_entryPoint':
> (.text.thread_entryPoint+0x6a): undefined reference to 
> `_tlsstart'
> collect2: error: ld returned 1 exit status
> --- errorlevel 1
>
> I would try to solve the problem myself, except that I have no 
> clue wtf this means.




More information about the Digitalmars-d mailing list