Hi, Greg Hogan <c...@greghogan.com> skribis:
> Is there a best practice or example for building a library twice, both > static and dynamic? I submitted patch #43620, and in working on > another library have the same issue. These are cmake builds with a > parameter declaration for either a static or dynamic build, not > both. I would like to create a single package with both “out” and > “static” outputs, which looks to be standard across Guix. Yes, a “static” output is the preferred method if you want to keep .a files around. > One idea is to run the configure / make / make install phases > twice. modify-phases does not currently support copying phases (though > add-after could work with the right function reference from > cmake-build) and #:configure-flags would need to be set differently. Build systems from Autoconf/Automake/Libtool and those using CMake can produce both shared libraries (position-independent code, PIC) and static libraries at once. No need to run it twice. HTH, Ludo’.