Bug 30001 - Port to autoconf build system (maybe use sbrabec's patch?)
Summary: Port to autoconf build system (maybe use sbrabec's patch?)
Status: UNCONFIRMED
Alias: None
Product: bzip2
Classification: Unclassified
Component: bzip2 (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-14 11:47 UTC by Sergei Trofimovich
Modified: 2024-04-20 07:44 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2023-01-14 11:47:23 UTC
To ease cross-compilation of bzip2 NixOS uses

    https://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/bzip2-1.0.6.2-autoconfiscated.patch
version of autoconf build system for bzip2.

WDYT of merging it upstream in some form?

Currently NixOS generates ./configure using autoconf and automake. NixOS would prefer using autoconf-based upstream bzip2 release tarball without a dependency on these development tools.

Thanks!
Comment 1 Sam James 2023-01-14 16:49:26 UTC
See Eli's patch series: https://sourceware.org/pipermail/bzip2-devel/2022q2/000166.html.
Comment 2 Eli Schwartz 2023-02-12 17:13:51 UTC
In general my understanding is that autoconfiscation patch you linked was explicitly rejected several times due to the "Incompatible changes" section.

My patch series solves this problem and a number of other problems. It should also still work fine with cross-compilation, just specify `./configure --host=<triplet>` and it will set up e.g. `$CC` correctly.
Comment 3 Jeffrey Walton 2023-02-12 19:22:06 UTC
(In reply to Eli Schwartz from comment #2)
> In general my understanding is that autoconfiscation patch you linked was
> explicitly rejected several times due to the "Incompatible changes" section.
> 
> My patch series solves this problem and a number of other problems. It
> should also still work fine with cross-compilation, just specify
> `./configure --host=<triplet>` and it will set up e.g. `$CC` correctly.

One comment... To cross-compile, you should specify both --build and --host. --build is easy. config.guess gives that triplet:

   $ find /usr/share -name config.guess
   ...
   /usr/share/autoconf/build-aux/config.guess

   $ /usr/share/autoconf/build-aux/config.guess
   x86_64-pc-linux-gnu

--host is the trickier one. There is no list of cross-compile triplets.

Also see https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html .