Kevin Day wrote:
Apparently with freetype, including #include <bits/libc-lock.h> causes
compile time errors.
The error has something to do with line 309 of bits/libc-lock.h where
the function __libc_cleanup_routine gets defined.
I simply commented out "#include <bits/libc-lock.h>" from
uClibc_mutex.h and freetype compiled properly.

I had related problems with compiling gettext as well but was able to
work around that.

The commit is: 
http://git.uclibc.org/uClibc/commit/?h=nptl&id=0eadd98d30c51d26fde4062e6b8c48f3c9b5148d

The error was:

In file included from /toolchain/include/bits/uClibc_mutex.h:16,
                 from /toolchain/include/bits/uClibc_stdio.h:107,
                 from /toolchain/include/stdio.h:72,
                 from
/work/freetype-2.3.11/include/freetype/config/ftstdlib.h:100,
                 from ./builds/unix/ftconfig.h:43,
                 from builds/unix/ftsystem.c:21:
/toolchain/include/bits/libc-lock.h:309: error: expected '=', ',',
';', 'asm' or '__attribute__' before 'void'

Hmmh. Seems like I added that semi-incidentally. I was thinking of using
the glibc used "libc locking" macroes from libc-lock.h, but ended up using
the weak definitions. I think the whole uClibc_mutex.h should not be included
(or ifdeffed out) if we are not building libc. I guess the lock definition
defines are needed in public, headers; but at least the function macroes
should not be visible to applications.

Just removing the include should be ok though. But I suspect you might
get similar errors if you have the __USE_STDIO_FUTEXES__ defined, which
you probably should have enabled if you are using nptl.

Seems like we need to sprinkle some #ifdef _LIBC's.

- Timo
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to