bovee / entab

* -> TSV
MIT License
21 stars 5 forks source link

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

Closed ethanbass closed 1 year ago

ethanbass commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/extendr/rextendr/issues/100

bovee commented 1 year ago

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 commented 1 year ago

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           

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

bovee commented 1 year ago

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).

ethanbass commented 1 year ago

Sounds good! 👍 I'm very busy right now trying to finish up some summer project, but if I have a few extra minutes in the lab i'll try to figure out how to get it to install on windows.

On Wed, Jul 27, 2022 at 11:43 PM Roderick Bovee @.***> wrote:

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).

— Reply to this email directly, view it on GitHub https://github.com/bovee/entab/pull/35#issuecomment-1197620310, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZEBO3PNNH4DQIBS4HSA7DVWH6VXANCNFSM54TXBVTQ . You are receiving this because you authored the thread.Message ID: @.***>