[MDEV-2678] LP:345524 - pbxt does not compile on 64 bit windows Created: 2009-10-21  Updated: 2012-10-04  Resolved: 2012-10-04

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

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug345524.xml    

 Description   

PBXT does not compile on 64 bit windows due to use of inline assembly (64 bit Visual C++ compiler does not support inline assembly)
Suggestion : use win32 atomics (InterlockedAdd etc) instead of assembly



 Comments   
Comment by Paul McCullagh (Inactive) [ 2009-03-20 ]

Re: pbxt does not compile on 64 bit windows
Thanks for the bug report.

As far as I know, the win32 atomics do not support 1 and 2 bytes values. This is the reason for not using them before. But they may be the only option for 64 windows.

Comment by Paul McCullagh (Inactive) [ 2009-07-02 ]

Re: pbxt does not compile on 64 bit windows
PBXT now compiles without atomic operations, if you define XT_NO_ATOMICS in xt_config.h.

I have not tested this because we currently have no plans to support 64-bit windows.

So this is a request to Vladislav, and everyone else:

Please give us feedback on how important a 64-bit windows version is to you, and we will reconsider our plans for this platform.

In the meantime I am going to set the status to "Won't Fix".

Thanks,

Paul

Comment by Paul McCullagh (Inactive) [ 2009-07-02 ]

Re: pbxt does not compile on 64 bit windows
I am setting this bug to "Won't Fix" because we currently have no plans to support 46-bit Windows.

As I mentioned before, this is a request to Vladislav, and everyone else:

Please give us feedback on how important a 64-bit windows version is to you, and we will reconsider our plans for this platform.

Thanks!

Paul

Comment by Vladislav Vaintroub [ 2009-07-02 ]

