Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#58572 closed defect (worksforme)

perl5.28 @5.28.2: build failure on macOS Catalina

Reported by: vtta Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: catalina Cc: Knapoc
Port: perl5.28

Description

I tried to install neovim which depends on perl5.28, while building perl5.28 I got

dyld: Library not loaded: /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/libperl.dylib
  Referenced from: /opt/local/var/macports/build/_opt_mports_macports-ports_lang_perl5/perl5.28/work/perl-5.28.2/dist/Storable/../../../../../../../../../../../../../../../opt/local/var/macports/build/_opt_mports_macports-ports_lang_perl5/perl5.28/work/perl-5.28.2/perl
  Reason: image not found
make[1]: *** [lib/Storable/Limit.pm] Abort trap: 6
make[1]: Entering directory `/opt/local/var/macports/build/_opt_mports_macports-ports_lang_perl5/perl5.28/work/perl-5.28.2/dist/threads-shared'
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_mports_macports-ports_lang_perl5/perl5.28/work/perl-5.28.2/dist/Storable'
make: *** [dist/Storable/lib/Storable/Limit.pm] Error 2
...
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_macports-ports_lang_perl5/perl5.28/work/perl-5.28.2" && /usr/bin/make -j4 -w all
Exit code: 2
Error: Failed to build perl5.28: command execution failed
Error: See /opt/local/var/macports/logs/_opt_mports_macports-ports_lang_perl5/perl5.28/main.log for details.

Tried to port clean perl5.28 port clean neovim then port install perl5.28 and got the same result.

My macports installation is brand new with nothing but some deps of neovim installed.

Full error log attached below. /opt/local/var/macports/logs/_opt_mports_macports-ports_lang_perl5/perl5.28/main.log

Attachments (2)

main.log (386.0 KB) - added by vtta 5 years ago.
/opt/local/var/macports/logs/_opt_mports_macports-ports_lang_perl5/perl5.28/main.log
main.2.log (386.3 KB) - added by Knapoc 5 years ago.
main.log

Download all attachments as: .zip

Change History (17)

Changed 5 years ago by vtta

Attachment: main.log added

/opt/local/var/macports/logs/_opt_mports_macports-ports_lang_perl5/perl5.28/main.log

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Owner: changed from mojca@… to mojca

Please see wiki:FAQ#prerelease

comment:2 Changed 5 years ago by vtta

OK, fixed it anyway.

The problem is not about macOS itself, it's that you need perl5.28 to build perl5.28. So, I just grabbed the latest binary package from https://mirrors.tuna.tsinghua.edu.cn/macports/packages/perl5.28/?C=M&O=D Copyed the libperl library to /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/libperl.dylib, then built again, it worked.

comment:3 Changed 5 years ago by mojca (Mojca Miklavec)

This doesn't look like OS-specific problem, but I'm unable to reproduce it on an earlier OS even after uninstalling perl5.28 and building it from source. Would you be willing to ask upstream (for example on IRC) for assistance?

We had that problem for a very long time which is why I didn't add perl5.28 at all for a very long time, but it was somehow fixed, I should check when and how.

Last edited 5 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:4 Changed 5 years ago by mojca (Mojca Miklavec)

Wait ... the following line seems suspicious:

	case "$osvers" in
	        1[5-9]*|[2-9]*)
			shrpldflags="$shrpldflags -install_name `pwd`/\$@ -Xlinker -headerpad_max_install_names"
			exeldflags="-Xlinker -headerpad_max_install_names"
			;;
		*)
			shrpldflags="$shrpldflags -install_name \$(shrpdir)/\$@"
			;;
		esac
	

It was backported from a newer version of perl, so this is an upstream problem (which might be trivial to fix on our side).

Does perl5.30 work for you?

comment:5 Changed 5 years ago by mojca (Mojca Miklavec)

It looks like the version was not correctly parsed. What does uname -a return on your machine.

I filed a ticket and I'm tempted to simply disable "this is not 10.11 or later" checks.

https://rt.perl.org/Ticket/Display.html?id=134259

Last edited 5 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:6 Changed 5 years ago by mojca (Mojca Miklavec)

Dear vtta, can we please get some further feedback from you? The output of uname -a, in particular. Thanks.

comment:7 Changed 5 years ago by vtta

Sorry for the delay, I totally forgot about this thing.

The output of uname -a in VM:

Darwin vttas-iMac.local 19.0.0 Darwin Kernel Version 19.0.0: Thu Jun 27 20:18:24 PDT 2019; root:xnu-6153.0.13.131.3~1/RELEASE_X86_64 x86_64

I installed a new and clean VM running macOS 10.15 dev beta 3, and restored the packages installed on my MacBook which is running the same version of macOS.

I followed instructions mentioned here https://trac.macports.org/wiki/Migration, and perl5.28 built successfully, but the log seemed to be deleted right away, when I check, there is nothing.

I guess the problem I encountered in dev beta 1 may be caused by the conflicts between Xcode and Xcode-beta?

In dev beta 1, I have Xcode installed first then installed Xcode-beta, I remembered that there is a soft link in /Library/Developer/CommandLineTools/SDKs which links MacOSX10.15.sdk to MacOSX.sdk, but in the new VM, it’s MacOSX.sdk points to MacOSX10.15.sdk.

In other words, maybe in dev beta 1 I built things using MacOSX.sdk which is actually MacOSX10.14.sdk, but in the new VM, I got the right version of SDK to build things.

About perl5.30, I remembered that when I failed to install perl5.28, I tried to install perl5.30, and it build and worked just fine.

If you need anything else please reply, I’m happy to help

Version 0, edited 5 years ago by vtta (next)

comment:8 Changed 5 years ago by vtta

BTW, although I don’t code in perl, but it’s definitely clearer and easier to use uname -s and uname -r to check for OS and version.

comment:9 Changed 5 years ago by kencu (Ken)

Would you say we can close this ticket, then? Sounds like that is what you mean.

comment:10 Changed 5 years ago by vtta

Sure you can

comment:11 Changed 5 years ago by kencu (Ken)

Resolution: worksforme
Status: assignedclosed

comment:12 Changed 5 years ago by Knapoc

It seems that I have the same issue. libperl.dylib gets created under /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.28/work/perl-5.28.2/

As soon as I copy the file to /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/libperl.dylib the build is successful.

My uname -a output: Darwin xxxxxxx’s MacBook Pro 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64

The build-log is attached.

Last edited 5 years ago by Knapoc (previous) (diff)

Changed 5 years ago by Knapoc

Attachment: main.2.log added

main.log

comment:13 Changed 5 years ago by Knapoc

Cc: Knapoc added

comment:14 Changed 5 years ago by Knapoc

@Mojca: your suspicion is correct. Changing the host name temporarily to one without spaces fixed the issue.

comment:15 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

How would your hostname have ended up with spaces in it? That's invalid.

Note: See TracTickets for help on using tickets.