Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

AngelScript MingW-64


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Neuntoter   Members   -  Reputation: 125

Like
0Likes
Like

Posted 12 January 2013 - 05:46 AM

I must be missing something or is it just that AngelScript is not compatible with MingW-64.

 

I am using CodeBlocks with TDM-GCC MingW-64 on Windows 7 64bit

This is the same on both newest dev and release of AngelScript.

angelscript_2.25.2 and angelscript-trunk

The disassembly is from trunk if it matters.

 

I get SegFault on context Execute()

I am testing using the Console sample but tried tutorial sample with segfault also.

scripthelper.cpp
int ExecuteString(asIScriptEngine *engine, const char *code, asIScriptModule *mod, asIScriptContext *ctx)
Line 154
r = execCtx->Execute();

Feature Test passed all except

Failed on line 178 in test_addon_debugger.cpp

 

Creating Static Library using the the CodeBlocks project however I changed the defines because 64bit compilation fails with i386 option with Error: invalid instruction suffix for `push' ...etc

 

 

Currently Using these defines but I have tried many different combinations with no change. Without AS_X64_GCC the featuretest SegFaults after the first 2 lines.

ANGELSCRIPT_EXPORT
WIN32
AS_X64_GCC

 

Disassembly

0x004049BC    callq  *%rax
0x004049BE    mov    0x74(%rbp),%edx
0x004049C1    mov    %edx,0x3c(%rbp)
0x004049C4    jmp    0x404a25 <ExecuteString(asIScriptEngine*, char const*, asIScriptModule*, asIScriptContext*)+733>
0x004049C6    mov    0x68(%rbp),%rax              <---------
0x004049CA    mov    (%rax),%rax
0x004049CD    add    $0x28,%rax
0x004049D1    mov    (%rax),%rax
0x004049D4    mov    0x68(%rbp),%rdx
0x004049D8    movl   $0x2,-0x28(%rbp)

Edited by Neuntoter, 12 January 2013 - 05:49 AM.


Sponsor:

#2 Neuntoter   Members   -  Reputation: 125

Like
0Likes
Like

Posted 13 January 2013 - 01:07 AM

As an update I have tried it with everything from no additional defines to manually adding defines to make sure it should be compiled with MINGW-64 options.

Still doesn't work. At this point I have to believe that the issue is an incompatibility between the compiler and and angelscript and not an issue of defines.

 

Also though I never mentioned it, it works properly built as 32bit.


Edited by Neuntoter, 13 January 2013 - 04:29 AM.


#3 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
0Likes
Like

Posted 19 January 2013 - 01:16 PM

Which version of MinGW are you using? 

 

With version 4.7 they changed the native calling conventions considerably. I've already made the 32bit version working for both the new and old calling convention, but the 64bit version probably needs adjustment. Actually, I'm not too sure the 64bit ever worked, as I never tested it myself due to lack of environment.

 

I do have a I'll investigate this as soon as possible.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#4 Neuntoter   Members   -  Reputation: 125

Like
0Likes
Like

Posted 21 January 2013 - 06:45 AM

This is 4.7.1

I was hoping it was simply not compatible and I wasn't missing something obvious.

 

I can help you out with testing some.

I would be interested to get it working.

 

I am pretty sure it worked in 64bit on mingw in the past.



#5 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
0Likes
Like

Posted 21 January 2013 - 03:25 PM

MinGW 4.7 probably changed the 64bit version to be more closely matching to MSVC ABI, at least this was what they did with the 32bit version. If MinGW 64bit worked with as_callfunc_x64_mingw.cpp before, it probably needs to be updated to be more like as_callfunc_x64_msvc.cpp and as_callfunc_x64_msvc_asm.asm now.

 

I'm quite busy now. I have a lot to catch up after my vacation, so if you could do this investigation on your own for now it would be good. Otherwise I'll probably have to keep my investigation on this on hold for a couple of weeks.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#6 Andreas Jonsson   Moderators   -  Reputation: 3443

Like
0Likes
Like

Posted 11 March 2013 - 08:45 PM

I've fixed the problems with MinGW64 4.7 in revision 1592.

 

Regards,

Andreas 


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS