dmd.conf change for Ubuntu 11.10

Jesse Phillips jessekphillips+d at gmail.com
Fri Oct 14 18:45:36 PDT 2011


On Fri, 14 Oct 2011 13:05:04 -0700, Justin Whear wrote:

> Changes to gcc or ld in Ubuntu 11.10 require a small addition to prevent
> linker errors referencing librt. "-L-lphobos2" needs to be added to
> DFLAGS before "-L-lrt". I spent a long time trying to figure the problem
> out before I realized that gcc was tacking on a -lphobos2 to the END of
> the command (after the -lrt flag).
> 
> This page: https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition may
> explain the behavior, I'm not sure.

The relevant text:

Ubuntu is changing the way it handles shared library linking for the 
Natty release. (Similar changes are being discussed for Debian.)
...
The --as-needed [on by default] option also makes the linker sensitive to 
the ordering of libraries on the command-line. You may need to move some 
libraries later in the command-line, so they come after other libraries 
or files that require symbols from them.



More information about the Digitalmars-d mailing list