Build artifacts in *.la files cause subsequent compilations to fail.
I was using the lalsuite nightly container as base to build gstlal (which requires lalsuite as a dependency), and the installation was failing with:
/bin/sed: can't read /builds/lscsoft/lalsuite/opt/lalsuite/lib/liblalframe.la: No such file or directory libtool: link: "/builds/lscsoft/lalsuite/opt/lalsuite/lib/liblalframe.la'\" is not a valid libtool archive
The pkgconfig files are all correctly configured to point to the lalsuite library directory (/opt/lalsuite), but the *.la files still point to the original build location, for example:
... ... Libraries that this one depends upon. dependency_libs=' -L/builds/lscsoft/lalsuite/opt/lalsuite/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -L/usr/lib/x86_64-linux-gnu /builds/lscsoft/lalsuite/opt/lalsuite/lib/liblalsupport.la -lhdf5 -lhdf5_hl /builds/lscsoft/lalsuite/opt/lalsuite/lib/liblal.la -lgsl -lgslcblas -lfftw3 -lfftw3f -lFrame /usr/lib/libframecppc.la /usr/lib/libframecpp.la /usr/lib/libframecpp8.la /usr/lib/libframecpp7.la /usr/lib/libframecpp6.la /usr/lib/libframecpp4.la /usr/lib/libframecpp3.la /usr/lib/libframecppcmn.la /usr/lib/libldastoolsal.la -ldl -lcrypto -lz -lpthread -lrt -lm' ... ...
I was able to override the problem by deleting the *.la files in /opt/lalsuite/lib/ and rebuilding.