#58016 closed enhancement (fixed)
Unnecessary warning about Xcode and xcodebuild when installing port
Reported by: | gagarine (Simon) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.6.0 |
Component: | base | Version: | 2.5.4 |
Keywords: | Cc: | isviridov | |
Port: |
Description
I only installed the command line tools without installing the full Xcode.
I do have the necessary tools:
$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
But macports is printing two warnings when using port install:
Warning: xcodebuild exists but failed to execute Warning: Xcode does not appear to be installed; most ports will likely fail to build.
Change History (16)
comment:1 follow-up: 3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 follow-up: 5 Changed 6 years ago by gagarine (Simon)
simon@computer /> xcodebuild -version Xcode 10.1 Build version 10B61
I notice I didn't compile any package I believe (only installed already compiled binaries). Is their a way I can force compiling so I can test it really works?
comment:3 Changed 6 years ago by jmroot (Joshua Root)
Replying to ryandesign:
The message that xcodebuild exists but failed to execute is more curious and should probably not be happening. What happens when you run e.g.
xcodebuild -version
?
It's not curious if Xcode is actually not installed; xcodebuild -version
does fail in that case and that's how base knows Xcode is not installed. See e.g. comment:ticket:57994:4
comment:4 Changed 6 years ago by gagarine (Simon)
I just installed Xcode and both messages disappear.
comment:5 Changed 6 years ago by jmroot (Joshua Root)
Replying to gagarine:
I notice I didn't compile any package I believe (only installed already compiled binaries). Is their a way I can force compiling so I can test it really works?
Sure, use the -s option, e.g. sudo port -vs destroot pinentry-mac
(this is a port that needs xcodebuild)
comment:6 Changed 6 years ago by gagarine (Simon)
Oh yes. I'm sorry. So I tried now to uninstall xcode and I get this after uninstalling xcode (but not the tools)
simon@computer /> xcodebuild -version xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
comment:7 Changed 6 years ago by gagarine (Simon)
@jmort yes sudo port -vs destroot pinentry-mac fail without xcode.
But I was able to install gmp without. So perhaps a better message would be "some port may fail" when xcode is not installed but command line tools are?
comment:8 Changed 6 years ago by jmroot (Joshua Root)
So yeah, the "most ports" part of the message may be an exaggeration these days, but there are still quite a few that won't build without a full Xcode installation.
comment:9 Changed 6 years ago by gagarine (Simon)
I know those are details, but it can help a lot to avoid confusion. Especially "port install" is going to be the first command that a new user try. Having a warning their is certainly not the best experience.
To avoid "Warning: xcodebuild exists but failed to execute" we can know if dev tool are installed using
xcode-select -p
or
xcode-select -version
Then for the "Warning: Xcode does not appear to be installed; most ports will likely fail to build." perhaps somethings like "Xcode does not appear to be installed; some ports may fail to build. To hide this message in the future type 'port xcode-warning-hide'".
comment:10 Changed 6 years ago by isviridov
Cc: | isviridov added |
---|
comment:11 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | Unecessary Warning about Xcode and xcodebuild when installing port → Unnecessary warning about Xcode and xcodebuild when installing port |
---|
comment:12 Changed 5 years ago by Satryaji Aulia <satraul@…>
comment:13 Changed 5 years ago by Satryaji Aulia <satraul@…>
comment:14 Changed 5 years ago by neverpanic (Clemens Lang)
Milestone: | → MacPorts Future |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:15 Changed 5 years ago by Satryaji Aulia <satraul@…>
comment:16 Changed 5 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.6.0 |
---|
The message that Xcode does not appear to be installed dates from a time before the command line tools were a separate installation. Perhaps we need to revisit it. Nevertheless, we do currently still recommend you install Xcode, not just the command line tools. Not installing Xcode will cause some ports to fail to build.
The message that xcodebuild exists but failed to execute is more curious and should probably not be happening. What happens when you run e.g.
xcodebuild -version
?