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

instructions for installing entab-r on mac os x #35

Merged
merged 7 commits into from
Jul 28, 2022
Merged

instructions for installing entab-r on mac os x #35

merged 7 commits into from
Jul 28, 2022

Conversation

ethanbass
Copy link
Contributor

I wrote some instructions for getting Rust to play nicely with R Studio on Mac OS X. Took me a little while to figure out, so it's probably worth mentioning somewhere. Feel free to modify the actual text.

@bovee
Copy link
Owner

bovee commented Jul 28, 2022

Hey, thanks so much for putting this together! I think the documentation is great, but I'm not sure the Makefile changes would work on Linux too? They might also conflict with the Makevars file; does R Studio not work with that? If so, I futzed a little and I think we can replace Makevars with a Makefile that contains:

TARGET_DIR = ../target
LIBDIR = $(TARGET_DIR)/release
STATLIB = libentab.so
PKG_LIBS = -L$(LIBDIR) -lentab
ifeq ($(shell uname -s),Darwin)
	PLATFORM_STATLIB = libentab.dylib
else
	PLATFORM_STATLIB = libentab.so
endif

all: $(STATLIB) clean_working

$(SHLIB): $(STATLIB)

$(STATLIB):
	cargo build --release --manifest-path=../Cargo.toml --target-dir $(TARGET_DIR)
	mv ./$(LIBDIR)/$(PLATFORM_STATLIB) ./$(STATLIB)

clean_working:
	rm -Rf $(OBJECTS) $(TARGET_DIR)

clean:
	rm -Rf $(SHLIB) $(STATLIB) $(OBJECTS) $(TARGET_DIR)

Let me know either way and then we can merge this.

@ethanbass
Copy link
Contributor Author

ethanbass commented Jul 28, 2022

Hi,
The makefile was a relic from when I was messing around back in March trying to get Entab to install on OS X. I think the solution you came up with is probably better. (I don't think you need to change anything with the makevars) I only meant to push the update to the README here! Sorry for the confusion!

@ethanbass
Copy link
Contributor Author

ethanbass commented Jul 28, 2022

I think you might have to also modify the .Rprofile to use entab-R in RStudio on Windows?? I thought this was a problem only on OSX but I was getting the same error on the Windows 10 machine in the lab. I was going to try to figure it out and write up some instructions but I didn't manage to install it yet. It kept telling me I had to install all these different visual studio things and then I got side-tracked and lost the thread. Do you use Windows at all or only Linux?

@ethanbass
Copy link
Contributor Author

It would be nice if R could just find the path to Cargo on its own. I saw there's been some discussion about this on the extendr github page: extendr/rextendr#100

@bovee
Copy link
Owner

bovee commented Jul 28, 2022

No problems!

I only have Linux installed right now. :/ I'm not surprised about Windows not finding it in PATH either. I think for Windows support you can create a separate Makevars.win so theoretically that could just link to wherever rustup installs to.

@codecov-commenter
Copy link

Codecov Report

Merging #35 (d59a70b) into master (b82f1e3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #35   +/-   ##
=======================================
  Coverage   73.17%   73.17%           
=======================================
  Files          32       32           
  Lines        3489     3489           
=======================================
  Hits         2553     2553           
  Misses        936      936           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bovee
Copy link
Owner

bovee commented Jul 28, 2022

I'm going to merge this for now, but happy to revisit and add Windows documentation in the future (feel free to make an issue there too if you want).

@bovee bovee merged commit b4ea4ce into bovee:master Jul 28, 2022
@ethanbass
Copy link
Contributor Author

ethanbass commented Oct 11, 2022 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants