GNU make interprets dependencies of the form “-lFOO” specially by replacing them with a dependency on libFOO.a (or .so) in a location found in the VPATH or in /lib or /usr/lib. The latter is of course impure. For instance, the xorg-server build did something like this:

DEPS = -ldl
prog: $(DEPS)

This succeeds on systems where /usr/lib/libdl.so exists, but fails on NixOS. Workaround seems to be to set the VPATH to include the appropriate directories.

To make Make deterministic, we should remove searches in /lib etc. from the Make binary.

Submitted on 26 February 2007 at 19:44

Log in to post comments