jdah / jdh-8

An 8-bit minicomputer with a fully custom architecture
MIT License
1.29k stars 89 forks source link

Does not compile on Windows #1

Closed Kylogias closed 3 years ago

Kylogias commented 3 years ago

On windows, using make that comes with mingw-w64 (i think), the compilation fails with error 'unistd.h' file not found

Windows 10 make version 4.3 Clang version 11.0.0

EDIT :: Apparently my clang toolchain was incorrect, but now I'm missing poll.h instead of unistd.h

youngchief-btw commented 3 years ago

It's a missing header, are you sure you installed everything you need?

Kylogias commented 3 years ago

It's a missing header, are you sure you installed everything you need?

I searched it up, and it's for accessing POSIX os procedures

youngchief-btw commented 3 years ago

I feel like it's because since Windows it's exactly POSIX compliant. Does MinGW have a POSIX compatibility layer?

Kylogias commented 3 years ago

Using the MSYS2 version of clang worked, but now I'm getting a 404 for poll.h

jdah commented 3 years ago

This requires complete POSIX compliance from the host system, sorry. Will add the info into. the README.

Kylogias commented 3 years ago

This requires complete POSIX compliance from the host system, sorry. Will add the info into. the README.

Can you give me a list of POSIX functions used so I can TRY to make it compatible with windows?

rupansh commented 3 years ago

This requires complete POSIX compliance from the host system, sorry. Will add the info into. the README.

Can you give me a list of POSIX functions used so I can TRY to make it compatible with windows?

Nuke the posix headers see the errors.

youngchief-btw commented 3 years ago

There's already POSIX compatibility layers for Windows. Just look online for the one that suits you.

youngchief-btw commented 3 years ago

Can I write Windows specific instructions on the README?

KingUndeadCodes commented 3 years ago

You should fork the repository and edit it that way. If our lord and savior jdh likes your contribution he may push it.

jdah commented 3 years ago

Can I write Windows specific instructions on the README?

Feel free to make a PR if you can get this compiling on Windows. Good luck though since the emulator uses readline which is very POSIX-specific, among other things. The test runner also relies a lot on POSIX functions (mktemp, opendir, etc.).

Kylogias commented 3 years ago

I'm trying to make a Windows "compatibility patch". Is the history feature in Readline ever used outside of adding things to history? If so, where

EDIT :: Just did a find in files, history is unused so I can safely add an empty add_history function

Kylogias commented 3 years ago

I GOT THE EMULATOR TO COMPILE!!! Halfway done (I might not compile the tests, although I will have to look at them first)

Kylogias commented 3 years ago

The full thing compiled (even the tests). The emulator was the hardest to compile, I had to make some compatibility code. There was only 1 error in the assembler which I don't think was POSIX specific. The tests compiled first try, no error correction necessary

jdah commented 3 years ago

Fixed with merge of cd6cf42a3e0e333939255c5fdbc5202d122e727e.