Closed neersighted closed 3 years ago
I considered that, but this also seemed a decent option as ldconfig
should also respect the user's linker path... Since I'd rather not add a knob that is mostly for me to be able to build on Arch, and since people who are not me also might be baffled by the missing library that they think they installed, what do you think about just calling this function prefer_static_lib
or similar?
That could work as well. ldconfig
respects global settings (through /etc/ld.conf
) but doesn't respect LDFLAGS="-L..." task configure ...
. That said, I'm not sure if we're freezing the LDFLAGS
env var in our task script. We probably should.
My main concern is that if the task script doesn't fail loudly if it can't find a static library, we might end up with an unexpected dependency in a release build. I've added a new option for this in the CI refactor PR (#19) and clarified the error message. The only acceptable alternative to the option for me would require logging whether the configure script used a dynamic or static library but I'd rather not have to check the log for every release to make sure that the release linked against the static library.
I don't like the
.so
fallback since it changes what the function does.find_static_lib
should only return static libs. We could rename it tofind_maybe_static_lib
or something like that but I'd rather restore the static option and use it to switch betweenfind_static_lib
and-l...
.-l
respects the user's linker path and is more intuitive than our custom library lookup code.