Opened 2 years ago

Last modified 6 weeks ago

#64712 new defect

Perl-related errors on 10.6.8: loadable library and perl binaries are mismatched

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc, snowleopard, rosetta Cc: potmj (Michael Pot)
Port: autoconf269, wget, help2man, p5.28-http-daemon, perl5.28, perl5.34

Description

--->  Configuring help2man
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_help2man/help2man/work/help2man-1.49.1" && ./configure --prefix=/opt/local --enable-nls 
checking for perl... /opt/local/bin/perl5.34
checking for module Locale::gettext... no
checking for msgfmt... /opt/local/bin/msgfmt
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /usr/bin/gcc-4.2 accepts -g... yes
checking for /usr/bin/gcc-4.2 option to enable C11 features... unsupported
checking for /usr/bin/gcc-4.2 option to enable C99 features... -std=gnu99
checking for library containing dlsym... none required
checking for library containing bindtextdomain... -lintl
configure: error: perl module Locale::gettext required
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_help2man/help2man/work/help2man-1.49.1" && ./configure --prefix=/opt/local --enable-nls

Of corse all dependencies are in fact installed.

Attachments (2)

main.log (22.8 KB) - added by barracuda156 2 years ago.
config.log (33.0 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (18)

Changed 2 years ago by barracuda156

Attachment: main.log added

Changed 2 years ago by barracuda156

Attachment: config.log added

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

gettext.c: loadable library and perl binaries are mismatched (got handshake key 0xcf00080, needed 0xce40080)

comment:2 in reply to:  1 Changed 2 years ago by barracuda156

Replying to ryandesign:

gettext.c: loadable library and perl binaries are mismatched (got handshake key 0xcf00080, needed 0xce40080)

Thank you, I will check it. May be they were built against different versions of SDK, that's the only thing which comes to my mind. I have rebuilt Locale module before submitting the ticket and that didn't help.

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

The SDK version shouldn't matter. When I searched for this error, it seemed like people were experiencing it because the major version of perl had changed, but that should be impossible in MacPorts since each major version of perl uses its own set of directories and subports.

There is an upstream bug https://github.com/Perl/perl5/issues/15861 about this error message and its vagueness. I haven't read the many comments on that issue; maybe they have more suggestions.

comment:4 in reply to:  3 Changed 2 years ago by barracuda156

Replying to ryandesign:

The SDK version shouldn't matter. When I searched for this error, it seemed like people were experiencing it because the major version of perl had changed, but that should be impossible in MacPorts since each major version of perl uses its own set of directories and subports.

There is an upstream bug https://github.com/Perl/perl5/issues/15861 about this error message and its vagueness. I haven't read the many comments on that issue; maybe they have more suggestions.

Thank you. Indeed, rebuilding didn't help. Posted in that thread.

UPD. I changed Perl to 5.30, and it built:

The following ports are currently installed:
  help2man @1.48.5_0 requested_variants='' platform='darwin 10' archs='ppc' date='2022-01-23T08:51:51+0800'
  help2man @1.49.1_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-02-26T03:22:51+0800'
Last edited 2 years ago by barracuda156 (previous) (diff)

comment:5 Changed 2 years ago by barracuda156

And now I get this error with p5.28-http-daemon:

--->  Configuring p5.28-http-daemon
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-http-daemon/p5.28-http-daemon/work/HTTP-Daemon-6.13" && /opt/local/bin/perl5.28 Build.PL --installdirs=vendor --config cc="/usr/bin/gcc-4.2" --config ld="/usr/bin/gcc-4.2" 
ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xa840080, needed 0xa780080)

comment:6 Changed 2 years ago by barracuda156

Port: p5.28-http-daemon perl5.28 perl5.34 added
Summary: help2man fails to configure on 10.6.8: error: perl module Locale::gettext requiredPerl-related errors on 10.6.8: loadable library and perl binaries are mismatched

comment:7 Changed 2 years ago by barracuda156

Yet another, case with autoconf269:

autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'         ../bin/autom4te -B '..'/lib -B '..'/lib         --language M4sh --cache '' --melt ./autoconf.as -o autoconf.in
chmod +x ifnames.tmp
chmod +x autoscan.tmp
chmod a-w ifnames.tmp
chmod +x autoupdate.tmp
chmod a-w autoscan.tmp
mv ifnames.tmp ifnames
chmod a-w autoupdate.tmp
mv autoscan.tmp autoscan
mv autoupdate.tmp autoupdate
ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xa840080, needed 0xa780080)
make[2]: *** [autoconf.in] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_autoconf269/autoconf269/work/autoconf-2.69/bin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_autoconf269/autoconf269/work/autoconf-2.69'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_autoconf269/autoconf269/work/autoconf-2.69'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_autoconf269/autoconf269/work/autoconf-2.69" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build autoconf269: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_autoconf269/autoconf269/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port autoconf269 failed

comment:8 Changed 2 years ago by barracuda156

Port: autoconf269 added

comment:9 Changed 2 years ago by barracuda156

And rebuilding perl itself does not help. Ports fail with same error.

