Glibc Not Supported by Cygwin

How to use newlib instead of glibc

Not a solution, as we have no clue of your project, but more a general recipe of what need to be done as already mentioned by another comment.

Check on config.log more details on

configure: error: Could not use standard C library

If it is a generic Glibc test you can remove/change in a warning/comment the test in
configure.ac and than run autoreconf to rebuild configure

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/autoreconf-Invocation.html

After that you run again configure and than chase and analyze any further error during the configure, build and test phases.

If it is not a generic glib test, but if it is a proper test of a C functionality you need to analyze what is the expected behavior and if Newlib can provide it in a alternate way.

Cygwin install does not have shared libraries, or how should I activate the shared libraries?

using objdump

objdump -x test.exe 

DLL Name: cygwin1.dll
vma: Hint/Ord Member-Name Bound-To
813c 15 __cxa_atexit
814c 46 __main
8158 108 _dll_crt0
8164 115 _impure_ptr
8174 257 calloc
8180 373 cygwin_detach_dll
8194 375 cygwin_internal
81a8 403 dll_dllcrt0
81b8 579 free
81c0 909 malloc
81cc 1015 posix_memalign
81e0 1170 puts
81e8 1196 realloc

so puts is an external symbol taken from cygwin1.dll shared lib

Is the GNU C Library usable on non-GNU (or POSIX) platforms?

Yes, its possible in theory, but not really worth it in practice. You would need to port the syscall interface, dynamic linker, and other parts to Windows or your platform of choice, and Glibc is not an ideal candidate for this.

If you really need a self contained C library, I would consider newlib or uClibc (or FreeBSD's/OpenBSD's libc) over glibc. Glibc is a complex beast, the alternatives are much smaller and easier to understand.

Cygwin: C standard library does not support uchar.h?

Install the libicu-devel package
the header will be under:

/usr/include/unicode/uchar.h

Can I use glibc under windows?

A possible workaround could exist: if someone combines http://0xef.wordpress.com/2012/11/17/emulate-linux-system-calls-on-windows/ with http://www.musl-libc.org/ and compiles source code with gcc against musl libc instead of glibc. So, I can't understand why nobody writes a such glibc analog for Windows. :-(

GCC cross compiler for i686 using cygwin (windows) - fail in building GCC

After building the glibc, we shouldn't directly start building 2nd part of GCC. Rather, few more steps should be followed for glibc as indicated below:

$ CC=${TARGET}-gcc ../glibc-2.29/configure --target=$TARGET --host=i686-pc-linux-gnu --prefix=$PREFIX --with-headers=my/path/
$ make install-bootstrap-headers=yes install-headers
$ make -j4 csu/subdir_lib
$ install csu/crt1.o csu/crti.o csu/crtn.o /opt/cross/$TARGET/lib
$ $TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /opt/cross/$TARGET/lib/libc.so
$ touch /opt/cross/$TARGET/include/gnu/stubs.h

Then, we can start building the 2nd part of GCC.



Related Topics



Leave a reply



Submit