General Category > General Discussion about just::thread
Trying to get to 1st base with TDM gcc4.5.2 under WinXP
Leor:
Major step forward: 'tdragon' on SourceForge replied to my bug report about the installation failure.
The tdm4.5.2 installer has a check box on the first screen labeled "Check for updated files on the TDM-GCC server" that is checked by default. I don't know about folks in the gcc world, but to ME there's a difference between "updated files" and "new releases"... apparently, what the installer really means to be saying is, "If you leave this box checked, then I will silently use the highest-numbered release there is, regardless of which version of the installer you're now running." Hence, my ending up with 4.6.1 installed when I thought I was installing 4.5.2.
So the installation error on the 32-bit version was actually an error attempting to grab a file for the 4.6.1 release (an error which doesn't seem to happen if you just run the 4.6.1 installer in the first place.) And the "experimental" version was 4.6.1 only, but I didn't know the 4.5.2 installer was doing the automatic swticheroo to that version.
If I uncheck the "check for updated files" checkbox, then I'm not offered the option of the experimental 32/64-bit version; there's only the one (32-bit) version, and it installs without error. Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1, and 4.6.1 isn't supposed to be just::thread-compatible? But I digress, as I now have a 32-bit 4.5.2 installed that does link with just::thread...but only if I use the explicit path name for the .a file (-ljustthread still fails to link).
Wow.
OK, next issue (lol). Consider the the following trivial program:
#include <iostream>
#include <thread>
using namespace std;
void hello()
{
cout << "Hello from hello (in thread?)\n";
}
int main()
{
thread t0(hello);
cout << "Hello from main!\n";
t0.join();
}
It builds clean under both VC9 and (now, finally) TDM4.5.2.
It runs fine under VC9, but under TDM4.5.2 I get the following "bonus" output after the expected two lines:
terminate called after throwing an instance of 'std::system_error'
what():
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
What's that about?
Thanks!
Anthony Williams:
Hi Leor,
First the easy bit:
--- Quote from: Leor on November 22, 2011, 06:08:38 AM ---Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1
--- End quote ---
There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.
--- Quote from: Leor on November 22, 2011, 06:08:38 AM ---It runs fine under VC9, but under TDM4.5.2 I get the following "bonus" output after the expected two lines:
terminate called after throwing an instance of 'std::system_error'
what():
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
What's that about?
--- End quote ---
That's a bug I just discovered this week. The internals of the library need to be destroyed in the right order, and sometimes the TDM linker destroys things in the wrong order, causing this problem. This is a bug that only applies to the TDM build as far as I can see. I'm working on a fix.
Sorry for the inconvenience; it seems you've hit more than your share of problems :(
Leor:
--- Quote from: Anthony Williams on November 22, 2011, 08:05:24 AM ---Hi Leor,
First the easy bit:
--- Quote from: Leor on November 22, 2011, 06:08:38 AM ---Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1
--- End quote ---
There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.
--- End quote ---
Right, but from what I'm seeing (and I admit I don't always see things correctly, esp. when gcc is concerned...) is that the 32/64-bit version is ONLY a 4.6.1 option, and you've told me threading support isn't even there in 4.6.1, or at least not in a form compatible with just::thread (which is why I've been laboring to get 4.5.2 going). So why is there a just::thread lib for the 32/64-bit platform?
Yeah, I usually bring out the "best" in software. I've concluded it's some sort of karmic thing :)
Anthony Williams:
--- Quote from: Leor on November 22, 2011, 05:50:48 PM ---
--- Quote from: Anthony Williams on November 22, 2011, 08:05:24 AM ---There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.
--- End quote ---
Right, but from what I'm seeing (and I admit I don't always see things correctly, esp. when gcc is concerned...) is that the 32/64-bit version is ONLY a 4.6.1 option
--- End quote ---
The 32/64-bit installer for 4.5.2 is at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/tdm64-gcc-4.5.2.exe/download
Leor:
OK, thanks, I think I've got it straight. For my purposes, I'll stick with the straight 32-bit 4.5.2 installation, since it now works.
Navigation
[0] Message Index
[*] Previous page
Go to full version