Skip to content

readstat: fix build failure#425879

Merged
wegank merged 1 commit intoNixOS:masterfrom
sarahec:fix-readstat-build
Jul 17, 2025
Merged

readstat: fix build failure#425879
wegank merged 1 commit intoNixOS:masterfrom
sarahec:fix-readstat-build

Conversation

@sarahec
Copy link
Contributor

@sarahec sarahec commented Jul 16, 2025

Related: #405793

Build failure in Hydra https://hydra.nixos.org/eval/1816863?filter=readstat&compare=1816860&full=

libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force
configure.ac:43: warning: macro 'AM_ICONV' not found in library
autoreconf: running: /nix/store/lsy7k7f43r9kwpgjh70siy1l15kv1jds-autoconf-2.72/bin/autoconf --force
configure.ac:43: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: error: /nix/store/lsy7k7f43r9kwpgjh70siy1l15kv1jds-autoconf-2.72/bin/autoconf failed with exit status: 1

gettext 0.25 has been breaking older autoconf setups. Turns out we don't need it, it was there to supply iconv() which the app isn't using.

Changes

  1. File upstream bug and patch. Apply patch.
  2. Fix invocation of autoreconf to find m4

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Jul 16, 2025
@nix-owners nix-owners bot requested a review from swflint July 16, 2025 19:17
@sarahec sarahec force-pushed the fix-readstat-build branch 2 times, most recently from 057f1dc to 640f8b0 Compare July 16, 2025 19:33
@sarahec
Copy link
Contributor Author

sarahec commented Jul 16, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 425879
Commit: 640f8b0b2eb88296446d4722568b8408a48cdaa1


aarch64-darwin

❌ 4 packages failed to build:
  • python312Packages.pandera
  • python312Packages.pandera.dist
  • python313Packages.pandera
  • python313Packages.pandera.dist
✅ 32 packages built:
  • python312Packages.layoutparser
  • python312Packages.layoutparser.dist
  • python312Packages.mlcroissant
  • python312Packages.mlcroissant.dist
  • python312Packages.pandantic
  • python312Packages.pandantic.dist
  • python312Packages.pandas-stubs
  • python312Packages.pandas-stubs.dist
  • python312Packages.pdfplumber
  • python312Packages.pdfplumber.dist
  • python312Packages.pyreadstat
  • python312Packages.pyreadstat.dist
  • python312Packages.unstructured-inference
  • python312Packages.unstructured-inference.dist
  • python313Packages.layoutparser
  • python313Packages.layoutparser.dist
  • python313Packages.mlcroissant
  • python313Packages.mlcroissant.dist
  • python313Packages.pandantic
  • python313Packages.pandantic.dist
  • python313Packages.pandas-stubs
  • python313Packages.pandas-stubs.dist
  • python313Packages.pdfplumber
  • python313Packages.pdfplumber.dist
  • python313Packages.pyreadstat
  • python313Packages.pyreadstat.dist
  • python313Packages.unstructured-inference
  • python313Packages.unstructured-inference.dist
  • readstat
  • tocpdf
  • tocpdf.dist
  • unstructured-api

Error logs: `aarch64-darwin`
python312Packages.pandera
tests/strategies/test_strategies.py: 24 warnings
  /private/tmp/nix-build-python3.12-pandera-0.24.0.drv-0/source/tests/strategies/test_strategies.py:900: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    return pandas_obj.applymap(lambda x: min_val <= x <= max_val)

tests/strategies/test_strategies.py: 30 warnings
/private/tmp/nix-build-python3.12-pandera-0.24.0.drv-0/source/pandera/strategies/pandas_strategies.py:1021: UserWarning: Dataframe check doesn't have a defined strategy. Falling back to filtering drawn values based on the check definition. This can considerably slow down data-generation.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/polars/test_polars_dtypes.py::test_polars_nested_dtypes_try_coercion[coercible_dtype3-noncoercible_dtype3-data3] - assert False

  • where False = equals(shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘)
  • where equals = shape: (0, 1)\n┌───────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═══════════╡\n└───────────┘.equals
  •  where shape: (0, 1)\n┌───────────┐\n│ 0         │\n│ ---       │\n│ list[str] │\n╞═══════════╡\n└───────────┘ = select(<Expr ['col("0")'] at 0x3534947D0>)
    
  •    where select = shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘.select
    
  •      where shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘ = ParserError("Could not coerce  LazyFrame with schema Schema({'0': List(String)}) into type List(Int64)").failure_cases
    
  • and shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘ = collect()
  •  where collect = <LazyFrame at 0x3511D8050>.collect
    

