problems with gnu make and stdout with uclibc nptl
Natanael Copa
natanael.copa at gmail.com
Sat Apr 3 18:13:59 UTC 2010
Hi,
I'm trying to rebuild all alpinelinux packages against uclibc-nptl.
This is native x86 compile.
When i built gcc the build script[1] failed after a while (20mins
something) with:
make: write error
when i entered the build dir and ran 'make' manually, it continued and
completed the build.
When I tried catch the error message by modifying the buildscript to:
make 2>errors.txt it completed.
I decided to move on with the other packages, with my newly built nptl
toolchain.
Now when i build ghostscript package[2] i get this:
In file included from ./base/gp_unix.c:17:
./base/pipe_.h:39: warning: function declaration isn't a prototype
./obj/gconfig.c:188: warning: no previous prototype for 'gs_lib_register_device
'
/usr/lib/gcc/i486-alpine-linux-uclibc/4.4.3/../../../libjasper.so: warning: the
use of `tmpnam' is dangerous, better use `mkstemp'
make: write error
This made me curious and I grepped for "write error" in the gnu make
sources[3] and found this:
void
close_stdout (void)
{
int prev_fail = ferror (stdout);
int fclose_fail = fclose (stdout);
if (prev_fail || fclose_fail)
{
if (fclose_fail)
error (NILF, _("write error: %s"), strerror (errno));
else
error (NILF, _("write error"));
exit (EXIT_FAILURE);
}
}
which means that stdout ends up with the error indicator set for some
reason. I suspect this is a bug in uclibc-nptl.
Interestingly enough, redirecting stdout to a file made the build complete.
Any ideas on how to trace this down?
Thanks!
[1] http://git.alpinelinux.org/cgit/aports/tree/main/gcc/APKBUILD
[2] http://git.alpinelinux.org/cgit/aports/tree/main/ghostscript/APKBUILD
[3] http://cvs.savannah.gnu.org/viewvc/make/misc.c?revision=1.80&root=make&view=markup
--
Natanael Copa
More information about the uClibc
mailing list