Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
> But I definitely DO have the problem with "ln" on my MSYS :(
[...]
> I'm using Windows XP (SP2) and MinGW (5.1.4) and MSYS (1.0.10). Perhaps we
> have a difference in our operating environments?
I have MSYS 1.0.11.0(0.46/3/2) and "ln --version" reports version 5.97
> Then I created a documented test case shell script "test.mingw.ln"
> (attached), that replicates the problem on my MinGW+MSYS system.
> Would you like to run the script in an MSYS console on your system, and let
> me know the result?
Unfortunately, I don't see any file attached :(
> Here are a couple of interesting quotes related to MinGW+MSYS and ln, that I
> found through a Google search:
>
>
>
> There is no way to create a "file symlink" in MSYS in a way similar to a
> "directory symlink" (that is, a mount point).
> The command ln for creating links works, but it actually makes a copy of the
> original file, not a symlink to it.
>
>
Right, the ln just copying file on my side.
> Is there a simple test I can use, a simple C++ program, that e.g. obtains
> the ID and version of the stdcxx library?
Try this:
---
#include
int main ()
{
// install dependency on stdcxx headers
std::cout << "Test program using stdcxx version " << _RWSTD_VER_STR <<
std::endl;
int ret = -1;
// install dependency on stdcxx library
ret = __rw::__rw_atomic_add32 (&ret, 1);
return ret;
}
---
> HOWEVER, until ALL the stdcxx tests are verified as ok on gcc/MinGW, this
> means that there IS/ARE some problem(s) with stdcxx in MinGW, does it not?
> After all, isn't the purpose of the tests to prove that the stdcxx libary on
> the
> target system is working correctly?
In general it is, but there are might be some expected failures (which has
been
documented in JIRA) and failures, that should be an expected, but not documented
in JIRA yet. BTW any stdcxx user can document new failures by creating
corresponding
issues in JIRA ;)
The 18.c.limits.stdcxx-988.cpp test fails to compile on gcc/MinGW due to
undefined
LONG_BIT, SSIZE_MAX, WORD_BIT values. They're expected to be defined in
provided by compiler. Strictly speaking I didn't found these names mentioned in
current C++ standard in header synopsis. I suppose that they're
optional
(i.e. required by POSIX only) and can be not exercised (as it is already done
for EDG eccp).
Farid.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
[SP] Then I created a documented test case shell script "test.mingw.ln" (attached), that replicates the problem on my MinGW+MSYS system. Would you like to run the script in an MSYS console on your system, and let me know the result? [SP] I notice that [email protected] has stripped the file attachment "test.mingw.ln" from my email, before sending my email to mailing list subscribers. I will be away from my computer for a couple of days. When I return, I'll provide the "test.mingw.ln" file to you. Steve - Original Message - From: "Steve Petrie, P.Eng." <[EMAIL PROTECTED]> To: Sent: Friday, November 28, 2008 12:05 AM Subject: Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) [FZ] Actually my goal is make it possible to build stdcxx/MinGW and stdcxx/Cygwin using Cygwin environment as well as stdcxx/MinGW using MSYS environment. [SP] Good -- so we share the same goal of making it possible to build stdcxx/MinGW using the MSYS environment. * * * * * * [FZ] On the three lines marked ** above, I added an explicit file name after the $(buildpath) because the MinGW 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. I have no such problems when running make on MSYS. [SP] Lucky you :) But I definitely DO have the problem with "ln" on my MSYS :( ( It's actually the "ln" command, not "ls" that has the bug. Due to lack of sleep. I mis-named the "ln" command "ls" in my description. But the example code above the description, showed "ln".) I'm using Windows XP (SP2) and MinGW (5.1.4) and MSYS (1.0.10). Perhaps we have a difference in our operating environments? I have replicated the problem outside the stdcxx-4.2.2 make, by manually entering the ln commands at an MSYS console. Then I created a documented test case shell script "test.mingw.ln" (attached), that replicates the problem on my MinGW+MSYS system. Would you like to run the script in an MSYS console on your system, and let me know the result? I plan to report this problem (and provide the test script) to www.mingw.org and it would be helpful to know for sure that it's something peculiar to my environment. Here are a couple of interesting quotes related to MinGW+MSYS and ln, that I found through a Google search: There is no way to create a "file symlink" in MSYS in a way similar to a "directory symlink" (that is, a mount point). The command ln for creating links works, but it actually makes a copy of the original file, not a symlink to it. It is possible to build under MinGW, however the release packages are build under cygwin and I am trying to duplicate the setup used. [...] Cygwin softlinks are unusable under native windows, so we need to disableCygwin's "ln" command and let gcc's build scripts use "cp" instead. quote 2 above, is from web page http://article.gmane.org/gmane.comp.gnu.mingw.user/25585 * * * * * * [FZ] My congratulations, you have just build the stdcxx library :) [SP] Great! Now I'll install the stdcxx library, for use with my NetBeans 6.5 IDE (With C++ plugin.) Is there a simple test I can use, a simple C++ program, that e.g. obtains the ID and version of the stdcxx library? After I install the stdcxx library, I would like to conclusively PROVE to myself, that I'm actually hooking into the stdcxx library, and not the standard library shipped with MinGW. * * * * * * [FZ] Hmm, you must be wrong, we don't have any file with the name "build" in svn. [SP} You are correct -- my apologies. The /stdcxx-4.2.2/build file, that I mistakenly thought came with the svn, was a file link named "build", linked to /stdcxx-4.2.2/etc/config/makefile.rules. This link was created by the buggy MinGW command that I described in my "Fix #1 -- /stdcxx-4.2.2/CNUmakefile". I must have run the make first once, and forgot about the buggy MinGW that created the /stdcxx-4.2.2/build file link. So I assumed that the /stdcxx-4.2.2/build file came with the svn. * * * * * * [FZ] It depends on what you want :) You have build the stdcxx library successfully, so now you can compile your programs with stdcxx. [...] 18.c.limits.stdcxx-988.cpp is just one of the regression tests. It was not verified on gcc/MinGW so it fails to compile. But this failure doesn't means that there is some problem or bug in stdcxx library. [SP] I don't entirely follow your thinking. I'm glad to know that I've successfully built the stdcxx library -- that's a HUGE step in the right direction. And certainly I'm going to start using stdcxx in my C++ programming work. HOW
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
[FZ] Actually my goal is make it possible to build stdcxx/MinGW and stdcxx/Cygwin using Cygwin environment as well as stdcxx/MinGW using MSYS environment. [SP] Good -- so we share the same goal of making it possible to build stdcxx/MinGW using the MSYS environment. * * * * * * [FZ] On the three lines marked ** above, I added an explicit file name after the $(buildpath) because the MinGW 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. I have no such problems when running make on MSYS. [SP] Lucky you :) But I definitely DO have the problem with "ln" on my MSYS :( ( It's actually the "ln" command, not "ls" that has the bug. Due to lack of sleep. I mis-named the "ln" command "ls" in my description. But the example code above the description, showed "ln".) I'm using Windows XP (SP2) and MinGW (5.1.4) and MSYS (1.0.10). Perhaps we have a difference in our operating environments? I have replicated the problem outside the stdcxx-4.2.2 make, by manually entering the ln commands at an MSYS console. Then I created a documented test case shell script "test.mingw.ln" (attached), that replicates the problem on my MinGW+MSYS system. Would you like to run the script in an MSYS console on your system, and let me know the result? I plan to report this problem (and provide the test script) to www.mingw.org and it would be helpful to know for sure that it's something peculiar to my environment. Here are a couple of interesting quotes related to MinGW+MSYS and ln, that I found through a Google search: There is no way to create a "file symlink" in MSYS in a way similar to a "directory symlink" (that is, a mount point). The command ln for creating links works, but it actually makes a copy of the original file, not a symlink to it. It is possible to build under MinGW, however the release packages are build under cygwin and I am trying to duplicate the setup used. [...] Cygwin softlinks are unusable under native windows, so we need to disableCygwin's "ln" command and let gcc's build scripts use "cp" instead. quote 2 above, is from web page http://article.gmane.org/gmane.comp.gnu.mingw.user/25585 * * * * * * [FZ] My congratulations, you have just build the stdcxx library :) [SP] Great! Now I'll install the stdcxx library, for use with my NetBeans 6.5 IDE (With C++ plugin.) Is there a simple test I can use, a simple C++ program, that e.g. obtains the ID and version of the stdcxx library? After I install the stdcxx library, I would like to conclusively PROVE to myself, that I'm actually hooking into the stdcxx library, and not the standard library shipped with MinGW. * * * * * * [FZ] Hmm, you must be wrong, we don't have any file with the name "build" in svn. [SP} You are correct -- my apologies. The /stdcxx-4.2.2/build file, that I mistakenly thought came with the svn, was a file link named "build", linked to /stdcxx-4.2.2/etc/config/makefile.rules. This link was created by the buggy MinGW command that I described in my "Fix #1 -- /stdcxx-4.2.2/CNUmakefile". I must have run the make first once, and forgot about the buggy MinGW that created the /stdcxx-4.2.2/build file link. So I assumed that the /stdcxx-4.2.2/build file came with the svn. * * * * * * [FZ] It depends on what you want :) You have build the stdcxx library successfully, so now you can compile your programs with stdcxx. [...] 18.c.limits.stdcxx-988.cpp is just one of the regression tests. It was not verified on gcc/MinGW so it fails to compile. But this failure doesn't means that there is some problem or bug in stdcxx library. [SP] I don't entirely follow your thinking. I'm glad to know that I've successfully built the stdcxx library -- that's a HUGE step in the right direction. And certainly I'm going to start using stdcxx in my C++ programming work. HOWEVER, until ALL the stdcxx tests are verified as ok on gcc/MinGW, this means that there IS/ARE some problem(s) with stdcxx in MinGW, does it not? After all, isn't the purpose of the tests to prove that the stdcxx libary on the target system is working correctly? Steve - Original Message - From: "Farid Zaripov" <[EMAIL PROTECTED]> To: Sent: Thursday, November 27, 2008 2:24 PM Subject: RE: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) 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. Actually my goal is make it possible to build stdcxx/MinGW and stdcxx/Cygwin using Cygwin environment as well as stdcxx/MinGW
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
[MS] Right. I think a "build" directory gets created automatically when one isn't specified on the command line (via BUILDDIR). Something weird seems to be going on in Steve's environment (the behavior of ln -s is definitely bizarre)... [SP] Yes there is something wierd. Please see my response to Farid's message, regarding a test shell script I created, to replicate the MinGW+MSYS ln problem. But I've got a workaround for the problem. And Farid says my stdcxx build is now working. So no big deal. I'm "only" using MinGW+MSYS for compiling and building C++ programs through the NetBeans IDE (with C++ plugin). That all seems to work fine. It's the comparably far more complex process of building the stdcxx library, that is stressing my MinGW+MSYS. But I want to use stdcxx because it seems to me likely to be superior to the standard library shipped with g++, so I don't mind at all working through the glitches to get stdcxx built and working. * * * * * * [MS]>>> There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB. My congratulations, you have just build the stdcxx library :) Although it probably shouldn't be called liblibstd, should it? What's with the duplicate "lib" part? [SP] It's lack of sleep -- the correct pathname is /stdcxx-4.2.2/build/lib/libstd.a Steve - Original Message - From: "Martin Sebor" <[EMAIL PROTECTED]> To: Sent: Thursday, November 27, 2008 3:05 PM Subject: Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) Farid Zaripov wrote: [...] 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. Hmm, you must be wrong, we don't have any file with the name "build" in svn. Right. I think a "build" directory gets created automatically when one isn't specified on the command line (via BUILDDIR). Something weird seems to be going on in Steve's environment (the behavior of ln -s is definitely bizarre)... [...] There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB. My congratulations, you have just build the stdcxx library :) Although it probably shouldn't be called liblibstd, should it? What's with the duplicate "lib" part? Martin
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Farid Zaripov wrote:
Although it probably shouldn't be called liblibstd, should it?
What's with the duplicate "lib" part?
I think you should know, that the library file located in lib subdirectory ;)
I suppose that there missed '/' after the first 'lib':
/stdcxx-4.2.2/build/lib/libstd.a
And what I don't like is that when BUILDTYPE is not specified, the name of
library file is always
libstd.{a;so} for any possible BUILDMODE values (even for empty BUILDMODE). The
comments
in GNUMakefile says that BUILDTYPE and BUILDMODE both are optional and by
default will be
used 11s, but this is not true...
We should fix the text. When you don't specify either you get neither
debugging (i.e., no -g) nor optimization (i.e., no -O). I.e., you get
whatever the default invocation of the compiler gives you with no
options.
Martin
Farid.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
> Although it probably shouldn't be called liblibstd, should it?
> What's with the duplicate "lib" part?
I think you should know, that the library file located in lib subdirectory ;)
I suppose that there missed '/' after the first 'lib':
/stdcxx-4.2.2/build/lib/libstd.a
And what I don't like is that when BUILDTYPE is not specified, the name of
library file is always
libstd.{a;so} for any possible BUILDMODE values (even for empty BUILDMODE). The
comments
in GNUMakefile says that BUILDTYPE and BUILDMODE both are optional and by
default will be
used 11s, but this is not true...
Farid.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Farid Zaripov wrote: [...] 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. Hmm, you must be wrong, we don't have any file with the name "build" in svn. Right. I think a "build" directory gets created automatically when one isn't specified on the command line (via BUILDDIR). Something weird seems to be going on in Steve's environment (the behavior of ln -s is definitely bizarre)... [...] There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB. My congratulations, you have just build the stdcxx library :) Although it probably shouldn't be called liblibstd, should it? What's with the duplicate "lib" part? Martin
RE: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
> 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. Actually my goal is make it possible to build stdcxx/MinGW and stdcxx/Cygwin using Cygwin environment as well as stdcxx/MinGW using MSYS environment. > There were two fixes I had to make, to get the build of the patched > stdcxx-4.2.2 to run: [...] > On the three lines marked ** above, I added an explicit file name after the > $(buildpath) because the MinGW 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. I have no such problems when running make on MSYS. > 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. Hmm, you must be wrong, we don't have any file with the name "build" in svn. [...] > There is an /stdcxx-4.2.2/build/liblibstd.a file of size 2.33 MB. My congratulations, you have just build the stdcxx library :) > HOWEVER, the build ended with the following displayed on the MSYS console: When you run make without targets specified, the examples, tests, locales will be build. Not all tests are compiling without errors on gcc/MinGW at the moment. It is ok. You can build the library only (without examples, tests and so on) using this command: "make config lib" Also I suggest to explicitly specify the build type. I.e.: make BUILDDIR=/var/tmp/stdcxx-4.2.2/gcc/15d BUILDTYPE=15d config lib > In the line "make[1]: [tests] Error 2 (ignored)", does the "(ignored)" mean > that did not terminate prematurely, and that file: > > /stdcxx-4.2.2/tests/regress/18.c.limits.stdcxx-988.cpp > > is the last test source file to be compiled? I don't think so. The make should stop on the first error encountered unless make was executed with "-k" option specified. > 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. Right, that because of make stopped on the compile error you mentioned above. > Please let me know -- did the build complete successfully? It depends on what you want :) You have build the stdcxx library successfully, so now you can compile your programs with stdcxx. > 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? 18.c.limits.stdcxx-988.cpp is just one of the regression tests. It was not verified on gcc/MinGW so it fails to compile. But this failure doesn't means that there is some problem or bug in stdcxx library. Farid.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Hi Martin, Thanks for your post. I'll keep your Jira tip in mind, for the future. * * * * * * I'm no longer working with stdcxx-4.2.1. Farid has notified me that stdcxx-4.2.2 is ported to MinGW, and he has provided a patch to apply the MinGW updates to stdcxx-4.2.2. The work I did on building stdcxx-4.2.1 using MinGW+MSYS wasn't wasted however, because one of the fixes I discovered (to GNUmakefile), is needed for using MinGW+MSYS to build stdcxx-4.2.2. Please see http://www.nabble.com/forum/ViewPost.jtp?post=20712556&framed=y for the results of my first build of stdcxx-4.2.2 using MinGW+MSYS. Steve - Original Message - From: "Martin Sebor" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 26, 2008 6:32 PM Subject: Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) Steve Petrie wrote: Posting the files in the Nabble Message box hangs my Firefox (the file are quite big) so I'm trying the "Upload File..." button above the Nabble Message box... FYI: You can also open a Jira issue for the problems you're having and attach the files to it. That might actually be even preferable. Martin http://www.nabble.com/file/p20695038/config.h config.h http://www.nabble.com/file/p20695038/config.log config.log Martin Sebor-2 wrote: Could you post here the config.h and config.log files from the $BUILDDIR/include directory? Martin
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Steve Petrie wrote: Posting the files in the Nabble Message box hangs my Firefox (the file are quite big) so I'm trying the "Upload File..." button above the Nabble Message box... FYI: You can also open a Jira issue for the problems you're having and attach the files to it. That might actually be even preferable. Martin http://www.nabble.com/file/p20695038/config.h config.h http://www.nabble.com/file/p20695038/config.log config.log Martin Sebor-2 wrote: Could you post here the config.h and config.log files from the $BUILDDIR/include directory? Martin
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Hi Farid, Thanks for your response -- excellent news! Please feel free to delete, from the stdcxx-user Nabble forum, my two latest postings: Steve Petrie Nov 26, 2008; 01:11am Steve Petrie Nov 26, 2008; 12:27am As they relate to further work I did on stdcxx-4.2.1, following up on Martin's suggestions, before I received your email. * * * * * * I will proceed to get stdcxx-4.2.2, apply the MinGW patch, and post the results I get from a build, on the stdcxx-user Nabble forum. Steve - Original Message - From: "Farid Zaripov" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 26, 2008 7:18 AM Subject: RE: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) 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 http://svn.apache.org/repos/asf/stdcxx/branches/4.2.x stdcxx-4.2.2 Then apply this patch: http://people.apache.org/~faridz/mingw.patch Farid.
RE: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
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 http://svn.apache.org/repos/asf/stdcxx/branches/4.2.x stdcxx-4.2.2 Then apply this patch: http://people.apache.org/~faridz/mingw.patch Farid.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Here's a paste of lines 939..956 from file /stdcxx-4.2.1/include/ansi/cwchar:
extern "C" {
inline wchar_t* wcsrchr (wchar_t *__s, wchar_t __c)
{
const wchar_t *__ss = __s;
while (*__ss++);
while (--__ss != __s && *__ss != __c);
return *__ss == __c ? __ss : 0;
}
} // extern "C"
inline const wchar_t* wcsrchr (const wchar_t *__s, wchar_t __c)
{
return wcsrchr (_RWSTD_CONST_CAST (wchar_t*, __s), __c);
}
} // extern "C"
If function wcsrchr on line 951 of file cwchar can't be extern "C", then
there appears to be an extraneous:
} // extern "C"
on line 956.
Martin Sebor-2 wrote:
>
>
>>
>>
>> i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:217:
>> error: previous declaration `wchar_t* wcsrchr(const wchar_t*, wchar_t)'
>> here
>>i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t*
>> wcsrchr(wchar_t*, wchar_t)':
>>
>> Also, it looks like there's an extern "C" { missing before the
>> declaration
>> of function wcsrchr on line 951 of file cwchar:
>
> No, that function is a C++ overload of the C function. It can't
> be extern "C" (C doesn't allow overloading).
>
> Martin
>
>
--
View this message in context:
http://www.nabble.com/Building-stdcxx-4.2.1-Using-MinGW%2BMSYS-On-Windows-XP-%28SP2%29-tp20672758p20695299.html
Sent from the stdcxx-user mailing list archive at Nabble.com.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Posting the files in the Nabble Message box hangs my Firefox (the file are quite big) so I'm trying the "Upload File..." button above the Nabble Message box... http://www.nabble.com/file/p20695038/config.h config.h http://www.nabble.com/file/p20695038/config.log config.log Martin Sebor-2 wrote: > > > Could you post here the config.h and config.log files from the > $BUILDDIR/include directory? > > Martin > > -- View this message in context: http://www.nabble.com/Building-stdcxx-4.2.1-Using-MinGW%2BMSYS-On-Windows-XP-%28SP2%29-tp20672758p20695038.html Sent from the stdcxx-user mailing list archive at Nabble.com.
Re: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2)
Steve Petrie wrote:
Greetings,
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.
Running make from an MSYS console.
I have no experience with building stdcxx on MinGW and don't have
access to the environment but I believe one of our developers has
ported stdcxx there so he should be able to answer some of your
questions. Farid, do you have any insight into Steve's problems?
Btw., it might be helpful to know the build type/mode you chose
for stdcxx, or if none, to try to explicitly specify a debug one
to see what happens. For example, to build an archive library
with debugging info, define BUILDTYPE=11s (alternatively,
BUILDMODE=debug) on the command line when invoking make.
In the meantime, let me try to answer some of the questions that
I think I might be able to help with.
[...]
** GNUmakefile / MinGW+MSYS Incompatibility #3 **
[...]
I believe they fail because the directory /stdcxx-4.2.1/build/bin/ defined
by the BINDIR variable BINDIR = $(buildpath)/bin contains no file called
at the time that the ls commands execute.
This problem I just ignored for the time being, because I didn't know what
the file is supposed to contain.
Exec is a utility program that stdcxx uses to run its tests and
example programs in batch testing. It's only useful if you're
maintaining the project.
* * *
* * *
** GNUmakefile / MinGW+MSYS Incompatibility #4 **
[...]
Lines 38..40 of file /stdcxx-4.2.1/build/include/vars.sh are:
...
BUILDTAG= ; export BUILDTAG
PLATFORM=mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 ; export PLATFORM
DEFAULT_SHROBJ= ; export DEFAULT_SHROBJ
...
It appears that the make config process does not like the parentheses in the
PLATFORM variable.
Right.
PLATFORM := mingw32_nt-5.1-1.0.10(0.46-3-2)-i86
I fixed the problem by adjusting the relevant statement in the GNUmakefile
to read:
PLATFORM := mingw32_nt-5.1-1.0.10-0.46-3-2--i86
changing the "(" and ")" to "-".
The right fix is to do something similar to what we do for Cygwin.
The above syntax error problem is fixed, but what about all the "no"
messages, and the "--" message(s) I am seeing on the MSYS console? Are they
normal or do they indicate an invalid build?
The "no" messages are expected. There should be no "--" messages.
They usually indicate a configuration problem.
Could you post here the config.h and config.log files from the
$BUILDDIR/include directory?
* * *
* * *
** GNUmakefile / MinGW+MSYS Incompatibility #5 **
[...]
The error:
i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:204:
error: previous declaration `wchar_t* wcschr(const wchar_t*, wchar_t)' here
is puzzling. Why is the stdcxx-4.2.1 build examining the MinGW
/MinGW/include/ library?
The stdcxx C++ headers "expose" symbols declared in the underlying
C library (like printf() or wcschr()). Not all the symbols defined
in the C library are always declared in the C library headers. The
stdcxx configuration machinery tries to detect this so that our
headers can declare the symbols. When the configuration tests fail
for a reason other than the one they're designed to fail for as
may be the case here (not because the symbol isn't declared but
because it's declared wrong), the library still tries to declare
the symbol the "right way" and the right declaration in stdcxx
conflicts with the wrong one. It's a limitation/bug in stdcxx.
I temporarily worked around this problem by changing line 204 of the the
MinGW wchar.h file to conform with the /stdcxx-4.2.1/include/ansi/cwchar
declaration of the C function `wchar_t* wcschr(wchar_t*, wchar_t), and this
eliminated the error message.
The error:
i:/apps/stdcxx-4.2.1/include/ansi/cwchar:725: error: expected
nested-name-specifier before "wcscspn"
seemed legitimate, as the "::" qualifier before the "wcscspn" was missing.
So I added the "::" qualifier to the line 725 in the
/stdcxx-4.2.1/include/ansi/cwchar file.
That looks like the right fix. We made the same change in 4.2.2
to resolve STDCXX-663:
https://issues.apache.org/jira/browse/STDCXX-663
* * *
* * *
** GNUmakefile / MinGW+MSYS Incompatibility #6 **
With the above-mentioned fixes in place, the build failed further on, with a
bunch of additional errors:
[...]
There's another conflict with file wchar.h in the MinGW /MinGW/include/
library:
It seems the header on MinGW is non-conforming in a way
that we're not prepared to deal with (we normally try to adjust to
these kinds of things but the machinery isn't perfect).
i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:217:
error: previous declaration `wchar_t* wcsrchr(const wchar_t*, wchar_t)' here
i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t*
wcsrchr(wchar_t*, wchar_t)':
Also, it looks like there's an extern "C" { missing before the declaration
of