= 1 failed, 3391 passed, 47 skipped, 12 deselected, 8 xfailed, 7629 warnings in 126.15s (0:02:06) =

python313Packages.pandera
tests/strategies/test_strategies.py: 24 warnings
  /private/tmp/nix-build-python3.13-pandera-0.24.0.drv-0/source/tests/strategies/test_strategies.py:900: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    return pandas_obj.applymap(lambda x: min_val <= x <= max_val)

tests/strategies/test_strategies.py: 30 warnings
/private/tmp/nix-build-python3.13-pandera-0.24.0.drv-0/source/pandera/strategies/pandas_strategies.py:1021: UserWarning: Dataframe check doesn't have a defined strategy. Falling back to filtering drawn values based on the check definition. This can considerably slow down data-generation.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/polars/test_polars_dtypes.py::test_polars_nested_dtypes_try_coercion[coercible_dtype3-noncoercible_dtype3-data3] - assert False

  • where False = equals(shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘)
  • where equals = shape: (0, 1)\n┌───────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═══════════╡\n└───────────┘.equals
  •  where shape: (0, 1)\n┌───────────┐\n│ 0         │\n│ ---       │\n│ list[str] │\n╞═══════════╡\n└───────────┘ = select(<Expr ['col("0")'] at 0x3221F7950>)
    
  •    where select = shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘.select
    
  •      where shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘ = ParserError("Could not coerce  LazyFrame with schema Schema({'0': List(String)}) into type List(Int64)").failure_cases
    
  • and shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘ = collect()
  •  where collect = <LazyFrame at 0x3504F5D60>.collect
    

= 1 failed, 3386 passed, 47 skipped, 17 deselected, 8 xfailed, 7629 warnings in 128.62s (0:02:08) =

@sarahec
Copy link
Contributor Author

sarahec commented Jul 16, 2025

Discovered in nixpkgs-review of #424873 and #409698

@sarahec
Copy link
Contributor Author

sarahec commented Jul 16, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 425879
Commit: 640f8b0b2eb88296446d4722568b8408a48cdaa1


x86_64-linux

❌ 4 packages failed to build:
  • python312Packages.pandera
  • python312Packages.pandera.dist
  • python313Packages.pandera
  • python313Packages.pandera.dist
✅ 42 packages built:
  • jasp-desktop
  • labplot
  • python312Packages.dm-sonnet
  • python312Packages.dm-sonnet.dist
  • python312Packages.layoutparser
  • python312Packages.layoutparser.dist
  • python312Packages.meshtastic
  • python312Packages.meshtastic.dist
  • python312Packages.mlcroissant
  • python312Packages.mlcroissant.dist
  • python312Packages.pandantic
  • python312Packages.pandantic.dist
  • python312Packages.pandas-stubs
  • python312Packages.pandas-stubs.dist
  • python312Packages.pdfplumber
  • python312Packages.pdfplumber.dist
  • python312Packages.pyreadstat
  • python312Packages.pyreadstat.dist
  • python312Packages.tensorflow-datasets
  • python312Packages.tensorflow-datasets.dist
  • python312Packages.unstructured-inference
  • python312Packages.unstructured-inference.dist
  • python313Packages.layoutparser
  • python313Packages.layoutparser.dist
  • python313Packages.meshtastic
  • python313Packages.meshtastic.dist
  • python313Packages.mlcroissant
  • python313Packages.mlcroissant.dist
  • python313Packages.pandantic
  • python313Packages.pandantic.dist
  • python313Packages.pandas-stubs
  • python313Packages.pandas-stubs.dist
  • python313Packages.pdfplumber
  • python313Packages.pdfplumber.dist
  • python313Packages.pyreadstat
  • python313Packages.pyreadstat.dist
  • python313Packages.unstructured-inference
  • python313Packages.unstructured-inference.dist
  • readstat
  • tocpdf
  • tocpdf.dist
  • unstructured-api

Error logs: `x86_64-linux`
python312Packages.pandera
tests/strategies/test_strategies.py: 24 warnings
  /build/source/tests/strategies/test_strategies.py:900: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    return pandas_obj.applymap(lambda x: min_val <= x <= max_val)

