getting macports working.

Ryan Schmidt ryandesign at macports.org
Thu Jul 12 01:23:54 PDT 2012


On Jul 10, 2012, at 06:46, jlm at justinfront.net wrote:

> On Jul 10, 2012, at 05:32, Ryan Schmidt wrote:
> 
>> On Jul 10, 2012, at 04:22, jlm at justinfront.net wrote:
>> 
>>> sudo port update outdated
>>> 
>>> gives the following error log for perl...
>> 
>>> :info:configure Use which C compiler? [/usr/bin/gcc-4.0]  
>>> :info:configure Checking for GNU cc in disguise and/or its version number...
>>> :info:configure try.c:1:19: error: /usr/local/include/stdio.h: Permission denied
>>> :info:configure try.c: In function 'main':
>>> :info:configure try.c:5: warning: incompatible implicit declaration of built-in function 'printf'
>>> :info:configure *** WHOA THERE!!! ***
>>> :info:configure     Your C compiler "/usr/bin/gcc-4.0" doesn't seem to be working!
>>> :info:configure     You'd better start hunting for one and let me know about it.
>> 
>> The file /usr/local/include/stdio.h is interfering with the build. Please delete it and anything else you may have in /usr/local, then clean perl5.12 and try again.
> 
> I have lots of things in usr/local I can't possibly delete them, for instance that is where haxe is installed but I have lots of things in there I can't destroy my setup just to get macports working I am sure it was working along side this before.  There is no /usr/local/include/stdio.h file.  I can compile the make for haxe using gcc46 that was installed via macports without problems in the past.  Trying      sudo port install perl5.16 configure.compiler=macports-gcc-4.6
> but python26 is failing, so I try to install that separately... but now openssl is failing, I can post the log, but fairly sure I had python etc installed already.
> 
> My macports was working in the past.... just want to use it again, and can't destroy my usr/local folder.

It's fairly common for software installed in /usr/local to conflict with what MacPorts is trying to do, and based on the presence of the string "/usr/local" in the error message you showed, this appears to be what has happened in your case. This is because the compiler will look for headers and libraries in /usr/local even though we're not telling it to; in fact, we don't know how to tell the compiler not to do that. Also, some ports may hardcode /usr/local as a location where they will look for headers, libraries, or even binaries. Therefore we have to take the position that if you have things installed in /usr/local and things aren't working, we ask you to move /usr/local aside, then "sudo port clean" the affected port and try again, and if that works, then that is the extent of the solution we will offer. We are volunteers and have limited time, and want to concentrate our efforts where they can do the most good. MacPorts *may* work even if you install other software in /usr/local, but we don't offer support for that configuration, so if you want to continue doing that, you'll have to handle any resulting problems yourself.

We believe better solutions would be to either install your extra software (like haxe) in any other directory (other than /usr/local or /usr), or if possible write a Portfile for it so that it can be installed with MacPorts. I only recently discovered haxe myself and was considering making a Portfile for it, but it's not currently on my to-do list.




More information about the macports-dev mailing list