[MacPorts] #39699: Unable to build due to unknown compiler version?
#39699: Unable to build due to unknown compiler version? ------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: ------------------------------+-------------------------------- Running on 10.5, trying to build anything available thru MP, I receive this diagnostic: Unable to open port: can't set "compiler.blacklist": couldn't determine build number of compiler "clang". I have searched the web for a work-around and found nothing. If Anyone could point Me in the direction of information on how to either work around this error, fix it, or avoid it entirely, I would be most appreciative because, otherwise, MP simply will not work. -- Ticket URL: <https://trac.macports.org/ticket/39699> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Changes (by macsforever2000@…): * priority: High => Normal * component: ports => base Comment: The priority field is reserved for use by Macports team members only. What is the output of the following? {{{ port version }}} -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by larryv@…): And did you [[ProblemHotlist#clt|install Xcode’s Command Line tools]]? If so, what does this return? {{{ % /usr/bin/clang --version }}} -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:1 macsforever2000@…]:
The priority field is reserved for use by Macports team members only.
Then, why is the dropdown box enabled for non-Members? Having it activated for non-Members is an open invitation for Them to set it Themselves.
What is the output of the following?
{{{ port version }}}
As noted when I filed the report, 2.1.3. -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:2 larryv@…]:
And did you [[ProblemHotlist#clt|install Xcode’s Command Line tools]]? If so, what does this return? {{{ % /usr/bin/clang --version }}} My copy of Xcode does not have "Downloads" in the "Preferences" panel and if I have installed the CLTs, it was a long time ago. My copy of clang, located at /usr/local/bin/clang, was obtained from MacPorts and "clang --version" returns:
clang version 3.3 [[BR]] Target: i386-apple-darwin9.8.0[[BR]] Thread model: posix
-- Ticket URL: <https://trac.macports.org/ticket/39699#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:4 frankdmartinez@…]:
My copy of Xcode does not have "Downloads" in the "Preferences" panel and if I have installed the CLTs, it was a long time ago.
Never mind, if you’re on 10.5 you probably have Xcode 3.1.4.
My copy of clang, located at /usr/local/bin/clang, was obtained from MacPorts and "clang --version" returns:
clang version 3.3 [[BR]] Target: i386-apple-darwin9.8.0[[BR]] Thread model: posix
Did you put it there yourself? MacPorts does not put anything in `/usr/local/bin`. In any case, MacPorts will also not use any tools in `/usr/local/bin`. Can you try installing a port and attach the `main.log` when it fails? MacPorts shouldn’t even be trying to use Clang with Xcode older than 3.2. -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:5 larryv@…]:
Did you put it there yourself? MacPorts does not put anything in
`/usr/local/bin`. In any case, MacPorts will also not use any tools in `/usr/local/bin`. Very curious, indeed. Is there a way to know which `clang` it is trying to use? While I doubt I have more than one `clang`, I could be wrong.
Can you try installing a port and attach the `main.log` when it fails?
MacPorts shouldn’t even be trying to use Clang with Xcode older than 3.2. Sure, where can I find that file? -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:6 frankdmartinez@…]:
Can you try installing a port and attach the `main.log` when it fails? MacPorts shouldn’t even be trying to use Clang with Xcode older than 3.2. Sure, where can I find that file?
Actually, if MacPorts is failing at opening the Portfile at all, there might not be a `main.log` to attach. Could you try installing with debug output (i.e., `port -d install`), copying whatever output you see to a text file, and attaching it to this ticket? -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:7 larryv@…]:
Actually, if MacPorts is failing at opening the Portfile at all, there
might not be a `main.log` to attach. Could you try installing with debug output (i.e., `port -d install`), copying whatever output you see to a text file, and attaching it to this ticket? Attached. -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by larryv@…): Does these commands return anything? {{{ % which -a clang % xcrun -verbose -find clang }}} -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:9 larryv@…]:
Does these commands return anything? {{{ % which -a clang % xcrun -verbose -find clang }}} They return /usr/local/bin/clang and xcrun via xcrun (xcrun) DEVELOPER_DIR = '/Developer' via '/usr/share/xcode-select/xcode_dir_path' Database Key is: clang____/Developer____ Looking up with '/Developer/usr/bin/xcodebuild -sdk '' -find 'clang'' Lookup resolved with 'xcodebuild -find' : '/usr/local/bin/clang' cached in '/var/folders/Qe/QeIh0fytEYaAKflcqHsxaU+++TI/-Tmp-/xcrun_db' failed -1 updating 'xcrun' /usr/local/bin/clang respectively.
-- Ticket URL: <https://trac.macports.org/ticket/39699#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by ryandesign@…): So, regrettably, `xcrun` is finding your separately-installed copy of clang in /usr/local. I had not anticipated that this would happen when I wrote the compiler_blacklist_versions portgroup, and probably other parts of MacPorts that use the `find_developer_tool` proc (which uses `xcrun` internally) will be surprised by this as well, and perhaps we should do something in MacPorts to stop that or work around it. However, it is an established MacPorts policy that we do not support users installing software in /usr/local, for precisely this reason: software (in this case `xcrun`) can find software installed there (in this case clang) and this can cause unexpected problems. Please remove /usr/local and the problem should go away. For clang 3.3, or any other software you have installed in /usr/local that you want to keep, you should install it with MacPorts instead. -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | -------------------------------+-------------------------------- Comment (by frankdmartinez@…): Replying to [comment:11 ryandesign@…]:
However, it is an established MacPorts policy that we do not support users installing software in /usr/local, for precisely this reason: software (in this case `xcrun`) can find software installed there (in this case clang) and this can cause unexpected problems. Please remove /usr/local and the problem should go away. For clang 3.3, or any other software you have installed in /usr/local that you want to keep, you should install it with MacPorts instead. It looks like that worked, thanks!
-- Ticket URL: <https://trac.macports.org/ticket/39699#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#39699: Unable to build due to unknown compiler version? -------------------------------+-------------------------------- Reporter: frankdmartinez@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: invalid | Keywords: Port: | -------------------------------+-------------------------------- Changes (by larryv@…): * status: new => closed * resolution: => invalid Comment: Replying to [comment:12 frankdmartinez@…]:
It looks like that worked, thanks!
Good to hear. For reference, we have [[FAQ#usrlocal|an FAQ]] on `/usr/local`. -- Ticket URL: <https://trac.macports.org/ticket/39699#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts