D seems interesting, but...

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Oct 14 22:15:11 PDT 2012


On Sun, Oct 14, 2012 at 09:42:56PM -0700, Jonathan M Davis wrote:
> On Sunday, October 14, 2012 21:39:42 H. S. Teoh wrote:
> > This looks like what happens if you try to use the latest dmd
> > release with an old version of Phobos, perhaps installed along with
> > gdc.
> > 
> > Whoever's doing the .deb packaging really should add a versioned
> > Depends: field to debian/control so that it will require
> > installation of the correct version of Phobos, or, at the very
> > least, refuse to install if such is not available.
> 
> At this point, it's a bad idea to use any version of druntime or
> Phobos which doesn't match exactly with the version of dmd that you're
> using. It's not as bad as it used to be, but there are still plenty of
> cases where a language change (be it a bug fix or added feature or
> whatever) makes it so that older versions of Phobos won't compile, or
> the latest Phobos ends up needing the latest dmd. I wouldn't advise
> anyone to use versions of them that don't all match.
[...]

Hmm, I just checked the URL he gave, and the package there includes the
entire suite: dmd, druntime, phobos, all in one. The only potential
problem I can think of is that /etc/dmd.conf had been modified in the
past and the Debian/Ubuntu packaging system doesn't overwrite modified
conffiles upon upgrade, so dmd may be picking up the wrong version of
druntime/Phobos because of that.

Another potential problem I can think of, is that the package is missing
a Depends: on one of the system libraries, maybe pthread-related,
judging from the error messages?  Specifically, one needs to depend on
the -dev version of the library, as non-dev versions of Debian/Ubuntu
library packages may only contain .so files, not the other stuff
(headers, .a's, etc.) that may be necessary to link to the library.

One way to root out this problem is to create a bare-bones chroot
environment (cf. dbootstrap) that has the absolute minimum packages
installed, and see if the package installs and runs correctly there.
Quite often, dependencies are missed because the library depended on is
commonly installed on most systems, but isn't part of the base system,
so on rare occasions the library will be missing and the package will
install correctly but fail to work.


T

-- 
Don't modify spaghetti code unless you can eat the consequences.


More information about the Digitalmars-d mailing list