Opened 4 years ago
Last modified 4 years ago
#60973 assigned defect
nodejs14: Can't install/update with CLT but without XCode
Reported by: | xeron (Ivan Larionov) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | posita (Matt Bogosian) | |
Port: | nodejs14 |
Description
Error: Port nodejs14 requires a full Xcode installation, which was not found on your system. Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/ Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Probably due to use_xcode yes
.
But it worked before. I have 14.5.0
installed without XCode and it works just fine. Some other changes triggered this inability to install the port on CLT-only system.
I removed use_xcode yes
and updated to 14.7.0
without any issues.
Change History (9)
comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ci42 removed |
---|---|
Owner: | set to ci42 |
Status: | new → assigned |
Summary: | Can't install/update nodejs14 with CLT but without XCode → nodejs14: Can't install/update with CLT but without XCode |
comment:2 follow-up: 4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Since nodejs14 is distributable, you could have received a binary archive of 14.5.0 from our build server, on which we do have Xcode installed. Right now we don't have a binary of 14.7.0 available because the build system is busy building hundreds of ports for the preceding commit (which updated icu to a new version which necessitated rebuilding everything that links with icu).
comment:3 Changed 4 years ago by posita (Matt Bogosian)
Cc: | posita added |
---|
comment:4 follow-ups: 5 8 Changed 4 years ago by posita (Matt Bogosian)
Replying to ryandesign:
Since nodejs14 is distributable, you could have received a binary archive of 14.5.0 from our build server, on which we do have Xcode installed. Right now we don't have a binary of 14.7.0 available because the build system is busy building hundreds of ports for the preceding commit (which updated icu to a new version which necessitated rebuilding everything that links with icu).
How does one do that? I'm apparently not able to install from the binary archive:
% sudo port -N -c -b install nodejs14 @14.5.0 Error: Port nodejs14 requires a full Xcode installation, which was not found on your system. Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/ Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port nodejs14 failed
comment:5 Changed 4 years ago by posita (Matt Bogosian)
Replying to posita:
Replying to ryandesign:
Since nodejs14 is distributable, you could have received a binary archive of 14.5.0 from our build server … .
How does one do that? I'm apparently not able to install from the binary archive: …
Posterity compiling from sources can adapt these instructions. Specifically, Step 3 would be:
$ cd devel/nodejs14 $ perl -p -i -e 's/^(\s*use_xcode\s*)yes(\s*)$/\1no\2/g' Portfile # no longer require Xcode $ git diff # verify your change $ sudo port install
git diff
should show:
-
devel/nodejs14/Portfile
diff --git a/devel/nodejs14/Portfile b/devel/nodejs14/Portfile index c61efcdd59f..0e0567ee644 100644
a b depends_lib port:icu \ 43 43 port:python38 \ 44 44 path:lib/libssl.dylib:openssl 45 45 46 use_xcode yes46 use_xcode no 47 47 48 48 proc rec_glob {basedir pattern} { 49 49 set files [glob -directory $basedir -nocomplain -type f $pattern]
See perlrun(1) for details about the above perl
command.
comment:6 Changed 4 years ago by posita (Matt Bogosian)
I have verified that the technique/patch described in comment:5 also works for @14.15.0
.
comment:7 Changed 4 years ago by xeron (Ivan Larionov)
comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to posita:
Replying to ryandesign:
Since nodejs14 is distributable, you could have received a binary archive of 14.5.0 from our build server, on which we do have Xcode installed.
How does one do that?
You automatically receive a binary if one is available, unless you used the -s
flag or set buildfromsource always
in macports.conf. If a binary is not available, it builds from source, unless you use the -b
flag or set buildfromsource never
in macports.conf.
I'm apparently not able to install from the binary archive:
% sudo port -N -c -b install nodejs14 @14.5.0 Error: Port nodejs14 requires a full Xcode installation, which was not found on your system. Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/ Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port nodejs14 failed
Hm. I assumed that if a binary was available, MacPorts would forget about the Xcode check. If it does not, then I cannot explain your claim that "it worked before" since as I said "The nodejs14 port has always had use_xcode yes
in it".
Note that port install
does not accept a version number.
comment:9 Changed 4 years ago by posita (Matt Bogosian)
The technique described in comment:5 no longer works with either nodejs14
or nodejs15
. Here is the configuration failure from my attempt with nodejs15
, but nodejs14
behaves nearly identically:
% cd …/devel/nodejs15 % sudo perl -p -i -e 's/^(\s*use_xcode\s*)yes(\s*)$/\1no\2/g' Portfile % sudo port install ---> Computing dependencies for nodejs15 ---> Fetching distfiles for nodejs15 ---> Attempting to fetch node-v15.9.0.tar.xz from https://nodejs.org/dist/v15.9.0 ---> Verifying checksums for nodejs15 ---> Extracting nodejs15 ---> Applying patches to nodejs15 ---> Configuring nodejs15 Error: Failed to configure nodejs15: configure failure: command execution failed Error: See /opt/local/macports/var/macports/logs/_opt_local_macports-ports_devel_nodejs15/nodejs15/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port nodejs15 failed % sudo cat /opt/local/macports/var/macports/logs/_opt_local_macports-ports_devel_nodejs15/nodejs15/main.log … :info:configure Executing: cd "/opt/local/macports/var/macports/build/_opt_local_macports-ports_devel_nodejs15/nodejs15/work/node-v15.9.0" && ./conf igure --prefix=/opt/local/macports --without-npm --with-intl=system-icu --shared-openssl --shared-openssl-includes=/opt/local/macports/include/openssl --shared-openssl-libpath=/opt/local/macports/lib --dest-cpu=x64 :debug:configure system: cd "/opt/local/macports/var/macports/build/_opt_local_macports-ports_devel_nodejs15/nodejs15/work/node-v15.9.0" && ./config ure --prefix=/opt/local/macports --without-npm --with-intl=system-icu --shared-openssl --shared-openssl-includes=/opt/local/macports/include /openssl --shared-openssl-libpath=/opt/local/macports/lib --dest-cpu=x64 :info:configure No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. :info:configure No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. :info:configure No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. :info:configure Node.js configure: Found Python 3.9.2... :info:configure Traceback (most recent call last): :info:configure File "tools/gyp/pylib/gyp/xcode_emulation.py", line 1505, in XcodeVersion :info:configure version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() :info:configure File "tools/gyp/pylib/gyp/xcode_emulation.py", line 1568, in GetStdoutQuiet :info:configure raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) :info:configure gyp.common.GypError: Error 1 running xcodebuild :info:configure During handling of the above exception, another exception occurred: :info:configure Traceback (most recent call last): … :info:configure File "tools/gyp/pylib/gyp/xcode_emulation.py", line 1554, in CLTVersion :info:configure return re.search(regex, output).groupdict()["version"] :info:configure AttributeError: 'NoneType' object has no attribute 'groupdict' :info:configure Command failed: cd "/opt/local/macports/var/macports/build/_opt_local_macports-ports_devel_nodejs15/nodejs15/work/node-v15.9.0" && ./configure --prefix=/opt/local/macports --without-npm --with-intl=system-icu --shared-openssl --shared-openssl-includes=/opt/local/macports/ include/openssl --shared-openssl-libpath=/opt/local/macports/lib --dest-cpu=x64 :info:configure Exit code: 1 …
The nodejs14 port has always had
use_xcode yes
in it ever since it was created by copying and modifying the nodejs13 port. And it was added to the nodejs13 and earlier ports around February of this year. If it turns out that this was unnecessary, it can certainly be removed. The commit messages don't say why it was added but presumably it was done for a reason.