Opened 4 years ago

Last modified 3 years ago

#57252 new defect

p5.26-net-ssleay @1.850.0 - Fails to build after Mojave/Command Line Tools/MacPorts upgrade, assumes sysroot is full XCode installation

Reported by: sdohtem (Derek Coulter) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: p5-net-ssleay


After upgrading to macOS 10.14 Mojave, I re-installed XCode Command Line Tools (using xcode-select --install) and MacPorts 2.5.4 for Mojave (using the PKG installer). After these changes, the p5.26-net-ssleay port fails to build. All other ports I use install without issue. Twice I tried completely removing both Command Line Tools and MacPorts and then re-installing these and the ports I use, but without resolving the p5.26-net-ssleay failure. Prior to the upgrades, this port built without any issues.

Here is the output from port clean followed by port install:

$ sudo port clean p5.26-net-ssleay
Warning: xcodebuild exists but failed to execute
--->  Cleaning p5.26-net-ssleay

$ sudo port install p5.26-net-ssleay
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Computing dependencies for p5.26-net-ssleay
--->  Fetching archive for p5.26-net-ssleay
... Several 'Attempting to fetch' lines cut ...
--->  Attempting to fetch p5.26-net-ssleay-1.850.0_0.darwin_18.x86_64.tbz2 from
--->  Fetching distfiles for p5.26-net-ssleay
--->  Verifying checksums for p5.26-net-ssleay
--->  Extracting p5.26-net-ssleay
--->  Applying patches to p5.26-net-ssleay
--->  Configuring p5.26-net-ssleay
--->  Building p5.26-net-ssleay
Error: Failed to build p5.26-net-ssleay: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-net-ssleay/p5.26-net-ssleay/main.log for details.
Error: Follow to report a bug.
Error: Processing of port p5.26-net-ssleay failed

Attached is the main.log file that port install cites at the end of its output. I'm not an expert, but line 393 seems to show the culprit: The -isysroot compiler switch specifies a path that assumes the full XCode installation, which is not present on my system. Note that xcode-select -p returns the correct path to the Command Line Tools installation, which contains the SDK specified on line 393 of the log file.

Not sure if I'm doing something wrong. Hopefully there's a simple fix for this. Much appreciated if someone can suggest a reasonably easy workaround. Thanks in advance.

Attachments (1)

main.log (33.6 KB) - added by sdohtem (Derek Coulter) 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by sdohtem (Derek Coulter)

Attachment: main.log added

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

When perl gets built, it records some information that then gets used to build perl modules later. That includes the path to the SDK that was used. I guess you got a prebuilt binary from our build server, where we do have Xcode installed, so the path to Xcode got baked into perl.

Your options are either to install Xcode, so that those paths exist (this is the recommended solution), or rebuild perl5.26 from source with sudo port -ns upgrade --force perl5.26 so that it records the paths to the command line tools SDK instead.

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Port: p5-net-ssleay added; p5.26-net-ssleay removed

comment:3 Changed 4 years ago by sdohtem (Derek Coulter)

Forcing a source build did the trick. Thanks!!!

comment:4 Changed 3 years ago by engelfrost (Josef Engelfrost)

Note to anyone else finding this: I also had to re-install Command Line Tools after building Perl from source. Running xcode-select --install did not work - it just said Command Line Tools were already installed.

sudo port -ns upgrade --force perl5.26

softwareupdate --install Command\ Line\ Tools\ \(macOS\ Mojave\ version\ 10.14\)\ for\ Xcode-10.2

comment:5 Changed 3 years ago by mf2k (Frank Schima)

Error is:

:info:build In file included from SSLeay.xs:141:
:info:build /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE/perl.h:694:10: fatal error: 'sys/types.h' file not found
:info:build #include <sys/types.h>
:info:build          ^~~~~~~~~~~~~
:info:build 1 error generated.

comment:6 Changed 3 years ago by woolsweater (Josh Caswell)

One can also encounter this if Xcode has been renamed from /Applications/ (if keeping a few versions, for example). I had the same problem while installing git, and the failing dependency was p5.28-net-ssleay, not 5.26, but the resolution was the same: force a build of perl, then re-install the Command Line Tools.

Last edited 3 years ago by woolsweater (Josh Caswell) (previous) (diff)
Note: See TracTickets for help on using tickets.