tests/strategies/test_strategies.py: 30 warnings
/build/source/pandera/strategies/pandas_strategies.py:1021: UserWarning: Dataframe check doesn't have a defined strategy. Falling back to filtering drawn values based on the check definition. This can considerably slow down data-generation.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/polars/test_polars_dtypes.py::test_polars_nested_dtypes_try_coercion[coercible_dtype3-noncoercible_dtype3-data3] - assert False

  • where False = equals(shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘)
  • where equals = shape: (0, 1)\n┌───────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═══════════╡\n└───────────┘.equals
  •  where shape: (0, 1)\n┌───────────┐\n│ 0         │\n│ ---       │\n│ list[str] │\n╞═══════════╡\n└───────────┘ = select(<Expr ['col("0")'] at 0x7FFE039330E0>)
    
  •    where select = shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘.select
    
  •      where shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘ = ParserError("Could not coerce  LazyFrame with schema Schema({'0': List(String)}) into type List(Int64)").failure_cases
    
  • and shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘ = collect()
  •  where collect = <LazyFrame at 0x7FFE51837CB0>.collect
    

= 1 failed, 3434 passed, 47 skipped, 5 deselected, 8 xfailed, 7650 warnings in 286.41s (0:04:46) =

python313Packages.pandera
tests/strategies/test_strategies.py: 24 warnings
  /build/source/tests/strategies/test_strategies.py:900: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    return pandas_obj.applymap(lambda x: min_val <= x <= max_val)

tests/strategies/test_strategies.py: 30 warnings
/build/source/pandera/strategies/pandas_strategies.py:1021: UserWarning: Dataframe check doesn't have a defined strategy. Falling back to filtering drawn values based on the check definition. This can considerably slow down data-generation.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/polars/test_polars_dtypes.py::test_polars_nested_dtypes_try_coercion[coercible_dtype3-noncoercible_dtype3-data3] - assert False

  • where False = equals(shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘)
  • where equals = shape: (0, 1)\n┌───────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═══════════╡\n└───────────┘.equals
  •  where shape: (0, 1)\n┌───────────┐\n│ 0         │\n│ ---       │\n│ list[str] │\n╞═══════════╡\n└───────────┘ = select(<Expr ['col("0")'] at 0x7FFE25619050>)
    
  •    where select = shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘.select
    
  •      where shape: (0, 2)\n┌───────────┬──────────────┐\n│ 0         ┆ check_output │\n│ ---       ┆ ---          │\n│ list[str] ┆ bool         │\n╞═══════════╪══════════════╡\n└───────────┴──────────────┘ = ParserError("Could not coerce  LazyFrame with schema Schema({'0': List(String)}) into type List(Int64)").failure_cases
    
  • and shape: (1, 1)\n┌─────────────────┐\n│ 0 │\n│ --- │\n│ list[str] │\n╞═════════════════╡\n│ ["a", "b", "c"] │\n└─────────────────┘ = collect()
  •  where collect = <LazyFrame at 0x7FFE5152A3F0>.collect
    

= 1 failed, 3429 passed, 47 skipped, 10 deselected, 8 xfailed, 7650 warnings in 279.57s (0:04:39) =

@sarahec sarahec requested a review from drupol July 16, 2025 20:28
Comment on lines 41 to 44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libiconv wasn't actually used.

I thought that we didn't need the parallel building. I'll restore it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not asking for restoring it, I don't even know why it is required. I was merely asking the reasons why it was removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. It did speed up the build nicely, though!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not asking for restoring it, I don't even know why it is required. I was merely asking the reasons why it was removed.

re: libiconv, the boilerplate supplied by autoconf apparently required gettext and libiconv, but those features were never actually used. Since I removed teh requirement on gettext (in the patch), libiconv came away with it.

@sarahec sarahec force-pushed the fix-readstat-build branch from 640f8b0 to 9462cc6 Compare July 16, 2025 21:02
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 16, 2025
@TomaSajt
Copy link
Contributor

Please change the commit message & PR title: there is no python3Packages.readstat package, only readstat or python3Packages.pyreadstat.
In this case readstat would be correct.

@wegank wegank force-pushed the fix-readstat-build branch from 9462cc6 to 7800905 Compare July 17, 2025 02:05
@wegank wegank changed the title python3Packages.readstat: fix build failure readstat: fix build failure Jul 17, 2025
gettext 0.25 has been breaking older autoconf setups. Patch it out.
@wegank wegank force-pushed the fix-readstat-build branch from 7800905 to dd95865 Compare July 17, 2025 02:06
@wegank wegank merged commit a198fae into NixOS:master Jul 17, 2025
23 of 27 checks passed
@sarahec sarahec deleted the fix-readstat-build branch July 17, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants