[SERVER-7659] Fix Windows XP 32 bit compilation of InterlockedCompareExchange64 Created: 14/Nov/12  Updated: 08/Mar/13  Resolved: 26/Feb/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.3.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Thor Khan Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows xp sp3 32 bits


Attachments: Text File atomic_intrinsics_win32.h    
Issue Links:
Duplicate
duplicates SERVER-8488 Reintroduce Limited Windows XP Support Closed
Participants:

 Description   

using intrinsic lets mongodb head compile and run on windows xp 32 bits
the attachement tests _WINNT_VERSION against 0x502 , which might be not precise yet, but lets mongodb compile and run on windows xp sp3 32 bits



 Comments   
Comment by Andrew Morrow (Inactive) [ 26/Feb/13 ]

Closed as duplicate of SERVER-8488

Comment by Ian Whalen (Inactive) [ 15/Nov/12 ]

Hi Thor, in order to incorporate your changes we'd appreciate it if you could open a pull request as described at https://help.github.com/articles/creating-a-pull-request

Comment by Thor Khan [ 15/Nov/12 ]

you wrote:
My understanding is that the future does not look bright for Windows XP support in MongoDB
I noticed mongodb would use winpcap if available on compilation host system
Windows8 requires winpcap to be installed in Windows7 compatibility mode:
does mongodb on windows8 needs to comply with winpcap installation requirements
on such a platform ?
Regards for the time spent

Comment by Thor Khan [ 15/Nov/12 ]

I committed the changes at https://github.com/Thor1Khan/mongo.git
Please feel free to let me know if you need more information

Comment by Tad Marshall [ 15/Nov/12 ]

Hi Thor,

Could you sign the MongoDB Contributor Agreement (http://www.10gen.com/contributor) and then post a pull request for this change?

My understanding is that the future does not look bright for Windows XP support in MongoDB, because there are other things introduced in Windows Vista (e.g. condition variables) that we plan to use. Changing from static to dynamic linking is not attractive; is it somehow required to use your approach? Do you know why your change to distlock_test.cpp was needed?

MongoDB is pretty limited in 32-bits, and there are Windows-specific issues around memory-mapped files that we were able to sidestep in 64-bit that we can't avoid in 32-bit.

But supporting 32-bit platforms for learning the product does help more people become exposed to MongoDB, and Windows XP has been a popular platform, so I understand your desire to get it working again.

Tad

Comment by Thor Khan [ 15/Nov/12 ]

when compiling using msvc 1600 and using latest boost headers(1_53 trunk)
as shared libraries (BOOST_ALL_DYN_LINK ) , had to disable /nodefaultlib:MSVCPRT
and 'patch' :
src\mongo\client\distlock_test.cpp line 104

shared_ptr<boost::thread> (new boost::thread(runThread)));
++
shared_ptr<boost::thread> (new boost::thread(boost::bind(&runThread))));
would post it here the SConstruct file used here according to AGPL , amo had
to encode build parameters in this file since I didn't got them handled through command line parameters ... building with v8 trunk seems to go fine
(and grandly reduces exe sizes but didn't get into tests yet)

Comment by Tad Marshall [ 14/Nov/12 ]

I edited the title, let me know if it looks right to you. I have not looked at your header yet, but thanks in advance!

Comment by Thor Khan [ 14/Nov/12 ]

this was(is being) tested using vc++ 1600 compilers

Comment by Thor Khan [ 14/Nov/12 ]

InterlockedComapreExchange64 must be corrected in tile for the sake of search engines
InterlockedCompareExchange64

Comment by Thor Khan [ 14/Nov/12 ]

It would be nice to be able to correct the title (InterlockedComapreExchange64 )

Generated at Thu Feb 08 03:15:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.