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

Run cc() on windows #6423

Closed
rikivillalba opened this issue Aug 28, 2024 · 2 comments
Closed

Run cc() on windows #6423

rikivillalba opened this issue Aug 28, 2024 · 2 comments

Comments

@rikivillalba
Copy link
Contributor

I was able to run cc() on windows under MinGW after some modifications.
Most important, -c99 compliance is an issue because with -c99 the macro WIN32 is not defined (only _WIN32), and then fread.c and others do not guard against including <sys/mman.h>, which is not provided by MinGW.

Previous related: #4189

diff:
master...rikivillalba:data.table:dev_cc_R_win32

@tdhock
Copy link
Member

tdhock commented Aug 29, 2024

wow nice hack!
this should affect anybody on windows, right?
I would suggest submitting a PR.

I was able to run cc() on windows under MinGW after some modifications.

is your MinGW same as rtools?

@rikivillalba
Copy link
Contributor Author

Yes, I'm using rtools.

MichaelChirico added a commit that referenced this issue Aug 29, 2024
* cc.R:
  - add WIN32 define (-DWIN32) as -c99 do not definie it
  - in windows replace `system()` with `shell()`
  - in windows data_table.dll instead of data_table.so (dyn.load())

* Update cc.R

* Update cc.R

* Apply suggestions from code review

Co-authored-by: Michael Chirico <chiricom@google.com>

* Update .dev/cc.R

Co-authored-by: Michael Chirico <chiricom@google.com>

* use dt_object

* make log clearer

* make OMP clearer, use R"()" in other branch too

---------

Co-authored-by: Michael Chirico <chiricom@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants