#60973: Can't install/update nodejs14 with CLT but without XCode

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

#60973: Can't install/update nodejs14 with CLT but without XCode

macports-4
#60973: Can't install/update nodejs14 with CLT but without XCode
--------------------+----------------------
 Reporter:  xeron   |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  nodejs14
--------------------+----------------------
 {{{
 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.

--
Ticket URL: <https://trac.macports.org/ticket/60973>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode (was: Can't install/update nodejs14 with CLT but without XCode)

macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------
Changes (by ryandesign):

 * status:  new => assigned
 * cc: ci42 (removed)
 * owner:  (none) => ci42


Comment:

 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.

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by 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).

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by posita):

 Replying to [comment:2 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
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by posita):

 Replying to [comment:4 posita]:
 > Replying to [comment:2 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
 [https://trac.macports.org/wiki/howto/InstallingOlderPort#install these
 instructions]. Specifically,
 [https://trac.macports.org/wiki/howto/InstallingOlderPort#Step3:Buildthedownloadedport
 Step 3] would be:

 {{{#!sh
 $ 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:

 {{{#!diff
 diff --git a/devel/nodejs14/Portfile b/devel/nodejs14/Portfile
 index c61efcdd59f..0e0567ee644 100644
 --- a/devel/nodejs14/Portfile
 +++ b/devel/nodejs14/Portfile
 @@ -43,7 +43,7 @@ depends_lib             port:icu \
                          port:python38 \
                          path:lib/libssl.dylib:openssl

 -use_xcode               yes
 +use_xcode               no

  proc rec_glob {basedir pattern} {
      set files [glob -directory $basedir -nocomplain -type f $pattern]
 }}}

 See [https://perldoc.perl.org/perlrun.html perlrun(1)] for details about
 the above {{{perl}}} command.

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by posita):

 I have verified that the technique/patch described in comment:5 also works
 for {{{@14.15.0}}}.

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by xeron):

 https://github.com/macports/macports-ports/pull/9164

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by ryandesign):

 Replying to [comment:4 posita]:
 > Replying to [comment:2 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.

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: #60973: nodejs14: Can't install/update with CLT but without XCode

macports-4
In reply to this post by macports-4
#60973: nodejs14: Can't install/update with CLT but without XCode
-----------------------+----------------------
  Reporter:  xeron     |      Owner:  ci42
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  nodejs14  |
-----------------------+----------------------

Comment (by posita):

 This also applies to `nodejs15`, but 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
 …
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/60973#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS