>>#include "..." search starts here:
>>#include <...> search starts here:
>> /usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.60/include
>> /usr/local/arm/arm-linux/include
>>End of search list.
>>hello.c:1: stdio.h: No such file or directory
>>
>>It seems to be looking in the wrong place for the .h files as well as
other
>>things. They are there, but just not in the dirs it looks for.
>
>What directory are they in, in fact?  That search path looks pretty much
right
>to me.
>
>>3) Built GLIBC library
>
>You didn't mention what `configure' command you used for this.  I suspect
the
>problem may lie in the --prefix argument you used.
>
>p.
>
----------------------------------------------------------------------------
-------------------------
Hmmm...well I rebuilt the whole thing paying attention to --prefix, etc.
and got the same problem, somehow the configuration makes the
compiler search the wrong directories.....

What follows is all the gory details.....this is really frustrating
(especially
to my boss!).....

Thanks for any help/suggestions.

--------Here is how I built glibc--------------------
[root@harry Dave]# CC=arm-linux-gcc ./configure
arm-linux --build=i686-pc-linux-gnu
--prefix=/usr/local/arm/glibc/arm-linux-glibc --enable-add-ons
--with-headers=/usr/src/armlinux-2.2.12/linux/includels
make
make install

--------------This is what happens after trying the compiler on hello
workd-------

[root@harry Dave]# arm-linux-gcc -v -o helloarm hello.c
Reading specs from /usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990325/philb (egcs-1.1.2 release)

/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/cpp -lang-c -v -undef -D__
GNUC__=2 -D__GNUC_MINOR__=91 -Dunix -Darm -Dlinux -D__ELF__ -D__unix__ -D__a
rm__ -D__linux__ -D__ELF__ -D__unix -D__arm -D__linux -Asystem(unix) -Asyste
m(posix) -Acpu(arm) -Amachine(arm) -D__CHAR_UNSIGNED__ -D__ARM_ARCH_3__ -D__
APCS_32__ hello.c /tmp/cc7I7ALN.i
GNU CPP version egcs-2.91.66 19990325/philb (egcs-1.1.2 release) (ARM
GNU/Linux with ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/include
/usr/local/arm/arm-linux/include
End of search list.
hello.c:1: stdio.h: No such file or directory

----------------This appears to be where the *.h files actually
are!------------
[root@harry gz]# find /usr/local/arm -name "stdio.h"
/usr/local/arm/glibc/arm-linux-glibc/include/bits/stdio.h
/usr/local/arm/glibc/arm-linux-glibc/include/stdio.h

----So, let's look in the directories that arm-linux-gcc searches --------

[root@harry egcs-2.91.66]# pwd
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66

[root@harry egcs-2.91.66]# ls
cc1   cpp       crtbeginS.o  crtendS.o  libgcc.a
collect2  crtbegin.o  crtend.o    include    specs

[root@harry egcs-2.91.66]# cd include
[root@harry include]# pwd
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/include
root@harry include]# ls stdio.h
ls: stdio.h: No such file or directory

[root@harry include]# ls
README    new.h typeinfo      va-i960.h     va-pa.h va-v850.h
exception  proto.h va-alpha.h    va-m32r.h     va-ppc.h varargs.h
float.h    stdarg.h va-arc.h      va-m88k.h     va-pyr.h
iso646.h   stdbool.h va-clipper.h  va-mips.h     va-sh.h
limits.h   stddef.h va-h8300.h    va-mn10200.h  va-sparc.h
new    syslimits.h va-i860.h     va-mn10300.h  va-spur.h

------Hmmm. if I use -I option to show it where the *.h is, it fails at
link!------
...and can't find crt1.o ....

[root@harry Dave]#
arm-linux-gcc -v -I/usr/local/arm/glibc/arm-linux-glibc/include
                    -o features.helloarm hello.c
Reading specs from /usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990325/philb (egcs-1.1.2 release)
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/cpp -lang-c -v
-I/usr/local/arm/glibc/arm-linux-glibc/include -undef -D__GNUC__=2 -D__GNUC
_MINOR__=91 -Dunix -Darm -Dlinux -D__ELF__ -D__unix__ -D__arm__ -D__linux__
-D__ELF__ -D__unix -D__arm -D__linux -Asystem(unix) -Asystem(posix) -Acpu(ar
m) -Amachine(arm) -D__CHAR_UNSIGNED__ -D__ARM_ARCH_3__ -D__APCS_32__ hello.c
/tmp/ccVQVKnS.i
GNU CPP version egcs-2.91.66 19990325/philb (egcs-1.1.2 release) (ARM
GNU/Linux with ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/arm/glibc/arm-linux-glibc/include
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/include
/usr/local/arm/arm-linux/include
End of search list.
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/cc1
/tmp/ccVQVKnS.i -quiet -dumpbase hello.c -version -o /tmp/ccePzjkJ.s
GNU C version egcs-2.91.66 19990325/philb (egcs-1.1.2 release) (arm-linux)
compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
/usr/local/arm/arm-linux/bin/as -o /tmp/ccwiBqW7.o /tmp/ccePzjkJ.s
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/collect2 -dynamic-linker
/lib/ld-linux.so.2 -X -m elf32arm -o features.helloarm crt1.o crti.o
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/crtbegin.o -L/usr/local/ar
m/lib/gcc-lib/arm-linux/egcs-2.91.66 -L/usr/local/arm/arm-linux/lib
/tmp/ccwiBqW7.o -lgcc -lc -lgcc
/usr/local/arm/lib/gcc-lib/arm-linux/egcs-2.91.66/crtend.o crtn.o
/usr/local/arm/arm-linux/bin/ld: cannot open crt1.o: No such file or
directory
collect2: ld returned 1 exit status


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to