digitalmars.D.learn - SONAME and D
- bioinfornatics (6/6) Feb 23 2012 dear,
- Mike Wey (4/10) Feb 23 2012 dmd -L-soname=mylib.so.1
- bioinfornatics (4/16) Feb 23 2012 Thanks
- Jordi Sayol (6/25) Feb 24 2012 Are you able to build dynamic libraries directly with DMD?
- David (2/24) Feb 24 2012 -shared generate shared library
- Jordi Sayol (9/14) Feb 24 2012 I got this:
- Jordi Sayol (11/16) Feb 24 2012 It compiles to 32-bit but fails for 64-bit, maybe due to compiled libpho...
- Ellery Newcomer (4/5) Feb 24 2012 What? -shared works with 32-bit?
- Jordi Sayol (4/15) Feb 24 2012 better wait till libphobos2.a becomes libphobos2.so
- H. S. Teoh (10/11) Feb 24 2012 [...]
- Jordi Sayol (5/16) Feb 24 2012 I think that phobos should be a shared object too, but only when it has ...
- H. S. Teoh (13/21) Feb 24 2012 [...]
- bioinfornatics (7/29) Feb 26 2012 ldc build already phobos / druntime as shared lib with
- Mike Wey (7/23) Feb 24 2012 The GtkD Makefile uses:
- bioinfornatics (8/35) Feb 26 2012 :
- Mike Wey (7/40) Feb 26 2012 Well, i am able to build the GtkD shared libs for ldc2 with the current
- Jacob Carlborg (4/37) Feb 27 2012 Do the ldmd and gdmd wrapper scripts handle this?
- bioinfornatics (8/48) Feb 27 2012 rit :
- Mike Wey (10/54) Feb 27 2012 $ make shared-libs DC="ldc2"
- bioinfornatics (7/67) Feb 27 2012 =A9crit :
dear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?
Feb 23 2012
On 02/23/2012 05:27 PM, bioinfornatics wrote:dear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1 -- Mike Wey
Feb 23 2012
Le jeudi 23 f=C3=A9vrier 2012 =C3=A0 19:46 +0100, Mike Wey a =C3=A9crit :On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?=20 dmd -L-soname=3Dmylib.so.1 =20
Feb 23 2012
Al 23/02/12 20:29, En/na bioinfornatics ha escrit:Le jeudi 23 f=C3=A9vrier 2012 =C3=A0 19:46 +0100, Mike Wey a =C3=A9crit=:On 02/23/2012 05:27 PM, bioinfornatics wrote:=20 Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull=dear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=3Dmylib.so.1request for gtkd because ldc do not use -L-soname instead of dmd =20 =20Are you able to build dynamic libraries directly with DMD? How? --=20 Jordi Sayol
Feb 24 2012
Am 24.02.2012 11:40, schrieb Jordi Sayol:Al 23/02/12 20:29, En/na bioinfornatics ha escrit:-shared generate shared libraryLe jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :Are you able to build dynamic libraries directly with DMD? How?On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1
Feb 24 2012
Al 24/02/12 11:59, En/na David ha escrit:I got this: $ dmd -fPIC -shared foo.d /usr/bin/ld: /usr/lib/libphobos2.a(minfo.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC /usr/lib/libphobos2.a: could not read symbols: Bad value collect2: ld returned 1 exit status --- errorlevel 1 -- Jordi SayolAre you able to build dynamic libraries directly with DMD? How?-shared generate shared library
Feb 24 2012
Al 24/02/12 11:59, En/na David ha escrit:It compiles to 32-bit but fails for 64-bit, maybe due to compiled libphobos2 (64-bit) without -fPIC argument? Another thing. $ dmd -fPIC -shared foo.d -m32 -offoo.so.0.0.1 generate the incorrect "foo.so.0.0.so" file name. but with: $ dmd -fPIC -shared foo.d -m32 -L-ofoo.so.0.0.1 the correct "foo.so.0.0.1" file name is created. Best regards, -- Jordi SayolAre you able to build dynamic libraries directly with DMD? How?-shared generate shared library
Feb 24 2012
On 02/24/2012 06:27 AM, Jordi Sayol wrote:It compiles to 32-bit but fails for 64-bit, maybe due to compiled libphobos2 (64-bit) without -fPIC argument?What? -shared works with 32-bit? Holy crap, it does! this is awesome! maybe make a bug report for 64 bit?
Feb 24 2012
Al 24/02/12 20:21, En/na Ellery Newcomer ha escrit:On 02/24/2012 06:27 AM, Jordi Sayol wrote:better wait till libphobos2.a becomes libphobos2.so -- Jordi SayolIt compiles to 32-bit but fails for 64-bit, maybe due to compiled libphobos2 (64-bit) without -fPIC argument?What? -shared works with 32-bit? Holy crap, it does! this is awesome! maybe make a bug report for 64 bit?
Feb 24 2012
On Fri, Feb 24, 2012 at 08:36:03PM +0100, Jordi Sayol wrote: [...]better wait till libphobos2.a becomes libphobos2.so[...] You might have to wait a while for that. AFAIK there are no plans currently to make phobos available as a shared library yet. I personally think that phobos *should* be a shared object at some point, but not everyone agrees with me. T -- Lottery: tax on the stupid. -- Slashdotter
Feb 24 2012
Al 24/02/12 20:45, En/na H. S. Teoh ha escrit:On Fri, Feb 24, 2012 at 08:36:03PM +0100, Jordi Sayol wrote: [...]I think that phobos should be a shared object too, but only when it has some sense (by now, every dmd release breaks previous libraries, at least gtkd ones) Best regards, -- Jordi Sayolbetter wait till libphobos2.a becomes libphobos2.so[...] You might have to wait a while for that. AFAIK there are no plans currently to make phobos available as a shared library yet. I personally think that phobos *should* be a shared object at some point, but not everyone agrees with me.
Feb 24 2012
On Fri, Feb 24, 2012 at 09:35:57PM +0100, Jordi Sayol wrote:Al 24/02/12 20:45, En/na H. S. Teoh ha escrit:[...][...] I suppose D/Phobos is currently still too volatile to start committing to shared library version numbers yet. One *could* in theory start doing it and just end up with very large version numbers, which the system in theory can handle just fine, although people seem aversive to the possibility of having /usr/lib/libphobos.so.2.x for all x from 0 to some very large number. T -- It won't be covered in the book. The source code has to be useful for something, after all. -- Larry WallI personally think that phobos *should* be a shared object at some point, but not everyone agrees with me.I think that phobos should be a shared object too, but only when it has some sense (by now, every dmd release breaks previous libraries, at least gtkd ones)
Feb 24 2012
Le vendredi 24 f=C3=A9vrier 2012 =C3=A0 13:00 -0800, H. S. Teoh a =C3=A9cri= t :On Fri, Feb 24, 2012 at 09:35:57PM +0100, Jordi Sayol wrote:ldc build already phobos / druntime as shared lib with /usr/lib/libphobos.so.2.x /usr/lib/libphobos.so.2 /usr/lib/libphobos.so.2 and same for druntimeAl 24/02/12 20:45, En/na H. S. Teoh ha escrit:[...][...] =20 I suppose D/Phobos is currently still too volatile to start committing to shared library version numbers yet. One *could* in theory start doing it and just end up with very large version numbers, which the system in theory can handle just fine, although people seem aversive to the possibility of having /usr/lib/libphobos.so.2.x for all x from 0 to some very large number. =20 =20 T =20I personally think that phobos *should* be a shared object at some point, but not everyone agrees with me. =20=20 I think that phobos should be a shared object too, but only when it has some sense (by now, every dmd release breaks previous libraries, at least gtkd ones)
Feb 26 2012
On 02/23/2012 08:29 PM, bioinfornatics wrote:Le jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :The GtkD Makefile uses: $(LINKERFLAG)-soname=$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end). -- Mike WeyOn 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1
Feb 24 2012
Le vendredi 24 f=C3=A9vrier 2012 =C3=A0 15:56 +0100, Mike Wey a =C3=A9crit = :On 02/23/2012 08:29 PM, bioinfornatics wrote::Le jeudi 23 f=C3=A9vrier 2012 =C3=A0 19:46 +0100, Mike Wey a =C3=A9crit=this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname=20 ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAG=20 The GtkD Makefile uses: =20 $(LINKERFLAG)-soname=3D$ .$(call stripBugfix,$(SO_VERSION)) =20 Witch works with all the compilers, $(LINKERFLAG) is either -L or=20 -Xlinker (with a space on th end). =20On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=3Dmylib.so.1
Feb 26 2012
On 02/26/2012 02:53 PM, bioinfornatics wrote:Le vendredi 24 février 2012 à 15:56 +0100, Mike Wey a écrit :Well, i am able to build the GtkD shared libs for ldc2 with the current make file. Not sure why ldc has it's own soname flag as only the linker would care about it so using -L to pass it on to the linker works just fine. -- Mike WeyOn 02/23/2012 08:29 PM, bioinfornatics wrote:this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAGLe jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :The GtkD Makefile uses: $(LINKERFLAG)-soname=$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end).On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1
Feb 26 2012
On 2012-02-26 14:53, bioinfornatics wrote:Le vendredi 24 février 2012 à 15:56 +0100, Mike Wey a écrit :Do the ldmd and gdmd wrapper scripts handle this? -- /Jacob CarlborgOn 02/23/2012 08:29 PM, bioinfornatics wrote:this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAGLe jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :The GtkD Makefile uses: $(LINKERFLAG)-soname=$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end).On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1
Feb 27 2012
Le lundi 27 f=C3=A9vrier 2012 =C3=A0 09:51 +0100, Jacob Carlborg a =C3=A9cr= it :On 2012-02-26 14:53, bioinfornatics wrote:rit :Le vendredi 24 f=C3=A9vrier 2012 =C3=A0 15:56 +0100, Mike Wey a =C3=A9c=it :On 02/23/2012 08:29 PM, bioinfornatics wrote:Le jeudi 23 f=C3=A9vrier 2012 =C3=A0 19:46 +0100, Mike Wey a =C3=A9cr=llOn 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pu=dear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=3Dmylib.so.1no but i will add it soon, waiting klickverbot or sokol Mike Wey could you look if soname is really setted with objdup -p libgtkd.so.1.5 | grep -i soname=20 Do the ldmd and gdmd wrapper scripts handle this? =20this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAGrequest for gtkd because ldc do not use -L-soname instead of dmdThe GtkD Makefile uses: $(LINKERFLAG)-soname=3D$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end).
Feb 27 2012
On 02/27/2012 10:30 AM, bioinfornatics wrote:Le lundi 27 février 2012 à 09:51 +0100, Jacob Carlborg a écrit :$ make shared-libs DC="ldc2" [ Lots of text scrolls by ;) ] $ objdump -p libgtkd.so | grep -i soname SONAME libgtkd.so.1.5 ldc is called like this by the make file: ld -r "All the object files" -o libgtkd.so.o ldc2 -shared -oflibgtkd.so -L-soname=libgtkd.so.1.5 -L-ldl -m64 libgtkd.so.o -- Mike WeyOn 2012-02-26 14:53, bioinfornatics wrote:no but i will add it soon, waiting klickverbot or sokol Mike Wey could you look if soname is really setted with objdup -p libgtkd.so.1.5 | grep -i sonameLe vendredi 24 février 2012 à 15:56 +0100, Mike Wey a écrit :Do the ldmd and gdmd wrapper scripts handle this?On 02/23/2012 08:29 PM, bioinfornatics wrote:this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAGLe jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :The GtkD Makefile uses: $(LINKERFLAG)-soname=$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end).On 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull request for gtkd because ldc do not use -L-soname instead of dmddear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=mylib.so.1
Feb 27 2012
Le lundi 27 f=C3=A9vrier 2012 =C3=A0 11:36 +0100, Mike Wey a =C3=A9crit :On 02/27/2012 10:30 AM, bioinfornatics wrote:=A9crit :Le lundi 27 f=C3=A9vrier 2012 =C3=A0 09:51 +0100, Jacob Carlborg a =C3==A9crit :On 2012-02-26 14:53, bioinfornatics wrote:Le vendredi 24 f=C3=A9vrier 2012 =C3=A0 15:56 +0100, Mike Wey a =C3=crit :On 02/23/2012 08:29 PM, bioinfornatics wrote:Le jeudi 23 f=C3=A9vrier 2012 =C3=A0 19:46 +0100, Mike Wey a =C3=A9=pullOn 02/23/2012 05:27 PM, bioinfornatics wrote:Thanks i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a =dear, for set soname with: - gdc: -Xlinker -soname myLib.so.1 - ldc2: -soname myLib.so.1 - dmd: ? someone know how set soname with dmd ?dmd -L-soname=3Dmylib.so.1.so.o=20 $ make shared-libs DC=3D"ldc2" [ Lots of text scrolls by ;) ] =20 $ objdump -p libgtkd.so | grep -i soname SONAME libgtkd.so.1.5 =20 ldc is called like this by the make file: ld -r "All the object files" -o libgtkd.so.o ldc2 -shared -oflibgtkd.so -L-soname=3Dlibgtkd.so.1.5 -L-ldl -m64 libgtkd=no but i will add it soon, waiting klickverbot or sokol Mike Wey could you look if soname is really setted with objdup -p libgtkd.so.1.5 | grep -i sonameDo the ldmd and gdmd wrapper scripts handle this?this it is good for dmd and gdc but ldc use -soname without -L gdc: -Xlinker -soname ldc: -soname dmd: -L -soname with ldc you do not to do calling the linker with $(LINKERFLAGrequest for gtkd because ldc do not use -L-soname instead of dmdThe GtkD Makefile uses: $(LINKERFLAG)-soname=3D$ .$(call stripBugfix,$(SO_VERSION)) Witch works with all the compilers, $(LINKERFLAG) is either -L or -Xlinker (with a space on th end).=20awesome, thanks a lot
Feb 27 2012