stdcxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Petrie <>
Subject RE: Building stdcxx-4.2.2 Using MinGW+MSYS On Windows XP (SP2)
Date Thu, 27 Nov 2008 02:13:29 GMT

Hi Farid,

I got stdcxx-4.2.2 from svn and applied the mingw.patch you provided.

I assume that you are building stdcxx-4.2.2 using Cygwin, and targeting
MinGW. My objective is to build stdcxx-4.2.2 using MinGW. I don't use Cygwin
and I don't plan to use it.

There were two fixes I had to make, to get the build of the patched
stdcxx-4.2.2 to run:

Fix #1 -- /stdcxx-4.2.2/CNUmakefile:

On lines 583, 591 and 592 of /stdcxx-4.2.2/GNUmakefile:

    ln -sf $(TOPDIR)/GNUmakefile         $(buildpath)/GNUmakefile;          
\ **
    ln -sf $(ETCDIR)/GNUmakefile.cfg     $(buildpath)/include/GNUmakefile;  
    ln -sf $(ETCDIR)/GNUmakefile.lib     $(LIBDIR)/GNUmakefile;             
    ln -sf $(ETCDIR)/GNUmakefile.rwt     $(buildpath)/rwtest/GNUmakefile;   
    ln -sf $(ETCDIR)/GNUmakefile.exm     $(EXMDIR)/GNUmakefile;             
    ln -sf $(ETCDIR)/GNUmakefile.tst     $(TSTDIR)/GNUmakefile;             
    ln -sf $(ETCDIR)/      $(PHTSTDIR)/GNUmakefile;           
    ln -sf $(ETCDIR)/GNUmakefile.bin     $(BINDIR)/GNUmakefile;             
    ln -sf $(ETCDIR)/makefile.common     $(buildpath)/makefile.common;      
\ **
    ln -sf $(ETCDIR)/makefile.rules      $(buildpath)/makefile.rules;       
\ **
    ln -sf $(ETCDIR)/        $(buildpath)/include/configure;    
    ln -sf $(BINDIR)/exec                $(buildpath)/run;                  
    ln -sf $(BINDIR)/exec                $(BINDIR)/run;                     
    ln -sf $(ETCDIR)/ $(BINDIR)/run_utils;               
    ln -sf $(BINDIR)/exec                $(TSTDIR)/run;                     
    ln -sf $(BINDIR)/exec                $(PHTSTDIR)/run;                   
    ln -sf $(BINDIR)/exec                $(EXMDIR)/run

On the three lines marked ** above, I added an explicit file name after the
$(buildpath) because the MinGW <ls> command, was REPLACING the
/stdcxx-4.2.1/build/ directory name, with a link (named /stdcxx-4.2.1/build)
to the file, instead of creating a link to the file (with the name of the
file), IN the /stdcxx-4.2.1/build/ directory.

Fix #2 -- Your /stdcxx-4.2.2/build file:

I renamed the /stdcxx-4.2.2/build file that came with the svn download, to
/stdcxx-4.2.1/build_faridz, because the presence of the build FILE was
preventing the GNUmakefile from creating the /stdcxx-4.2.2/build/ DIRECTORY.

* * *
* * *

The build go a LOT further with the patched stdcxx-4.2.2 than it did with
the stdcxx-4.2.1.

According to Windows XP, the final size of the /stdcxx-4.2.1/build/
directory (including sub-directories) is 126 MB.

There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB.

HOWEVER, the build ended with the following displayed on the MSYS console:

generating dependencies for $(TOPDIR)/tests/self/0.alloc.cpp
gcc -M -I/stdcxx-4.2.2/include/ansi   -I/stdcxx-4.2.2/include
-I/stdcxx-4.2.2/build/include -I/stdcxx-4.2.2/tests/include  -pedantic
-nostdinc++ -mno-cygwin  -W -Wall -Wcast-qual -Winline -Wshadow
-Wwrite-strings -Wno-long-long -Wcast-align 
make[2]: Leaving directory `/stdcxx-4.2.2/build/tests'
make[2]: Entering directory `/stdcxx-4.2.2/build/tests'
gcc -c -I/stdcxx-4.2.2/include/ansi   -I/stdcxx-4.2.2/include
-I/stdcxx-4.2.2/build/include -I/stdcxx-4.2.2/tests/include  -pedantic
-nostdinc++ -mno-cygwin  -W -Wall -Wcast-qual -Winline -Wshadow
-Wwrite-strings -Wno-long-long -Wcast-align  
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp: In function
`int main()':
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:144: error:
`LONG_BIT' was not declared in this scope
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:145: error:
`_POSIX_SSIZE_MAX' was not declared in this scope
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:146: error:
`WORD_BIT' was not declared in this scope
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:151: warning:
this decimal constant is unsigned only in ISO C90
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:152: warning:
this decimal constant is unsigned only in ISO C90
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:144: warning:
unused variable 'LONG_BIT'
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:145: warning:
unused variable '_POSIX_SSIZE_MAX'
i:/apps/stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp:146: warning:
unused variable 'WORD_BIT'
make[2]: *** [18.c.limits.stdcxx-988.o] Error 1
make[2]: Leaving directory `/stdcxx-4.2.2/build/tests'
make[1]: [tests] Error 2 (ignored)
make[1]: Leaving directory `/stdcxx-4.2.2/build'
SteveP@DELL /stdcxx-4.2.2

In the line "make[1]: [tests] Error 2 (ignored)", does the "(ignored)" mean
that <make> did not terminate prematurely, and that file:

is the last test source file to be compiled?
According to the /stdcxx-4.2.2/README file, the last build step is the
locale databases. The build I ran left the /stdcxx-4.2.2/nls/ directory
completely EMPTY.
* * *
* * *

Please let me know -- did the build complete successfully? If not, and I
need to fix the 18.c.limits.stdcxx-988.cpp compile error, what changes to I
need to make to fix the compile error?



Farid Zaripov-2 wrote:
> Hi Steve.
>> I am trying to build stdcxx-4.2.1 on Windows XP (SP2), using the
>> MinGW(3.4.5) + MSYS(1.0.10) + (with gcc, g++, etc.) 
>> operating environment.
>   The 4.2.1 version of the stdcxx isn't ported to MinGW.
>   You need to get (yet unreleased) 4.2.2 version from svn, i.e.:
>   svn co
> stdcxx-4.2.2
>   Then apply this patch:
> Farid.

View this message in context:
Sent from the stdcxx-user mailing list archive at

View raw message