The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   ./configure fails for all packages (http://hintsforums.macworld.com/showthread.php?t=27941)

hayne 09-15-2004 03:51 AM

Quote:

Originally Posted by paragonconcept
teleform:~ johnmurphy$ echo 'int main(){return 0;}' > test.c
teleform:~ johnmurphy$ gcc test.c
cc1: /usr/local/include: Not a directory

Well, this does indeed seem like fertile ground for debugging.
Not only do I not know why you would get that error, I don't know why you would get any error at all.

Please show us the results of the following commands (copy & paste the commands into Terminal to be sure to get them exactly the same):

which gcc

ls -l `which gcc`

ls -ld /usr/local/include

env

paragonconcept 09-15-2004 06:20 AM

teleform://usr/bin johnmurphy$ which gcc
/usr/bin/gcc
teleform://usr/bin johnmurphy$ ls -l `which gcc`
lrwxr-xr-x 1 root wheel 7 13 Sep 19:48 /usr/bin/gcc -> gcc-3.3
teleform://usr/bin johnmurphy$ ls -ld /usr/local/include
-rw-r--r-- 1 root wheel 5824 12 Sep 15:21 /usr/local/include
teleform://usr/bin johnmurphy$ env
MANPATH=/sw/share/man:/usr/share/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
TERM_PROGRAM_VERSION=100
QTDIR=/sw
SGML_CATALOG_FILES=/sw/etc/sgml/catalog
USER=johnmurphy
GDK_USE_XFT=1
KDEDIR=/sw
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
XML_CATALOG_FILES=/sw/etc/xml/catalog
PWD=//usr/bin
QMAKESPEC=/sw/share/qt3/mkspecs/darwin-g++
SHLVL=1
HOME=/Users/johnmurphy
LOGNAME=johnmurphy
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
SECURITYSESSIONID=20f510
_=/usr/bin/env
OLDPWD=//usr

hayne 09-15-2004 10:32 AM

Quote:

Originally Posted by paragonconcept
teleform://usr/bin johnmurphy$ ls -l `which gcc`
lrwxr-xr-x 1 root wheel 7 13 Sep 19:48 /usr/bin/gcc -> gcc-3.3

Okay, just to check, please show us the result of:

ls -l /usr/bin/gcc-3.3

Quote:

teleform://usr/bin johnmurphy$ ls -ld /usr/local/include
-rw-r--r-- 1 root wheel 5824 12 Sep 15:21 /usr/local/include
I don't understand why gcc is looking in /usr/local/include, but it appears to be (from the previous test where you compiled a trivial C program). And your /usr/local/include is a file (as seen from the above 'ls -ld') not a directory as it should be.
Where did this file come from?
What is in it? You could start by seeing what the 'file' command tells you about it:

file /usr/local/include

And look at the first part of the contents like this:

hexdump -c /usr/local/include | head -20

If you conclude that this is a garbage file, then delete it. Otherwise try just moving it elsewhere. (There is no need to create a directory /usr/local/include to replace it - I don't have one on my system and everything works fine.)
Then do the compile of the trivial C program again and show us the results:

echo 'int main(){return 0;}' > test.c
gcc test.c

sao 09-15-2004 11:04 AM

paragonconcept,

It looks you have libraries in /usr/local/lib or headers in /usr/local/include. Try renaming /usr/local to something else, for example:

sudo mv /usr/local /usr/local.moved

Then, as you have fink installed, please try to compile a small package with Fink, and see if it works...


.

blb 09-15-2004 04:39 PM

I believe /usr/local is a directory gcc likes to check for includes/libs by default. Since it looks like paragonconcept installed something at some point which assumed /usr/local/include already existed as a directory when it didn't, the file that something installed became "include" (eg, cp myheader.h /usr/local/include assumes the directory already exists).

If it can be determined what that file should be called, it should be renamed, so /usr/local/include can be made a directory, then that original file placed inside it.

hayne 09-15-2004 04:46 PM

Quote:

Originally Posted by blb
it looks like paragonconcept installed something at some point which assumed /usr/local/include already existed as a directory when it didn't, the file that something installed became "include" (eg, cp myheader.h /usr/local/include assumes the directory already exists)

Excellent and very plausible theory of what has happened!
Since whatever program installed this header file that is currently at /usr/local/include is obviously not finding its header file (since it is looking for it inside /usr/local/include, it won't break anything to just rename that file to foo.h and get on with the main task.

paragonconcept:
We're waiting to hear what happens when you rename the file that is currently at /usr/local/include and retry compiling that trivial C program:

mv /usr/local/include /usr/local/foo.h

echo 'int main(){return 0;}' > test.c
gcc test.c

paragonconcept 09-16-2004 12:56 AM

Quote:

Originally Posted by hayne
Excellent and very plausible theory of what has happened!
Since whatever program installed this header file that is currently at /usr/local/include is obviously not finding its header file (since it is looking for it inside /usr/local/include, it won't break anything to just rename that file to foo.h and get on with the main task.

paragonconcept:
We're waiting to hear what happens when you rename the file that is currently at /usr/local/include and retry compiling that trivial C program:

mv /usr/local/include /usr/local/foo.h

echo 'int main(){return 0;}' > test.c
gcc test.c

teleform:/Users/johnmurphy root#
teleform:/Users/johnmurphy root# mv /usr/local/include /usr/local/foo.h
teleform:/Users/johnmurphy root# echo 'int main(){return 0;}' > test.c
teleform:/Users/johnmurphy root# gcc test.c
teleform:/Users/johnmurphy root#


looking good! let me go try and run ./configure


!!!SUCCESS!!!!

thank you all very much for your help - this has been a frusrating experience. Its good to know that forums like this exists.

paragonconcept 09-16-2004 04:06 AM

hrmmm that file has come back ..... i changed it again and it fixed my errors ......

hayne 09-16-2004 10:40 AM

Quote:

Originally Posted by paragonconcept
hrmmm that file has come back

It seems that (according to blb's theory) something that you are installing is assuming that there is a /usr/local/include folder - so maybe you should create one:

mkdir /usr/local/include

Of course, whatever software whose installer was trying to put those files into /usr/local/include may need to be reinstalled since its files didn't make it into the folder it expected. Don't worry about this until you see a problem.

paragonconcept 10-27-2004 05:20 PM

its back.....
 
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables

root# echo 'int main(){return 0;}' > test.c
root# gcc test.c
/var/tmp//ccK84GdY.s:18:Unknown pseudo-op: .subsections_via_symbols
:eek:


even though this sounds similar im not sure if it is - so im gonna start a new post


All times are GMT -5. The time now is 05:55 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.