Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clib is glibc dependent. #55

Closed
DarkLinkXXXX opened this issue Mar 19, 2014 · 5 comments
Closed

clib is glibc dependent. #55

DarkLinkXXXX opened this issue Mar 19, 2014 · 5 comments

Comments

@DarkLinkXXXX
Copy link

clib compiles just fine with gcc or clang with glib, but if you try to build with a different C99 compliant libc, such as musl, you get spammed with unknown type name errors which I believe indicate glibc dependence. I believe it should be a project goal of clib to be glib-independent to ensure greater portability across unix based systems.

$ CC=musl-gcc make
musl-gcc deps/case/case.c -c -o deps/case/case.o -std=c99 -Ideps -Wall -Wno-unused-function -U__STRICT_ANSI__
In file included from /usr/include/libio.h:32:0,
                 from /usr/include/stdio.h:74,
                 from deps/case/case.c:9:
/usr/include/libio.h:466:4: error: unknown type name ‘__gnuc_va_list’
    _IO_va_list, int *__restrict);
    ^
/usr/include/libio.h:468:5: error: unknown type name ‘__gnuc_va_list’
     _IO_va_list);
     ^
In file included from deps/case/case.c:9:0:
/usr/include/stdio.h:79:1: error: unknown type name ‘__gnuc_va_list’
 typedef _G_va_list va_list;
 ^
/usr/include/stdio.h:79:20: error: conflicting types for ‘va_list’
 typedef _G_va_list va_list;
                    ^
In file included from /usr/include/stdarg.h:10:0,
                 from /usr/include/libio.h:50,
                 from /usr/include/stdio.h:74,
                 from deps/case/case.c:9:
/usr/include/bits/alltypes.h:6:27: note: previous declaration of ‘va_list’ was here
 typedef __builtin_va_list va_list;
                           ^
In file included from /usr/include/libio.h:32:0,
                 from /usr/include/stdio.h:74,
                 from deps/case/case.c:9:
/usr/include/stdio.h:372:8: error: unknown type name ‘__gnuc_va_list’
        _G_va_list __arg);
        ^
/usr/include/stdio.h:377:54: error: unknown type name ‘__gnuc_va_list’
 extern int vprintf (const char *__restrict __format, _G_va_list __arg);
                                                      ^
/usr/include/stdio.h:380:8: error: unknown type name ‘__gnuc_va_list’
        _G_va_list __arg) __THROWNL;
        ^
/usr/include/stdio.h:391:42: error: unknown type name ‘__gnuc_va_list’
         const char *__restrict __format, _G_va_list __arg)
                                          ^
/usr/include/stdio.h:413:8: error: unknown type name ‘__gnuc_va_list’
        _G_va_list __arg)
        ^
/usr/include/stdio.h:472:7: error: unknown type name ‘__gnuc_va_list’
       _G_va_list __arg)
       ^
/usr/include/stdio.h:479:53: error: unknown type name ‘__gnuc_va_list’
 extern int vscanf (const char *__restrict __format, _G_va_list __arg)
                                                     ^
/usr/include/stdio.h:484:40: error: unknown type name ‘__gnuc_va_list’
       const char *__restrict __format, _G_va_list __arg)
                                        ^
In file included from /usr/include/features.h:371:0,
                 from /usr/include/stdio.h:27,
                 from deps/case/case.c:9:
/usr/include/stdio.h:496:37: error: unknown type name ‘__gnuc_va_list’
    const char *__restrict __format, _G_va_list __arg),
                                     ^
/usr/include/stdio.h:500:5: error: unknown type name ‘__gnuc_va_list’
     _G_va_list __arg), __isoc99_vscanf)
     ^
/usr/include/stdio.h:505:8: error: unknown type name ‘__gnuc_va_list’
        _G_va_list __arg), __isoc99_vsscanf)
        ^
make: *** [deps/case/case.o] Error 1
@stephenmathieson
Copy link
Member

Hmm.. supporting other compilers would be nice, but not high on my todo list. I'd happily accept a patch, however. :)

@DarkLinkXXXX
Copy link
Author

Sorry, my mistake. It was my bad setup, again. I'd like to be able to compile statically out of the box as well, but that seems even less useful, so I won't make an issue of it.

@stephenmathieson
Copy link
Member

Ok, thanks for reporting.

For future reference (when I find time to investigate), could you provide more information about your environment?

@DarkLinkXXXX
Copy link
Author

Sure thing.

 Linux anomie 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I'm sure you wanted more then that. What else did you want?

@stephenmathieson
Copy link
Member

compiler version, what you had to do to break it (or what you had to do to fix it), etc.

everything helps :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants