-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Description
🚀 Feature
A typical install of libtorch should come with a pkg-config file, describing how to build code relying on libtorch headers and how to link to libtorch libraries.
Motivation
Users of libtorch right now must resort to major hacks in order to correctly build torch-dependent code or link to libtorch, compared to most other native libraries.
Pitch
pkg-config is the standard and conventional mechanism to provide dependency information and linkage/build instructions on UNIX systems (with maybe an exception of macs).
Alternatives
People continue to hack around lack of the standard/blessed dependency discovery using the horror known as environment variables. Building any code successfully requires one to always remember to set this environment variable up.
They might also manually hardcode the dependency information into their build tooling. And then suffer breakage or and/or continue using irrelevant dependencies once the dependencies of torch itself change.
Additional context
https://en.wikipedia.org/wiki/Pkg-config
Tensorflow has this since 2017