Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 8C8F3782B70 for <~alpine/devel@lists.alpinelinux.org>; Sat, 16 Jan 2021 06:28:13 +0000 (UTC) Received: by mail-qk1-f175.google.com with SMTP id c7so14014924qke.1 for <~alpine/devel@lists.alpinelinux.org>; Fri, 15 Jan 2021 22:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:user-agent:mime-version :content-transfer-encoding; bh=aVikdNLrWL+VZKqS+9tFZPvR+d3y+0qFH6t0m2mjE8k=; b=uhtga18xZ6CYltWxgpqAmrdFj2R6wUEgBhXStnSUI/NqcYA/D/aWaIZo2zj7OQZbY9 F95fQpcuVuk8ZFWziOfRfFWyVeo5GlLG7uUQtp+A4b1cH5nr/GkZeVYTsrCblUWDnAD8 WmJhPIkpSI9tVzrLM0IfAv5roFM9GR4rYyg+yCZm+3tw4G6i/7mbMZlSGSwKLCiGbFRb E0194OZ+n1Q23IC3Qwabz0s5AJXO7Ygh5GV4Iw/ZpNARa6B9FH1FnUo7JKGdIDmc3C+r xquCqzPSq3z3vS9pZxwYgqry7V1zGD1+7MDae5tIpK54rqItv8qRfCOqsX+KRy8KvOgx tusA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:user-agent :mime-version:content-transfer-encoding; bh=aVikdNLrWL+VZKqS+9tFZPvR+d3y+0qFH6t0m2mjE8k=; b=UpqPCjXUN8GjnXtU734G39iE0/MsSnALzEn/x7sTOe0EWVJCyhh4u53uDqEC9P7Z0e Nc94xAIwlXpKyZES6zPVdCANWStoz0ZOv62J4gsWoLT0BgB6sx2nGrvqTW02fXlWDG14 QI+4uHDJgtHWA4grLf4riEsYke1sYAQ1XLSoiqI4RkTqvhgBOxQXfBpAfOvB8qGw9I7H jmY4YLTkWoWilTJXo/pPHROtxadJpZuf42dZ1A9weEItVrlP4Lk1+HsQtyQrUw7i+mdx FK7RxwHfVv8tEyQmM4CFvyzHA5M0Qe6yD2FnXbqAwWtJa4Qkpp90AawylQx0c9+vqtdo 0EPA== X-Gm-Message-State: AOAM533R+JA60rt3WLOrRAsLu7vvUak16YZHipfvpx59E/AemGaM7FH9 qPTx0odR7LaWJInNDbQ3g8C62nFDPjY= X-Google-Smtp-Source: ABdhPJw0VMqGNUJz2zZAXRR5Jn7jUintHWdwY4qzGsRoDti6OZyJBl+H6eKedYV3D8OEpN2YLWDQWQ== X-Received: by 2002:a37:4f12:: with SMTP id d18mr15901116qkb.42.1610778491583; Fri, 15 Jan 2021 22:28:11 -0800 (PST) Received: from ?IPv6:2804:431:cfcd:9b4c:9efc:d38e:299:d439? ([2804:431:cfcd:9b4c:9efc:d38e:299:d439]) by smtp.gmail.com with ESMTPSA id c17sm6616191qkb.13.2021.01.15.22.28.09 for <~alpine/devel@lists.alpinelinux.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 22:28:10 -0800 (PST) Message-ID: Subject: RFC on -static subpackages and being more static-linking friendly From: maxice8 To: ~alpine/devel@lists.alpinelinux.org Date: Sat, 16 Jan 2021 03:28:08 -0300 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 (3.38.2-1.module_f33+10736+4f8d5006) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Hello Our current -static packages were rushed in without much testing and prototyping and are suboptimal. First, abuild has no automatic dependency tracking like -dev has by tracking the 'Requires:' field from pkg-config and handling solinks. This means that every -static subpackage which requires another package to link will fail to link. As an example: I faced it with libgit2 while working on 'agl', installing libgit2-static wasn't enough I had to install openssl-libs- static, http-parser-static, etc separately while they should be installed all at once when I requested libgit2-static. Considering Alpine Linux uses a very static-linking friendly musl and statically linking is actually feasible and done in some places (apk- tools-static, busybox-static) I think it is important that doing it actually works seamlessly for the user (and us). Second, the size reduction is minimal for the -dev package, and -dev packages aren't really expected to be small. Third, the benefit of avoiding accidental linking has materialized (at least for me) only once when upgrading the skarnet suite of tools. While it is a nice benefit it doesn't happen often enough or is not apparent enough when maintaing packages in aports. My proposals are: 1. Remove -static subpackages and move the static library to -dev, if backwards compat is a concern we can make `-dev` provides= and replaces= `-static` too. 2. Avoid using --disable-static or removing the static library with 'rm' and respect the upstream decision to build it by default or not. Regards Leo