Should SPM include paths in DYLD_LIBRARY_PATH while compiling?


(Ankit Agarwal) #1

if DYLD_LIBRARY_PATH is set with custom paths swift will be able to load
those .so libraries and execute properly but SPM will not build the swift
package unless the .so is in /usr/local/lib

should spm include those paths while compiling or something other is
planned for linking from custom locations?

···

--
Ankit


(Max Howell) #2

DYLD_LIBRARY_PATH is not a build-time environment variable.

I’m writing something up to deal with the need for supplemented library paths, though only in the context of module-map-packages, will this suffice?

···

if DYLD_LIBRARY_PATH is set with custom paths swift will be able to load those .so libraries and execute properly but SPM will not build the swift package unless the .so is in /usr/local/lib

should spm include those paths while compiling or something other is planned for linking from custom locations?


(Ankit Agarwal) #3

I think yes, great! looking forward to see that.

···

On Tuesday 5 January 2016, Max Howell <max.howell@apple.com> wrote:

DYLD_LIBRARY_PATH is not a build-time environment variable.

I’m writing something up to deal with the need for supplemented library
paths, though only in the context of module-map-packages, will this suffice?

if DYLD_LIBRARY_PATH is set with custom paths swift will be able to load
those .so libraries and execute properly but SPM will not build the swift
package unless the .so is in /usr/local/lib

should spm include those paths while compiling or something other is
planned for linking from custom locations?

--
Ankit