www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 104] New: gcc-4.4.5 / D2.052 / cygwin: configure error for


             Bug #: 104
           Summary: gcc-4.4.5 / D2.052 / cygwin: configure error for
    Classification: Unclassified
           Product: GDC
           Version: development
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: major
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw gdcproject.org
        ReportedBy: slavo5150 yahoo.com

This was migrated from

sschuerger created an issue 2011-03-07
Hi, tried to make gcc-4.4.5 / gdc D2.052 in a cygwin environment, sticking to
your build instructions. GCC itself configured & compiled fine, but libphobos
bailed out in configure with error message:

checking for __libc_stack_end... no

  configure: error: No usable stack origin information

  make[1]: *** [configure-target-libphobos] Error 1

Any ideas? The D1 gdc port to cygwin contained a gc_guess_stack.d, which
apparently works, but the standard libc stackframe code:

main ()

        extern long __libc_stack_end;
        return __libc_stack_end == 0;
  return 0;




Daniel Green - 2011-03-08
Is there a reason you chose cygwin? MinGW's msys environment is supported for
windows building. I do not believe any work has been done for cygwin compiling.

The use of __libc_stack_end appears to be related to garbage collection.

Is the test you posted verbatim? Scanning the config files libc_stack_end
should be __libc_stack_end.

Also does cygwin support __libc_stack_end. If it doesn't look at config.in:677
in the phobos2 directory. MinGW is a special case but not cygwin.

Adding the following snippet above the mingw*) statement may help.


Edit: Fixed formatting issues.

sschuerger - 2011-03-08
* edited description

Anonymous - 2011-03-09
Cygwin is the more powerful environment with a more "Linux-like" behaviour than

Corrected the verbatim quotes for __libc_stack_end, my fault. Cygwin does not
support glibc, it supports newlib. However, running gcc's configure with the
--with-newlib option results in strange compilation errors at stage 3.



didn't help.

sschuerger - 2011-03-09
sorry, didn't login - the above entry is mine :-)

Daniel Green - 2011-03-10
Did you run autoconf after changing the file? I downloaded cygwin and got it to
configure but it's not a supported platform. Which brings up the question is
cygwin: linux, Windows, posix or something else version wise and what does GDC
automaticallly set for it. Is there a Cygwin specific define that GDC can use
to test for and set a cygwin version?

GDC declares the following symbols for cygwin.


Error message. (Windows, linux, OSX, FreeBSD, Solaris) are the only options.

../../../../gcc-4.4.5/libphobos/core/stdc/stdlib.d:50: Error: static assert 
"Unsupported platform"

Edit: Tried to clean up ambiguities.

Edit: Looks like GDC uses cygwin to identify it.

Iain Buclaw - 2011-03-10
Code's currently commented out in D2 configure file:

dnl if test -z "$d_gc_stack"; then
dnl    d_gc_stack=GC_Use_Stack_Guess
dnl    D_GC_MODULES="$D_GC_MODULES gc/gc_guess_stack.o"
dnl fi

The implementation can be moved into rt.gccmemory.

Daniel Green - 

To get cygwin to compile libphobos work will need to be done on druntime. There
is the static assert in core/stdc/stdlib.d and in core/stdc/stdio.d. Those are
the only files I've looked at so far.

Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
Feb 01 2014