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

Failure to install package on OSX #31

Open
Ic3fr0g opened this issue Aug 21, 2017 · 8 comments
Open

Failure to install package on OSX #31

Ic3fr0g opened this issue Aug 21, 2017 · 8 comments

Comments

@Ic3fr0g
Copy link

Ic3fr0g commented Aug 21, 2017

Here's what I tried

> install_github("jmp75/rClr", build_vignettes=TRUE)
Downloading GitHub repo jmp75/rClr@master
from URL https://api.github.com/repos/jmp75/rClr/zipball/master
Installing rClr
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save  \
  --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ln/b1l94dln6776jvygly8tsqdh0000gn/T/RtmpkOU5ZK/devtools1d9061e6736e/jmp75-rClr-fa41e2a'  \
  --library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library' --install-tests 

* installing *source* package ‘rClr’ ...
./configure: line 43: pkg-config: command not found
./configure: line 44: pkg-config: command not found
MONO_CFLAGS=
GLIB_CFLAGS=
error: mono-2 not found
ERROR: configuration failed for package ‘rClr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rClr’
Installation failed: Command failed (1)

Here is the sessionInfo()

R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
@Ic3fr0g
Copy link
Author

Ic3fr0g commented Aug 30, 2017

Ok. So here's how far I got -

brew install mono
Might have linking errors, in which case I Super-Usered it based on reading several different links.
sudo chown -R (username-here) /usr/local/share/man/man5
Similarly, brew install pkg-config and brew install glib

However reinstalling in R still threw an error -

Time Elapsed 00:00:28.1337040
if [ -e symbols.rds ] ; then cp -u -p symbols.rds ../inst/libs ; fi
# using rm -f to prevent the following, which seems to occur even when these should not be write-protected
#  cp: cannot create regular file `../inst/libs/ClrFacade.dll': Permission denied
rm -f ../inst/libs/*.*
cp -u -p ./Release/*.dll* ../inst/libs
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: [rClrLib] Error 64 (ignored)
installing to /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rClr/libs
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rClr’:
 .onLoad failed in loadNamespace() for 'rClr', details:
  call: NULL
  error: file.exists(f) is not TRUE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rClr’
Installation failed: Command failed (1)

@Ic3fr0g
Copy link
Author

Ic3fr0g commented Aug 30, 2017

Oh btw Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Wed May 31 14:47:04 BST 2017)

@jmp75
Copy link
Collaborator

jmp75 commented Aug 31, 2017

Thanks for the information, this is comprehensive. I do not have access to MacOS so not sure, but what seems to be likely is that the .Net assembly ClrFacade.dll is not present in the 'inst' folder, so probably a compilation failure.
I have been trying to refresh rClr on a branch, after a lull due to changing daytime job tech stack. I should be in a position to merge to master soon, but I need to do a few more checks.

@ruaridhw
Copy link

@jmp75 that ClrFacade.dll line isn't doing anything as it's commented out. It's from Makevars.in

The error is actually

cp: illegal option -- u

which is valid on Linux but not macOS.

@Ic3fr0g I'd also try installing Mono 3.12 as this was the most recent version that I could get working

@scottmmjackson
Copy link

Removing -u from Makevars.in produces the following build failure:

** testing if installed package can be loaded
Assembly '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rClr/libs/ClrFacade.dll' doesn't have an entry point.
Error : .onLoad failed in loadNamespace() for 'rClr', details:
  call: clrCallStatic("Rclr.RDotNetDataConverter", "SetRDotNet", setit)
  error: Type:    System.DllNotFoundException
Message: libdl
Method:  
Stack trace:
  at (wrapper managed-to-native) DynamicInterop.UnixLibraryLoader:dlopen (string,int)
  at DynamicInterop.UnixLibraryLoader.InternalLoadLibrary (System.String filename) [0x00000] in <2f38952616d44b6ea2a3d9d6785e37f8>:0 
  at DynamicInterop.UnixLibraryLoader.LoadLibrary (System.String filename) [0x00000] in <2f38952616d44b6ea2a3d9d6785e37f8>:0 
  at DynamicInterop.SafeHandleUnmanagedDll..ctor (System.String dllName) [0x0003f] in <2f38952616d44b6ea2a3d9d6785e37f8>:0 
  at DynamicInterop.UnmanagedDll..ctor (System.String dllName) [0x00041] in <2f38952616d44b6ea2a3d9d6785e37f8>:0 
  at Rclr.RclrUnmanagedDll..ctor (System.String dllName) [0x00015] in <a526d4fc81d049258245753e6204f325>:0 
  at Rclr.RDotNetDataConverter..ctor (System.String pathToNativeSharedObj) [0x0006e] in <a526d4fc81d049258245753e6204f325>:0 
  at Rclr.RDotNetDataConverter.GetInstance (System.String pathToNativeSharedObj) [0x00007] in <a526d4fc81d
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rClr’

Exited with status 1.
$ mono --version
Mono JIT compiler version 5.4.1.6 (tarball Mon Dec 11 14:59:42 GMT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)

Additionally:

/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo **Variable (information only for diagnosis purposes)**'

(Makevars.in needs to quote strings with parens in them)

Additionally:

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

(Changing xbuild to msbuild in Makevars.in doesn't change the outcome)

@king-of-poppk
Copy link

king-of-poppk commented Feb 13, 2023

Hi @scottmmjackson!

** testing if installed package can be loaded
Assembly '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rClr/libs/ClrFacade.dll' doesn't have an entry point.
Error : .onLoad failed in loadNamespace() for 'rClr', details:
 call: clrCallStatic("Rclr.RDotNetDataConverter", "SetRDotNet", setit)
 error: Type:    System.DllNotFoundException

Stuck at the same place with Mono v6.12.0.18 and R v4.2.2. Did you manage to make it work somehow?

@scottmmjackson
Copy link

Sadly no

@king-of-poppk
Copy link

Looks very similar to #49.

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

No branches or pull requests

5 participants