[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [microblaze-uclinux] errors on "make"



David,

I saw the same problems that you are now seeing.  I posted a message to
the uClinux group, but for some reason my message did not appear to get
broadcast.

I made changes to the uClinux-dist/include/Makefile
--- Makefile.original	2005-08-25 13:38:18.000000000 +0100
+++ Makefile	2005-08-25 15:42:47.000000000 +0100
@@ -6,12 +6,19 @@
 #
 
 #
+# we need the standard gcc includes
+#
+
+GCC_DIR   := $(shell $(CC) -v 2>&1|grep specs|sed -e 's/.*
\(.*\)specs/\1\./')
+
+#
 # glibc contains lots of nasty headers in a bad location,  so we need
 # to cheat a little here
 #
 
 LINKHDRS = \
 	$(ROOTDIR)/lib/STLport/stlport/*,STLport \
+	$(ROOTDIR)/uClibc/include/*,. \
 	$(ROOTDIR)/lib/libgmp/gmp.h,. \
 	$(ROOTDIR)/lib/libgmp/mp.h,. \
 	$(ROOTDIR)/lib/libgmp/gmp-impl.h,. \
@@ -44,6 +51,7 @@
 	$(ROOTDIR)/$(LINUXDIR)/include/asm,. \
 	$(ROOTDIR)/$(LINUXDIR)/include/mtd,. \
 	$(ROOTDIR)/config,. \
+	$(GCC_DIR)/include/*,include \
 	$(ROOTDIR)/lib/expat/lib/expat.h,. \
 	$(ROOTDIR)/user/tinytcl/*.h,. \
 	$(ROOTDIR)/prop/config/config*.h,. \
@@ -98,9 +106,11 @@
 			ln -s $$i $$dst/.; \
 		done ; \
 	done
-	@ln -s `$(CC) -print-file-name=include` gcc
+	@if [ ! -L gcc ]; then ln -s `$(CC) -print-file-name=include`
gcc; fi
 	@echo "Making include/c++ symlink to compiler c++ includes"
-	@ln -s /usr/local/include/g++-v3 c++
+	@if [ ! -L c++ ]; then ln -s /usr/local/include/g++-v3 c++; fi
 	@for i in `$(CXX) -v -xc++ /dev/null 2>&1 | sed -e '/^Reading
specs/,/^#include <\.\.\.>/d' \
          -e '/End of search list/Q'`; do \
 		if [ -f $$i/new ]; then rm -f c++; ln -s $$i c++; break;
fi; \
 	done
------------------------------------------------------------------------
------

After this, I got "crt0.o: No such file or directory" while building
agetty,
followed by many undefined references during the link.
I overcame this two issues with patch to uClinux/lib/Makefile
--- Makefile.original	2005-08-10 01:09:33.000000000 +0100
+++ Makefile	2005-08-29 11:17:12.000000000 +0100
@@ -130,6 +130,8 @@
 #
 #
 LINKLIBS=\
+	$(ROOTDIR)/lib/$(LIBCDIR)/lib/crt*.o \
+	$(ROOTDIR)/lib/$(LIBCDIR)/lib/*.a \
 	$(ROOTDIR)/lib/libjpeg/*.a \
 	$(ROOTDIR)/lib/libpng/*.a \
 	$(ROOTDIR)/lib/libm/*.a \
------------------------------------------------------------------------
------

I don't know if this is the correct approach to fixing these issues.
What I did
with these patches was to add back some lines that were removed from a
previous 
version of the files.

Conor

-----Original Message-----
From: owner-microblaze-uclinux@itee.uq.edu.au
[mailto:owner-microblaze-uclinux@itee.uq.edu.au] On Behalf Of Deli Geng
(David)
Sent: 08 September 2005 11:39
To: microblaze-uclinux@itee.uq.edu.au
Subject: [microblaze-uclinux] errors on "make"

Hi, there,

I got some errors on making the uClinux for MicroBlaze.

I'm using microblaze-elf-tools-20050308 and the source checked out from
the CVS. 

First, when I type "make" after all the configuration (Xilinx ML401). I
got an "ln" error in the dist/include folder. The message said
"include/gcc"
already exists when trying to create the symbol link. So I changed the
"ln -s" in the Makefile to "ln -sf". The making then passed this stage.

However, I got another error in the dist/lib/zlib folder. It complained
about not being able to find some include files, e.g. "string.h". I
found there is the "-nostdinc" option. OK, I manually compiled it
without the "-nostdinc" option. It passed anyway. But I'm still
wondering if it is really ok?????

Next, there is a similar error as attached. It looks like the similar
error with the zlib folder. However, I don't think it's a good idea to
keep manually compiling it.

So my questions are:

1. Will the force link "ln -sf" cause the later "include file can not
find"
problem?

2. Is the source checked from CVS reliable? Or I should apply some patch
first? BTW, the MicroBlaze-vendors-20050215.patch does not work well
with the CVS source.

3. Is there any special procedure for setting up the
microblaze-elf-tools so that some include files can be "seen" even with
the "-nostdinc" option?

I feel it might just several lines setting up things. Could anyone shed
me some light on it?

Apologize in advance if I asked stupid questions as a freshman.

Thanks a lot for any help.

Regards
David

Attached the error message.

make[2]: Entering directory
`/home/deli/uclinux/src/uClinux-dist/user/agetty'
mb-gcc  -Os -g -fomit-frame-pointer -fno-common -Wall   -mno-xl-soft-mul
-mxl-barrel-shift -mno-xl-soft-div -Dlinux -D__linux__ -Dunix
-D__uClinux__ -DEMBED -nostdinc
-I/home/deli/uclinux/src/uClinux-dist/include
-I/home/deli/uclinux/src/uClinux-dist/include/include -fno-builtin
-D__USE_BSD   -c -o agetty.o agetty.c
agetty.c:13: stdio.h: No such file or directory
agetty.c:14: unistd.h: No such file or directory
agetty.c:15: stdlib.h: No such file or directory
agetty.c:16: sys/ioctl.h: No such file or directory
agetty.c:17: termio.h: No such file or directory
agetty.c:18: signal.h: No such file or directory
agetty.c:19: errno.h: No such file or directory
agetty.c:20: sys/types.h: No such file or directory
agetty.c:21: sys/stat.h: No such file or directory
agetty.c:22: fcntl.h: No such file or directory
agetty.c:23: stdarg.h: No such file or directory
agetty.c:24: ctype.h: No such file or directory
agetty.c:25: utmp.h: No such file or directory
agetty.c:26: getopt.h: No such file or directory
agetty.c:27: memory.h: No such file or directory
agetty.c:28: sys/file.h: No such file or directory
agetty.c:31: sys/param.h: No such file or directory
agetty.c:39: syslog.h: No such file or directory


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/