Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.71k stars 12.4k forks source link

po4a bottle segfaults and build from source fails on 11.1 #67333

Closed deatondg closed 3 years ago

deatondg commented 3 years ago

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

What you were trying to do (and why)

I needed po4a for building another program.

What happened (include command output)

po4a from the bottle segfaults, and building from source fails. This is the console output from my system running Big Sur 11.1.

Command output

```
$ ~ % brew install po4a
==> Downloading https://homebrew.bintray.com/bottles/po4a-0.61.catalina.bottle.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/79ed593a686454200e1d425afd31c2684da185ce2588018aaf524554e35c6007--po4a-0.61.catalina.bottle.tar.gz
==> Pouring po4a-0.61.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/po4a/0.61: 561 files, 4.7MB
$ ~ % po4a
zsh: segmentation fault  po4a
$ ~ % brew reinstall --build_from_source po4a
==> Downloading https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/f3c614d72d3b3eafe5b6d9284baa8e580d2fc773cad0da3c70c050c135e0dff8--gettext-1.07.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/64e250e8f1ad4c6a18b578d87f3b83ab247d07a5cc3a24efd6caebe1c06c7a74--Module-Build-0.4231.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/M/MA/MAREKR/Pod-Parser-1.63.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/145062fd718826a26dd838d94a061024a057413b93a66c1a2aa6b72e08a1c366--Pod-Parser-1.63.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/R/RA/RAAB/SGMLSpm-1.1.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/8b3d1de7390e3147583ebd64431a93bc4bbed6dde9f16e6b3a3c897c4f3d36e8--SGMLSpm-1.1.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.38.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/79d35ffa455f04d0a9cb743e6d8e090c4db21d6d31f6408198110082882a652c--TermReadKey-2.38.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/Text-WrapI18N-0.06.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/9a2784cfc119011e7bf07ec53400b7ec997f4764dc683882a8b7fa8a53eefa43--Text-WrapI18N-0.06.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/Unicode-LineBreak-2019.001.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/a7ea07785aba20f4590331c35d27111ed3b96225987effdd96178bca435a260c--Unicode-LineBreak-2019.001.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.73.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/8d3f1f5c15f1ef2a1d5f0aa90417f08744a511cd51aa11aad22a5e63f56f0e28--YAML-Tiny-1.73.tar.gz
==> Downloading https://github.com/mquinson/po4a/releases/download/v0.61/po4a-0.61.tar.gz
Already downloaded: /Users/davisdeaton/Library/Caches/Homebrew/downloads/6798a2f786e2217b31cef905c1bb85a914b7af470a2b68209577f99b51347fb1--po4a-0.61.tar.gz
==> Reinstalling po4a 
==> perl Makefile.PL INSTALL_BASE=/usr/local/Cellar/po4a/0.61/libexec NO_MYMETA=1
==> make install
==> perl Makefile.PL INSTALL_BASE=/usr/local/Cellar/po4a/0.61/libexec NO_MYMETA=1
==> make install
==> perl Makefile.PL INSTALL_BASE=/usr/local/Cellar/po4a/0.61/libexec NO_MYMETA=1
==> make install
==> perl Makefile.PL INSTALL_BASE=/usr/local/Cellar/po4a/0.61/libexec NO_MYMETA=1
==> make install
==> perl Makefile.PL INSTALL_BASE=/usr/local/Cellar/po4a/0.61/libexec NO_MYMETA=1
==> make install
Last 15 lines from /Users/davisdeaton/Library/Logs/Homebrew/po4a/10.make:
    t_werasc (ERASEWORD) found in ltchars
Writing sgtty section of cchars.h... Done.
cc -c   -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Os   -DVERSION=\"2.38\" -DXS_VERSION=\"2.38\"  -iwithsysroot "/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE"   ReadKey.c
rm -f blib/arch/auto/Term/ReadKey/ReadKey.bundle
cc  -bundle -undefined dynamic_lookup -fstack-protector-strong  ReadKey.o  -o blib/arch/auto/Term/ReadKey/ReadKey.bundle  \
          \

chmod 755 blib/arch/auto/Term/ReadKey/ReadKey.bundle
"/usr/bin/perl" "-Iblib/arch" "-Iblib/lib" ReadKey.pm.PL ReadKey.pm
Can't load 'blib/arch/auto/Term/ReadKey/ReadKey.bundle' for module Term::ReadKey: dlopen(blib/arch/auto/Term/ReadKey/ReadKey.bundle, 0x0001): open("", O_RDONLY) failed with errno=2 at /System/Library/Perl/5.28/darwin-thread-multi-2level/DynaLoader.pm line 197.
 at /System/Library/Perl/5.28/darwin-thread-multi-2level/DynaLoader.pm line 95.
    DynaLoader::croak("Can't load 'blib/arch/auto/Term/ReadKey/ReadKey.bundle' for m"...) called at /System/Library/Perl/5.28/darwin-thread-multi-2level/DynaLoader.pm line 197
    DynaLoader::bootstrap("Term::ReadKey") called at ReadKey.pm.PL line 515
Creating ReadKey.pm
Bootstrapping the XS for blockoptions: make: *** [ReadKey.pm] Error 255

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
po4a 0.62 https://github.com/Homebrew/homebrew-core/pull/66522
```
  

What you expected to happen

I expect po4a to run and build successfully.

Step-by-step reproduction instructions (by running brew install commands)

brew install po4a
po4a // segfaults
brew reinstall --build_from_source po4a // fails

About the version bump

Homebrew suggests looking into the PR for bumping po4a to version 0.62. This PR won't merge because 0.62 fails to build on Big Sur with the same error.

Root cause

The cpan module Term::ReadKey will not build with the system perl (5.28) on Big Sur. Switching to Homebrew perl (5.32) builds successfully after a minor patch a file in po4a. I have already made a PR on po4a to address this issue and will make a PR on homebrew-core shortly.

fxcoudert commented 3 years ago

Fixed