C++ Logo

sg15

Advanced search

Re: [SG15] RFC: Requirements to consume a prebuilt library from arbitrary build systems

From: Ben Craig <ben.craig_at_[hidden]>
Date: Fri, 12 Nov 2021 19:36:59 +0000
I will note that there are substantial tradeoffs with absolute vs. relative paths. Both need to be an option, and the user needs to be able to use either.

Absolute paths are easier to reason about and debug as an end user, and they also allow you to reference things that can't be referred to with a relative path (like items on the Windows D: driver when you are building in the Windows c: drive).

Relative paths allow you to have machine independent builds, where you package all the dependencies in a well known hierarchy. This relative path approach also aids in artifact caching, as mismatched paths in command lines and built files are one way to get lots of cache misses.

> -----Original Message-----
> From: SG15 <sg15-bounces_at_[hidden]> On Behalf Of Brad King via
> SG15
> Sent: Monday, November 1, 2021 7:45 AM
> To: sg15_at_[hidden]
> Cc: Brad King <brad.king_at_[hidden]>
> Subject: [EXTERNAL] Re: [SG15] RFC: Requirements to consume a prebuilt
> library from arbitrary build systems
>
> On Sat, Oct 30, 2021 at 7:03 AM Boris Kolpackov wrote:
> > > Hint: *full path to libraries*.
> > static_library_full_path=/usr/lib/libhello.a
> > shared_library_full_path=/usr/lib/libhello.a
>
> Additional requirements include:
>
> * Relocatable packages: computing absolute paths to library files
> and include directories based on the location of the pkg file itself.
> A pkg file should know the relative paths of itself and the other
> artifacts relative to the prefix. Together this information can be
> used to construct absolute paths even after the whole prefix has
> been relocated.
>
> * Ubiquitous availability of absolute paths from pkg files in practice.
>
> For reference, there has been some progress in getting CMake to export
> package installations as .pc files:
>
> * install: add EXPORT mode to generate pkg-config files
> https://urldefense.com/v3/__https://gitlab.kitware.com/cmake/cmake/-
> /issues/22621__;!!FbZ0ZwI3Qg!8dKgqnykdE4KqPV0tGrAzkkdkOPynqEwwVlh
> vfCw0ZQ07aMBmqbOk085qTQN$
> https://urldefense.com/v3/__https://gitlab.kitware.com/cmake/cmake/-
> /merge_requests/6363__;!!FbZ0ZwI3Qg!8dKgqnykdE4KqPV0tGrAzkkdkOPy
> nqEwwVlhvfCw0ZQ07aMBmqbOk4jd8c_0$
>
> However, IIRC the design work is stalled on figuring out how to map
> transitive dependencies across different package representations.
>
> -Brad
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://urldefense.com/v3/__https://lists.isocpp.org/mailman/listinfo.cgi/sg
> 15__;!!FbZ0ZwI3Qg!8dKgqnykdE4KqPV0tGrAzkkdkOPynqEwwVlhvfCw0ZQ07
> aMBmqbOk4LnFCwe$

Received on 2021-11-12 13:37:06