Shared lib support for Linux

Long Chang changlong at jkys.info
Tue Mar 22 19:33:40 PDT 2011


I install libc_pic ,  and got this error :

gcc -shared -o dmd_xtpl.so dmd_xtpl.o -fPIC -m64
-L/home/opt/usr/local/lib64 -lgdruntime
-lc_pic/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libc_pic.a(init-first.os):
In function `_init':
(.text+0x20): multiple definition of `_init'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crti.o:(.init+0x0):
first defined here
/usr/bin/ld: dmd_xtpl.so: version node not found for symbol
pthread_cond_destroy@@GLIBC_2.3.2
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status


On Tue, Mar 22, 2011 at 8:57 PM, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
> == Quote from Long Chang (changlong at jkys.info)'s article
>> Hello ,
>> The DMD will support shared lib for linux in future,  But I wan't to
>> know when this can be completed .
>> I am try use GDC build libgdruntime.a with -fPIC,  and catch some
>> error I can't fix it .
>> for example:
>> ../../../../libphobos/rt/arraybyte.d
>> ../../../../libphobos/rt/arraybyte.d: In function
>> ‘_arraySliceExpAddSliceAssign_g’:
>> ../../../../libphobos/rt/arraybyte.d:220: error: PIC register ‘ebx
>>>> clobbered in ‘asm’
>> If Druntime team can help GDC team fix this issue will be great .
>> Kind Regards / Long Chang
>
> Ignoring any bugs in Druntime and DMD regarding PIC code generation; GDC puts all
> used registers in any given asm statement in the clobbered list. Without this, GCC
> will not know of their usage, and so assumes the register(s) are free, therefore
> it may decide to use them for storing other data.
>
> Regards
>
>



-- 
.


More information about the Digitalmars-d mailing list