Page MenuHomeSolus

Dmd: fix soname versioning and provide libphobos2.so.*
Closed, ResolvedPublic

Description

New patch:


Old patches: F11225, F11077

hjajet created this task.Feb 3 2017, 2:38 PM

I don't get why this is needed? Also . is an invalid suffix for a .so

hjajet added a comment.EditedFeb 5 2017, 4:43 PM

It is needed because of things like https://dev.solus-project.com/T2402#42397
Everything compiled with -defaultlib=:libphobos2.so links to libphobos2.so.0., so libphobos2.so.0. is needed at runtime.
I agree, that it should not have empty suffix.

hjajet added a comment.Feb 5 2017, 5:35 PM

Ok, it looks like phobos needs dmd to be placed in ../dmd.
New commit:

hjajet renamed this task from Dmd: provide libphobos2.so.0. to Dmd: fix soname versioning and provide libphobos2.so.*.Feb 10 2017, 3:37 PM
hjajet updated the task description. (Show Details)

@hjajet I looked at his because i also ran into the soname version issue and your patch did solve the issue for me. I noticed a few things which could be improved

  • probably all libphobos.so* files should land in dmd-phobos
  • i guess dmd should have a rundep for dmd-phobos
  • export CXX_KIND="g++" is not required anymore. this forces the makefile to use -std=gnu++98 which was necessary for older versions of dmd but has been resolved
hjajet added a comment.Mar 5 2017, 2:29 PM

probably all libphobos.so* files should land in dmd-phobos

Is there any libphobos.so* which is not in dmd-phobos?
But pattern should not require .so.0.*, I will update the patch.

i guess dmd should have a rundep for dmd-phobos

I am not sure, it is not necessary to compile anything, it seems to be needed only at runtime.

export CXX_KIND="g++" is not required anymore. this forces the makefile to use -std=gnu++98 which was necessary for older versions of dmd but has been resolved

It is possible (I do not know), but it does not (yet) break anything. Should it be part of this task?

hjajet added a comment.Mar 5 2017, 2:30 PM

New patch:

hjajet updated the task description. (Show Details)Mar 5 2017, 2:32 PM
In T2407#48946, @hjajet wrote:

probably all libphobos.so* files should land in dmd-phobos

Is there any libphobos.so* which is not in dmd-phobos?
But pattern should not require .so.0.*, I will update the patch.

libphobos2.so is still in dmd

i guess dmd should have a rundep for dmd-phobos

I am not sure, it is not necessary to compile anything, it seems to be needed only at runtime.

it looks like dmd is by default linking statically against libphobos.a. so it will not be required as a dep even at runtime http://www.digitalmars.com/d/archives/digitalmars/D/Phobos_still_being_statically_linked_in_273501.html

One more thing i noticed is that there is a trailing whitespace in the patch.

just as a disclaimer this still has be be reviewed by someone with access to the build server :P

hjajet added a comment.Mar 5 2017, 5:25 PM

libphobos2.so is still in dmd

libphobos2.so is needed while linking if -defaultlib=:libphobos2.so is used, but not at runtime.
libphobos2.so.* is used at runtime in this case.
Maybe libphobos2.so should be in dmd-phobos-devel, but I thing it is not necessary.

it looks like dmd is by default linking statically against libphobos.a. so it will not be required as a dep even at runtime http://www.digitalmars.com/d/archives/digitalmars/D/Phobos_still_being_statically_linked_in_273501.html

Yes, but it may link dynamically if -defaultlib=:libphobos2.so is used.

just as a disclaimer this still has be be reviewed by someone with access to the build server :P

That would be nice :D

Herald changed the task status from Resolved to Invalid. · View Herald Transcript
joebonrichie changed the task status from Invalid to Resolved.Feb 21 2018, 10:04 PM