Opened 11 years ago
Closed 11 years ago
#39699 closed defect (invalid)
Unable to build due to unknown compiler version?
Reported by: | frankdmartinez@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.1.3 |
Keywords: | Cc: | ||
Port: |
Description
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.
Attachments (1)
Change History (14)
comment:1 follow-up: 3 Changed 11 years ago by mf2k (Frank Schima)
Component: | ports → base |
---|---|
Priority: | High → Normal |
comment:2 follow-up: 4 Changed 11 years ago by larryv (Lawrence Velázquez)
And did you install Xcode’s Command Line tools? If so, what does this return?
% /usr/bin/clang --version
comment:3 Changed 11 years ago by frankdmartinez@…
Replying to 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.
comment:4 follow-up: 5 Changed 11 years ago by frankdmartinez@…
Replying to larryv@…:
And did you 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
Target: i386-apple-darwin9.8.0
Thread model: posix
comment:5 follow-up: 6 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to 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
Target: i386-apple-darwin9.8.0
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.
comment:6 follow-up: 7 Changed 11 years ago by frankdmartinez@…
Replying to 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?
comment:7 follow-up: 8 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to 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?
Changed 11 years ago by frankdmartinez@…
Attachment: | mp-out.txt added |
---|
comment:8 follow-up: 9 Changed 11 years ago by frankdmartinez@…
Replying to 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.
comment:9 follow-up: 10 Changed 11 years ago by larryv (Lawrence Velázquez)
Do these commands return anything?
% which -a clang % xcrun -verbose -find clang
comment:10 Changed 11 years ago by frankdmartinez@…
Replying to 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.
comment:11 follow-up: 12 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
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.
comment:12 follow-up: 13 Changed 11 years ago by frankdmartinez@…
Replying to 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!
comment:13 Changed 11 years ago by larryv (Lawrence Velázquez)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Replying to frankdmartinez@…:
It looks like that worked, thanks!
Good to hear. For reference, we have an FAQ on /usr/local
.
The priority field is reserved for use by Macports team members only.
What is the output of the following?