comment:10 Changed 2 years ago by barracuda156

Now with wget:

make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/wget-1.21.3/doc'
sed s/@/@@/g sample.wgetrc > sample.wgetrc.munged_for_texi_inclusion
Updating ./version.texi
restore=: && backupdir=".am$$" && \
	am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
	rm -rf $backupdir && mkdir $backupdir && \
	if (/bin/sh '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/wget-1.21.3/build-aux/missing' makeinfo --version) >/dev/null 2>&1; then \
	  for f in wget.info wget.info-[0-9] wget.info-[0-9][0-9] wget.i[0-9] wget.i[0-9][0-9]; do \
	    if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
	  done; \
	else :; fi && \
	cd "$am__cwd"; \
	if /bin/sh '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/wget-1.21.3/build-aux/missing' makeinfo   -I . \
	 -o wget.info wget.texi; \
	then \
	  rc=0; \
	  CDPATH="${ZSH_VERSION+.}:" && cd .; \
	else \
	  rc=$?; \
	  CDPATH="${ZSH_VERSION+.}:" && cd . && \
	  $restore $backupdir/* `echo "./wget.info" | sed 's|[^/]*$||'`; \
	fi; \
	rm -rf $backupdir; exit $rc
./texi2pod.pl -D VERSION="1.21.3" ./wget.texi wget.pod
/opt/local/bin/pod2man-5.30 --center="GNU Wget" --release="GNU Wget 1.21.3" --utf8 wget.pod > wget.1 || \
	/opt/local/bin/pod2man-5.30 --center="GNU Wget" --release="GNU Wget 1.21.3" wget.pod > wget.1
Cwd.c: loadable library and perl binaries are mismatched (got handshake key 0xa740080, needed 0xa800080)
make[2]: *** [wget.info] Error 1
make[2]: *** Waiting for unfinished jobs....
Encode.c: loadable library and perl binaries are mismatched (got handshake key 0xa740080, needed 0xa800080)
Encode.c: loadable library and perl binaries are mismatched (got handshake key 0xa740080, needed 0xa800080)
make[2]: *** [wget.1] Error 1

comment:11 Changed 2 years ago by barracuda156

Port: wget added

comment:13 in reply to:  12 Changed 2 years ago by barracuda156

Replying to kencu:

some possibly-useful information here

https://stackoverflow.com/questions/45000585/listutil-c-loadable-library-and-perl-binaries-are-mismatched-got-handshake-key

Thank you. I have checked my env, there is no PERL-related settings there. ~/.bash_profile only got Macports PATH.

/opt/local/bin/perl and /opt/local/bin/perl5 symlinks point to perl5.28. Each of three installed perls got also a three-digit symlink, like perl5.28.3. No weird versions of perl installed on this machine.

/usr/bin has three: perl (showing v. 5.10.0 with -v), perl5.8.9 and perl5.10.0. To my knowledge I did not install anything there manually.

  1. S. I tried using zsh instead of bash just in case some non-obvious settings differ, it made no difference.

comment:14 Changed 2 years ago by potmj (Michael Pot)

Cc: potmj added

comment:15 Changed 8 weeks ago by potmj (Michael Pot)

I have had similar problems and at long last resolved at least one (on 10.11.6). Upgrade texinfo failed with :-

parsetexi/Parsetexi.c: loadable library and perl binaries are mismatched (got handshake key 0xc400080, needed 0xf880080)

I let Macports handle perl, and have it as a dependency. I don't program in perl or install other perl programs, or pull in modules that I am aware of. The error message does not explicitly identify the perl module, or it's library path, full source path, nor where it has come from. It seems it is hard for better help on correcting this error to be included in the perl error message. I was less lucky in that I could not work out which version of perl I should use to work around this issue (Apple or Macports, etc) i.e the one Parsetexi must have been built with. instmodsh did not list Parsetexi. The texinfo log file indicated it was configuring with Macports Perl 5.34 (the perl I get at the command line). No Parsetexi.c could be found on my disk.
I found Parsetexi.so in /opt/local/lib/, but no trace of where it had come from.

$ port provides /opt/local/lib/Parsetexi.so
/opt/local/lib/Parsetexi.so is not provided by a MacPorts port.

I believe all files in /opt/local/lib/ should have come from a MacPorts build, & I don't put anything in there, so either it has been put there by MacPorts, but MacPorts does not know this, or it is an old left over from something no longer provided (or maybe a temporary lib from a build). Simply moving it corrected the texinfo upgrade, and somehow, texinfo configured without needing it (or having a perl try to load it).

$ sudo mv /opt/local/lib/Parsetexi.so /opt/local/lib/Parsetexi.so.bad

I hope this helps you or others with these pesky "perl binaries are mismatched" issues. Perhaps you have a similar problem but with an old leftover library version (built under 5.30) earlier in a library path and now it is in the wrong place.

comment:16 Changed 6 weeks ago by ryandesign (Ryan Carsten Schmidt)

What about you, Sergey? Do you have any unexplained .so files in /opt/local/lib?

Note: See TracTickets for help on using tickets.