GBAiD icon indicating copy to clipboard operation
GBAiD copied to clipboard

64-bit compilation broken on Windows & Linux

Open mdparker opened this issue 9 years ago • 7 comments

With the package.json patch in #1, compilation fails on Windows with the following:

src\gbaid\graphics.d(533): Error: bad type/size of operands 'test'

I don't know anything about x86_64 assembly, so I haven't even tried to fix it.

mdparker avatar Dec 25 '14 11:12 mdparker

I just tried to compile on my 64-bit Linux Mint partition with 64-bit DMD and got the same error.

mdparker avatar Dec 25 '14 12:12 mdparker

Can you also try compiling with LDC?

DDoS avatar Dec 25 '14 19:12 DDoS

I got it to compile as 32 bit on Windows 8.1, but I can't get it to link, DMD's OPTLINK gives me an "Error 16: index range"

DDoS avatar Dec 25 '14 22:12 DDoS

I haven't installed LDC in ages. I'll look into it later. For now, I'm running Dustmite to see if I can reduce the OPTLINK error.

mdparker avatar Dec 26 '14 01:12 mdparker

After 14 hours, 41 minutes, 35 secs and 563 ms, dustmite has reduced it all down to an empty module named gl.d. Of course, that does not cause the error since there' s nothing left to link. I have no other ideas right now on how to proceed.

mdparker avatar Dec 26 '14 15:12 mdparker

Building in release mode using DMD on OS X also has broken linking, here's the error:

Undefined symbols for architecture x86_64:
"_D3std9exception138__T12errnoEnforceTbVAyaa52_2f7573722f6c6f63616c2f43656c6c61722f646d642f322e3036362e312f696e636c7564652f64322f7374642f737464696f2e64Vmi717Z12errnoEnforceFNfbLAyaZb", referenced from:
_D3std5stdio4File14__T7rawReadTvZ7rawReadMFAvZAv in gbaid.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1

This seems to point to rawRead, which AFAIK is only called in memory.d near the bottom of the file.

Maybe the two are related?

Edit: commenting out the 3 rawRead calls in memory.d loadFromFile fixes this linking issue. This looks like a problem with DMD.

Edit 2: This did not fix linking on Windows.

DDoS avatar Dec 26 '14 18:12 DDoS

I have successfully built it on 64bit Ubuntu in release mode, but the environment I'm using is headless, so I can't do a full test (no video or audio output). It did run 5 seconds of emulation at full speed without any errors, so I'm pretty sure it's working now.

DDoS avatar Apr 05 '17 23:04 DDoS