This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

parallel spu newlib build failures


Hi -

Sometime we are seeing parallel builds for SPU fail. I have not hit this
lately, it's very likely dependent on the system load and type of system,
plus (like we have for SPU) the existence of target specific header file
overrides.

The problem is that newlib gets built in parallel with libgloss, but the
newlib part of the build copies over target specific include files needed
by both newlib and libgloss.

For SPU the problem file has been custom_file.h, it is included by
reent.h, and that is included all over the place, including errno.h. If
the default newlib/libc/include/sys/custom_file.h is used we hit the
"#error System-specific custom_file.h is missing" in it.

So, if we try to compile libnosys/chown.c before newlib copies
newlib/libc/machine/spu/sys/custom_file.h to targ-include/sys, we get
compile time errors like:

/home/patman/src/s-cvs-newlib/quilt/newlib/libc/include/sys/custom_file.h:1:2: error: #error System-specific custom_file.h is missing.
In file included from /home/patman/src/s-cvs-newlib/quilt/newlib/libc/include/sys/errno.h:11,
                 from /home/patman/src/s-cvs-newlib/quilt/newlib/libc/include/errno.h:9,
                 from /home/patman/src/s-cvs-newlib/quilt/libgloss/libnosys/chown.c:8:
/home/patman/src/s-cvs-newlib/quilt/newlib/libc/include/sys/reent.h:267: error: expected specifier-qualifier-list before â__FILEâ
/home/patman/src/s-cvs-newlib/quilt/newlib/libc/include/sys/reent.h:571: error: expected specifier-qualifier-list before â__FILEâ
	

Any ideas on how to fix this? 

I haven't modified the top level newlib Makefiles before nor tried to
autogen them.

In the topmost Makefile, adding a target or such before all-target to do
something like "cd newlib; make stmp-targ-include" could work, but I'm
don't know exactly what is allowed there.

I always hit this failure when trying to build newlib and libgloss under
gcc. And with this patch I hit the failure everytime. (Using make -j4 on a
CELL blade):

Index: quilt/newlib/Makefile.am
===================================================================
--- quilt.orig/newlib/Makefile.am
+++ quilt/newlib/Makefile.am
@@ -195,6 +195,7 @@ all-recursive: stmp-targ-include
 stmp-targ-include: config.status
 	-rm -rf targ-include stmp-targ-include
 	mkdir targ-include targ-include/sys targ-include/machine targ-include/bits
+	sleep 30
 	cp newlib.h targ-include/newlib.h
 	-for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
 	    if [ -f $$i ]; then \
Index: quilt/newlib/Makefile.in
===================================================================
--- quilt.orig/newlib/Makefile.in
+++ quilt/newlib/Makefile.in
@@ -861,6 +861,7 @@ all-recursive: stmp-targ-include
 stmp-targ-include: config.status
 	-rm -rf targ-include stmp-targ-include
 	mkdir targ-include targ-include/sys targ-include/machine targ-include/bits
+	sleep 30
 	cp newlib.h targ-include/newlib.h
 	-for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
 	    if [ -f $$i ]; then \

-- Patrick Mansfield


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]