Mac system jmvtools check does not work

Everything related to the development of modules in jamovi
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

For the location of node, I get

> installed.packages()['node','LibPath']
[1] "/Users/bob/Library/R/x86_64/4.1/library"

And then in a terminal in that directory, ls gives:
bob@Roberts-Mac node % ls
DESCRIPTION NAMESPACE help node.exe
Meta R html

and that's it -- doesn't seem like there is a node-darwin directory at all, and no binary for node
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

For the location of node, I get

> installed.packages()['node','LibPath']
[1] "/Users/bob/Library/R/x86_64/4.1/library"

And then in a terminal in that directory, ls gives:
bob@Roberts-Mac node % ls
DESCRIPTION NAMESPACE help node.exe
Meta R html

and that's it -- doesn't seem like there is a node-darwin directory at all, and no binary for node

rcalinjageman

Posts: 9
Joined: Wed Nov 11, 2020 7:49 pm
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Mac system jmvtools check does not work

Post by jonathon »

could you run the following, and share the output?

install.packages("node", repos = "https://repo.jamovi.org", verbose = T)

with thanks
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

I removed the package first and then ran install with verbose output:

> install.packages("node", repos = "https://repo.jamovi.org", verbose = T)
Warning in install.packages :
unable to access index for repository https://repo.jamovi.org/bin/macosx/contrib/4.1:
cannot open URL 'https://repo.jamovi.org/bin/macosx/contrib/4.1/PACKAGES'
installing the source package ‘node’

system (cmd0): /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL
trying URL 'https://repo.jamovi.org/src/contrib/node_1.1.tar.gz'
Content type 'application/gzip' length 23367174 bytes (22.3 MB)
==================================================
downloaded 22.3 MB

foundpkgs: node, /var/folders/c1/xc206d7954d4r_7c_2zhp78c0000gn/T//RtmpNptZWa/downloaded_packages/node_1.1.tar.gz
files: /var/folders/c1/xc206d7954d4r_7c_2zhp78c0000gn/T//RtmpNptZWa/downloaded_packages/node_1.1.tar.gz
* installing *source* package ‘node’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
No man pages found in package ‘node’
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (node)
1): succeeded '/Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL -l '/Library/Frameworks/R.framework/Versions/4.1/Resources/library' '/var/folders/c1/xc206d7954d4r_7c_2zhp78c0000gn/T//RtmpNptZWa/downloaded_packages/node_1.1.tar.gz''

The downloaded source packages are in
‘/private/var/folders/c1/xc206d7954d4r_7c_2zhp78c0000gn/T/RtmpNptZWa/downloaded_packages’
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

Can confirm that https://repo.jamovi.org/src/contrib/node_1.1.tar.gz does not include the executables for OSX or Linux, but https://repo.jamovi.org/src/contrib/node_1.0.tar.gz does, though the node executable included in the 1.0 version throws errors.

I've tried installing 1.0 and replacing the node executables--that gets me very close, but I still get a strange error during install, and I'm getting it on two different vmware installs, one with osx 10.5 and the other with osx 11.0:

dyld: Library not loaded: @executable_path/../Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
Referenced from: /Applications/jamovi.app/Contents/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib
Reason: image not found
/Applications/jamovi.app/Contents/Frameworks/R.framework/Versions/Current/Resources/bin/INSTALL: line 34: 1849 Done echo 'tools:::.install_packages()'
1850 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}


I can confirm that libRblas.dylib is in its expected location inside the jamovi install (well, at least a pointer to libRblas.0.dylib).. which makes me wonder if the error is in the definition of the executable path (@executable_path/../Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib)?
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Mac system jmvtools check does not work

Post by jonathon »

update to jamovi 2.3.2 to solve that last problem.

jonathon
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

I am on 2.3.2 -- and just tried a fresh install of 2.3.2 as well. These are both virtual machines I just setup today, both with the latest jamovi builds. getting the same thing on both machines in Rstudio and from the R command line.
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Mac system jmvtools check does not work

Post by jonathon »

yeah, i'm a bit puzzled -- everything works like a charm at this end.

that R isn't installing the contents of the node package, i find it hard to escape the conclusion that it's a bug in R.

the image not found error, we used to get that, and had to start using an unsigned version for development, but that stopped being an issue in the 2.3 ... you could try using the unsigned version as a work around (but i don't know how old that is now, i stopped updating it, because it stopped being necessary ... but it should be compatible with the 2.2 series).

details here:

https://dev.jamovi.org/#28-02-2020

cheers

jonathon
rcalinjageman
Posts: 14
Joined: Thu Nov 12, 2020 1:49 am

Re: Mac system jmvtools check does not work

Post by rcalinjageman »

Got everything working now, on two different VMware images; thanks.

To get things working I:
* Downloaded the unsigned development version of jamovi
* Installed jmvtools as directed in the tutorial
* Found the directory where the node library was installed, then created the subdirectories node-darwin/bin and then moved an updated node executable into that directory

And the module I'd been working on now compiles. I had often been sharing a PC-compiled module with OS X users, but then starting using the build function in ggplot2, which is apparently implemented differently across platforms, leading graphs to throw an error when using the PC-compiled module on OS X. Compiling the module in OS X fixes this issue.

For the missing node executables -- they really don't seem to be in the package offered in jamovi's repo. That is, if I just directly download the node package for OS X (https://repo.jamovi.org/src/contrib/node_1.1.tar.gz) and inspect it, there are no directories for the linux or OS X executables included.

Not sure what's going on with the signed vs. unsigned version of jamovi. I had no luck using the signed versions on OS X 10.15 or 11.

Bob
User avatar
jonathon
Posts: 2622
Joined: Fri Jan 27, 2017 10:04 am

Re: Mac system jmvtools check does not work

Post by jonathon »

oh wow, i am so puzzled as to how that happened ...

install.packages('node', repos='https://repo.jamovi.org')

and you should be in business

jonathon
Post Reply