Re: pbxt does not compile on 64 bit windows
Windows 64 bit is very important (specifically x64), now 4 years after the first x64 release.
Seriously, I would not consider a DBMS product that does not have possibility to address more than 4GB RAM a solid one (I do not plan to become a Linux convert too

Comment by Paul McCullagh (Inactive) [ 2009-10-26 ]

Re: pbxt does not compile on 64 bit windows
This bug will be fixed if required by MariaDB.

Please provide feedback on the priority. Access to a 64-bit Windows system would also help us

Comment by Oleksandr Byelkin [ 2009-10-29 ]

Re: pbxt does not compile on 64 bit windows
Sorry, but it is vmware inside our intranet, so access is quite problematic

Comment by Paul McCullagh (Inactive) [ 2009-11-18 ]

Re: pbxt does not compile on 64 bit windows
I have change the priority of this bug because a fix is required for MariaDB.

Comment by Paul McCullagh (Inactive) [ 2009-11-18 ]

Re: pbxt does not compile on 64 bit windows
Hi Sanja,

What compiler flag can I used to detect compilation on 64-bit Windows?

Comment by Hakan Küçükyılmaz (Inactive) [ 2009-11-18 ]

Re: pbxt does not compile on 64 bit windows
from include/config-win.h

if defined(_WIN64) || defined(WIN64)

Comment by Vladislav Vaintroub [ 2009-11-18 ]

Re: pbxt does not compile on 64 bit windows
_WIN64 is 64 bit, as documented as predefined macro (first google hit for "microsoft compiler predefined macros" brings

http://msdn.microsoft.com/en-us/library/b0084kay(VS.80).aspx )

WIN64 is not defined.

64bit Windows exists for 2 hardware architectures: AMD64 (aka x86_64 aka x64, commonly used) and Itanium (aka IA64, relatively seldom, MySQL is not ported for it).

_M_X64 is defined on x64

_M_IA64 is defined on Itanium

Comment by Paul McCullagh (Inactive) [ 2009-11-24 ]

Re: pbxt does not compile on 64 bit windows
A fix for this bug has been pushed to PBXT 1.0.09f. 64-bit Windows should now compile and run. However, atomic op based locking has not been implemented.

Comment by Paul McCullagh (Inactive) [ 2009-11-25 ]

Re: pbxt does not compile on 64 bit windows
Hi Oleksandr and Hakan,

I have pushed a fix for this bug to: lp:~paul-mccullagh/maria/maria-pbxt-rc3

Could you please confirm that this version compiles and runs on 64-bit Windows.

I would like to confirm that this problem is fixed before I propose PBXT RC3 for merging.

Thanks!

Paul

Comment by Oleksandr Byelkin [ 2009-11-27 ]

Re: pbxt does not compile on 64 bit windows
Hi!

Here is what comopiler found:

------ Build started: Project: pbxt, Configuration: Debug x64 ------

Compiling...

ha_pbxt.cc

.\src\ha_pbxt.cc(1079) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data

.\src\ha_pbxt.cc(3857) : warning C4267: '=' : conversion from 'size_t' to 'ulong', possible loss of data

.\src\ha_pbxt.cc(5550) : warning C4267: 'argument' : conversion from 'size_t' to 'uint32', possible loss of data

.\src\ha_pbxt.cc(5827) : error C2121: '#' : invalid character : possibly the result of a macro expansion

.\src\ha_pbxt.cc(5827) : error C2065: 'ifdef' : undeclared identifier

.\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing '}' before 'constant'

.\src\ha_pbxt.cc(5827) : error C3852: '<unnamed-type-mysql_sysvar_support_xa>::def_val' having type 'const char': aggregate initialization could not initialize this member

const members cannot be default initialized unless their type has a user defined default constructor

.\src\ha_pbxt.cc(5827) : error C2512: '<unnamed-type-mysql_sysvar_support_xa>::<unnamed-type-mysql_sysvar_support_xa>' : no appropriate default constructor available

.\src\ha_pbxt.cc(5827) : error C2078: too many initializers

.\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing ';' before 'constant'

.\src\ha_pbxt.cc(5827) : error C2059: syntax error : 'constant'

.\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing ';' before '}'

.\src\ha_pbxt.cc(5827) : error C2059: syntax error : '}'

.\src\ha_pbxt.cc(5853) : fatal error C1020: unexpected #endif

Build log was saved at "file://e:\maria\bzr\maria-pbxtrc3-test\storage\pbxt\pbxt.dir\Debug\BuildLog.htm"

pbxt - 11 error(s), 3 warning(s)

------ Build started: Project: mysqlserver, Configuration: Debug x64 ------

Compiling...

ha_innodb.cc

..\storage\xtradb\handler\ha_innodb.cc(64) : warning C4005: 'MYSQL_SERVER' : macro redefinition

command-line arguments : see previous definition of 'MYSQL_SERVER'

..\storage\xtradb\handler\ha_innodb.cc(4178) : warning C4244: 'argument' : conversion from 'ulint' to 'uint', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(4179) : warning C4244: 'argument' : conversion from 'ulint' to 'uint', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(4912) : warning C4244: '=' : conversion from 'ulint' to 'int', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(6854) : warning C4244: '=' : conversion from 'ulint' to 'int', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(8444) : warning C4267: '=' : conversion from 'size_t' to 'uint', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(8446) : warning C4267: '=' : conversion from 'size_t' to 'uint', possible loss of data

..\storage\xtradb\handler\ha_innodb.cc(10134) : error C2440: 'initializing' : cannot convert from 'ulint *' to 'unsigned long *'

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

ha_pbxt.cc

..\storage\pbxt\src\ha_pbxt.cc(1079) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data

..\storage\pbxt\src\ha_pbxt.cc(3857) : warning C4267: '=' : conversion from 'size_t' to 'ulong', possible loss of data

..\storage\pbxt\src\ha_pbxt.cc(5550) : warning C4267: 'argument' : conversion from 'size_t' to 'uint32', possible loss of data

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2121: '#' : invalid character : possibly the result of a macro expansion

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2065: 'ifdef' : undeclared identifier

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing '}' before 'constant'

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C3852: '<unnamed-type-mysql_sysvar_support_xa>::def_val' having type 'const char': aggregate initialization could not initialize this member

const members cannot be default initialized unless their type has a user defined default constructor

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2512: '<unnamed-type-mysql_sysvar_support_xa>::<unnamed-type-mysql_sysvar_support_xa>' : no appropriate default constructor available

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2078: too many initializers

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing ';' before 'constant'

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2059: syntax error : 'constant'

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2143: syntax error : missing ';' before '}'

..\storage\pbxt\src\ha_pbxt.cc(5827) : error C2059: syntax error : '}'

..\storage\pbxt\src\ha_pbxt.cc(5853) : fatal error C1020: unexpected #endif

Generating Code...

Comment by Paul McCullagh (Inactive) [ 2009-11-27 ]

Re: pbxt does not compile on 64 bit windows
Hi Oleksandr,

Thanks for the compile run.

I have fixed the warnings (pushed to maria-pbxt-rc3), but this error is strange:

.\src\ha_pbxt.cc(5827) : error C2121: '#' : invalid character : possibly the result of a macro expansion

On line 5827 we have:

NULL, NULL, FALSE);

So this is a special problem which I cannot diagnose remotely (unless I am missing something!).

Is there any way I can get onto the machine to have a look?

Please let me know in a private e-mail if this is possible.

Thanks,

Paul

Comment by Paul McCullagh (Inactive) [ 2009-11-27 ]

Re: pbxt does not compile on 64 bit windows
Hi Oleksandr,

Ignore my last comment. Vlad has just pointed out the problem to me. The Windows compiler does not handle #ifdef in macros.

I will push a fix shortly...

Comment by Paul McCullagh (Inactive) [ 2009-11-27 ]

Re: pbxt does not compile on 64 bit windows
Hi Oleksandr,

The problems in ha_pbxt.cc should be fixed now.

Please try...

Comment by Oleksandr Byelkin [ 2009-11-30 ]

Re: pbxt does not compile on 64 bit windows
Hi!

Yes it fixed the problems. Thank you!

Comment by Colin Charles [ 2010-03-08 ]

Re: pbxt does not compile on 64 bit windows
According to http://primebase.org/download/ChangeLog, this is fixed in 1.0.09f RC3 - 2009-11-30, and MariaDB-5.1.42 uses 1.0.09g so this bug is complete.

Atomic operations are the only thing that you don't do on 64-bit windows now

Comment by Rasmus Johansson (Inactive) [ 2010-05-26 ]

Launchpad bug id: 345524

Generated at Thu Feb 08 06:43:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.