[uClibc] Compile problems
Alexander van Heukelum
heukelum at freemail.nl
Wed Apr 21 18:01:47 UTC 2004
Hi all,
Just reporting some minor compile problems...
Compiling the fresh uClibc snapshot (with gcc 3.4.0, mostly allyesconfig,
using -g -Os instead of -g3 -O0) gave me the following error:
gmon.c:518: error: conflicting types for '__mcount_internal'
This can be tracked back to libc/sysdeps/linux/i386/bits/machine-gmon.h
which has the following line...
extern void mcount_internal (u_long frompc, u_long selfpc);
... immediately followed by this:
#define _MCOUNT_DECL(frompc, selfpc) \
void __attribute__ (( regparm (2) )) mcount_internal (u_long frompc, u_long
selfpc)
Adding "__attribute__ (( regparm (2) ))" to the declaration itself
solved the problem. Changing it to "extern _MCOUNT_DECL(frompc,
selfpc);" and reordering seems more appropriate.
The following problem was:
gmon-start.c: Assembler messages:
gmon-start.c:16: Error: file number 1 already allocated
make[4]: *** [gcrt1.o] Error 1
make[4]: Leaving directory `/usr/src/uClibc/libc/sysdeps/linux/i386'
Which I bypassed at first by commenting out line 16 of
libc/sysdeps/linux/i386/gmon-start.S:
.file 1 "../common/gmon-start.c"
But this is no solution, because gmon-start.S is a generated file. The
.file-line is only added when compiling with debugging information. The
problem is that gmon-start.S is #include'd by crt0.S. A hacky solution
is to change $(CFLAGS) used for generating gmon-start.S to
$(CFLAGS:-g3=) in uClibc/libc/sysdeps/linux/i386/Makefile. Maybe the
best solution is not to rely on CFLAGS at all to generate gmon-start.S.
Just replace $(CFLAGS) with -Os on that line, for example?
These changes make things compile, but I'm not sure whether they are
correct fixes.
The last problem occured on "make install":
make: execvp: extra/scripts/relative_path.sh: Permission denied
because the script was not executable.
Greetings,
Alexander
More information about the uClibc
mailing list