Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64-bit compilation broken on Windows & Linux #2

Open
mdparker opened this issue Dec 25, 2014 · 7 comments
Open

64-bit compilation broken on Windows & Linux #2

mdparker opened this issue Dec 25, 2014 · 7 comments

Comments

@mdparker
Copy link
Contributor

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 mdparker changed the title 64-bit compilation broken on Windows 64-bit compilation broken on Windows & Linux Dec 25, 2014
@mdparker
Copy link
Contributor Author

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

@DDoS
Copy link
Owner

DDoS commented Dec 25, 2014

Can you also try compiling with LDC?

@DDoS
Copy link
Owner

DDoS commented Dec 25, 2014

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"

@mdparker
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@DDoS
Copy link
Owner

DDoS commented Dec 26, 2014

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
Copy link
Owner

DDoS commented Apr 5, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants