DUB linking to local library

Craig Dillabaugh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 4 04:42:48 PDT 2015


On Tuesday, 4 August 2015 at 04:21:27 UTC, Joakim Brännström 
wrote:
> On Tuesday, 4 August 2015 at 03:20:38 UTC, Craig Dillabaugh 
> wrote:
clip
>
> Linkers, so fun they are...
> https://wiki.debian.org/RpathIssue
>
> As you can see in the search order RPATH takes precedence over 
> LD_LIBRARY_PATH.
> If we assume that you want LD_LIBRARY_PATH to be able to 
> override the lib you could use the following flags.
>
> "lflags" : [ "--enable-new-dtags", 
> -"rpath=/home/craig2/code/gdal-2.0.0/lib64/", 
> "-L/home/craig2/code/gdal-2.0.0/lib64/" ]
>
> you can see what it is in the binary with: readelf --dynamic 
> gdaltest|grep PATH
>
> This should make LD_LIBRARY_PATH redundant.
>
> //Joakim

I knew using LD_LIBRARY_PATH was frowned upon, thanks for 
enlightening me on the correct way to handle this.  Works 
beautifully now.


More information about the Digitalmars-d-learn mailing list