fslaborg / RProvider

Access R packages from F#
http://fslab.org/RProvider/
Other
235 stars 69 forks source link

linux(ubuntu) support. #149

Closed TonyAbell closed 9 years ago

TonyAbell commented 9 years ago

I followed the instructions here

http://rawgit.com/evelinag/Projects/master/RDotNetOnMac/output/RDotNetOnMac.html

Instead of using

let dllStr = "/Library/Frameworks/R.framework/Libraries/libR.dylib"

I used this for the dll

let dllStr = "/usr/lib/R/lib/libR.so"

I am able to get the R.Net to work.

However the R Provider is not working. I updated the RInit.fs as to look for the .so lib

https://github.com/BlueMountainCapital/FSharpRProvider/blob/master/src/RProvider/RInit.fs#L94

I even overwrote the init REngine

        //let engine = REngine.GetInstance(null, true, null, characterDevice)       
        let dllStr = "/usr/lib/R/lib/libR.so"
        let engine = REngine.GetInstance(dll=dllStr)

To load the dll explicitly .

But the RProvider does not work.

Has anyone able to get the RProvider to work on linux(ubuntu)?

tpetricek commented 9 years ago

Did you create the /.rprovider.conf file as mentioned here: http://bluemountaincapital.github.io/FSharpRProvider/mac-and-linux.html?

Can you capture a log file with what was going on & share it here? See: http://bluemountaincapital.github.io/FSharpRProvider/diagnostics.html

TonyAbell commented 9 years ago

I have setup the .config

here is the output of the log, where I have manually set the "/usr/lib/R/lib/libR.so"


[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] initAndGenerate: starting
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Setting execute permission on '/home/tony/FSharpRProvider/bin/RProvider.Server.exe'
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Starting server '/home/tony/FSharpRProvider/bin/RProvider.Server.exe' with arguments 'RInteropServer_17634_13513742_70628094 "/tmp/tmp61f24570.tmp"' (exists=true)
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_17634_13513742_70628094"; "/tmp/tmp61f24570.tmp"|]'
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_17634_13513742_70628094'
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Ready for connections..
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Waiting for parent process pid=17634 (System.Diagnostics.Process (mono-sgen))
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Attempting to connect via IPC
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Server started, running event loop
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Got some server
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] server event loop: starting
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] setupPathVariable
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] getRLocation
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Calling 'R --print-home'
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] setupPathVariable completed
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] generateTypes: getting packages
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] engine: Created & initialized instance
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Output: 
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] initAndGenerate: finished
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Probing locations: 
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Assembly not found!
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Probing locations: 
[4/24/2015 1:13:20 PM] [Pid:17634, Tid:24, Apid:0] Assembly not found!
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] eval(require(base))
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Output: 
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] evalto(function (pkgName) {
    require(pkgName, character.only=TRUE)
    pkgListing <- ls(paste("package:",pkgName,sep=""))
    lapply(
        pkgListing,
        function (pname) {
            pval <- get(pname)
            ptype <- typeof(pval)
            if (ptype == "closure") {
                list(name=pname, type=ptype, params=list(names(formals(pname))))
            } else {
                list(name=pname, type=ptype, params=NA)
            }
        }
    )
}, fsr_17679_1)
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Output: 
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] eval(fsr_17679_1('base'))
[4/24/2015 1:13:20 PM] [Pid:17679, Tid:1, Apid:0] Output: 
[4/24/2015 1:13:28 PM] [Pid:17651, Tid:1, Apid:0] initAndGenerate: starting
[4/24/2015 1:13:28 PM] [Pid:17651, Tid:1, Apid:0] Setting execute permission on '/home/tony/FSharpRProvider/bin/RProvider.Server.exe'
[4/24/2015 1:13:28 PM] [Pid:17651, Tid:1, Apid:0] Starting server '/home/tony/FSharpRProvider/bin/RProvider.Server.exe' with arguments 'RInteropServer_17651_13522620_720306676 "/tmp/tmp64951b1f.tmp"' (exists=true)
[4/24/2015 1:13:28 PM] [Pid:17651, Tid:1, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_17651_13522620_720306676"; "/tmp/tmp64951b1f.tmp"|]'
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_17651_13522620_720306676'
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Ready for connections..
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Waiting for parent process pid=17651 (System.Diagnostics.Process (mono-sgen))
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Server started, running event loop
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] server event loop: starting
[4/24/2015 1:13:29 PM] [Pid:17651, Tid:1, Apid:0] Attempting to connect via IPC
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] setupPathVariable
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] getRLocation
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Calling 'R --print-home'
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] setupPathVariable completed
[4/24/2015 1:13:29 PM] [Pid:17651, Tid:1, Apid:0] Got some server
[4/24/2015 1:13:29 PM] [Pid:17651, Tid:1, Apid:0] generateTypes: getting packages
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:7, Apid:0] Adding work item to queue
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] engine: Created & initialized instance
[4/24/2015 1:13:29 PM] [Pid:17715, Tid:1, Apid:0] Output: 
[4/24/2015 1:13:29 PM] [Pid:17651, Tid:1, Apid:0] initAndGenerate: finished
TonyAbell commented 9 years ago

here is the log where let the RInit.fs find the libR.so


[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] initAndGenerate: starting
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Setting execute permission on '/home/tony/FSharpRProvider/bin/RProvider.Server.exe'
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Starting server '/home/tony/FSharpRProvider/bin/RProvider.Server.exe' with arguments 'RInteropServer_17913_13889831_1446913997 "/tmp/tmp77e6aa5.tmp"' (exists=true)
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_17913_13889831_1446913997"; "/tmp/tmp77e6aa5.tmp"|]'
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_17913_13889831_1446913997'
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Ready for connections..
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Waiting for parent process pid=17913 (System.Diagnostics.Process (mono-sgen))
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Attempting to connect via IPC
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Server started, running event loop
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] server event loop: starting
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Got some server
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] setupPathVariable
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] getRLocation
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Calling 'R --print-home'
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] setupPathVariable completed
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] generateTypes: getting packages
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] engine: Created & initialized instance
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Output: 
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] initAndGenerate: finished
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Probing locations: 
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Assembly not found!
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Probing locations: 
[4/24/2015 1:19:36 PM] [Pid:17913, Tid:24, Apid:0] Assembly not found!
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] eval(require(base))
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Output: 
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] evalto(function (pkgName) {
    require(pkgName, character.only=TRUE)
    pkgListing <- ls(paste("package:",pkgName,sep=""))
    lapply(
        pkgListing,
        function (pname) {
            pval <- get(pname)
            ptype <- typeof(pval)
            if (ptype == "closure") {
                list(name=pname, type=ptype, params=list(names(formals(pname))))
            } else {
                list(name=pname, type=ptype, params=NA)
            }
        }
    )
}, fsr_17959_1)
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Output: 
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] eval(fsr_17959_1('base'))
[4/24/2015 1:19:36 PM] [Pid:17959, Tid:1, Apid:0] Output: 
[4/24/2015 1:19:48 PM] [Pid:17930, Tid:1, Apid:0] initAndGenerate: starting
[4/24/2015 1:19:48 PM] [Pid:17930, Tid:1, Apid:0] Setting execute permission on '/home/tony/FSharpRProvider/bin/RProvider.Server.exe'
[4/24/2015 1:19:48 PM] [Pid:17930, Tid:1, Apid:0] Starting server '/home/tony/FSharpRProvider/bin/RProvider.Server.exe' with arguments 'RInteropServer_17930_13902590_114712110 "/tmp/tmp51d3a023.tmp"' (exists=true)
[4/24/2015 1:19:48 PM] [Pid:17930, Tid:1, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_17930_13902590_114712110"; "/tmp/tmp51d3a023.tmp"|]'
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_17930_13902590_114712110'
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Ready for connections..
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Waiting for parent process pid=17930 (System.Diagnostics.Process (mono-sgen))
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Server started, running event loop
[4/24/2015 1:19:49 PM] [Pid:17930, Tid:1, Apid:0] Attempting to connect via IPC
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] server event loop: starting
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] setupPathVariable
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] getRLocation
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Calling 'R --print-home'
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] setupPathVariable completed
[4/24/2015 1:19:49 PM] [Pid:17930, Tid:1, Apid:0] Got some server
[4/24/2015 1:19:49 PM] [Pid:17930, Tid:1, Apid:0] generateTypes: getting packages
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:7, Apid:0] Adding work item to queue
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] engine: Created & initialized instance
[4/24/2015 1:19:49 PM] [Pid:18001, Tid:1, Apid:0] Output: 
[4/24/2015 1:19:49 PM] [Pid:17930, Tid:1, Apid:0] initAndGenerate: finished
[4/24/2015 1:38:14 PM] [Pid:18001, Tid:5, Apid:0] Posting Stop command
[4/24/2015 1:38:14 PM] [Pid:18001, Tid:1, Apid:0] server event loop: got stop command
[4/24/2015 1:38:14 PM] [Pid:18001, Tid:1, Apid:0] Event loop finished, shutting down
[4/24/2015 1:38:15 PM] [Pid:17959, Tid:8, Apid:0] Posting Stop command
[4/24/2015 1:38:15 PM] [Pid:17959, Tid:1, Apid:0] server event loop: got stop command
[4/24/2015 1:38:15 PM] [Pid:17959, Tid:1, Apid:0] Event loop finished, shutting down
TonyAbell commented 9 years ago

I was looking into the Assembly Not Found errors

This function https://github.com/BlueMountainCapital/FSharpRProvider/blob/master/src/RProvider/Configuration.fs#L39

was returning an empty list.

So I hard coded the folder, and I got rid of the Assembly Errors, but its still not working


[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] setupPathVariable completed
[4/24/2015 3:30:41 PM] [Pid:5269, Tid:1, Apid:0] Got some server
[4/24/2015 3:30:41 PM] [Pid:5269, Tid:1, Apid:0] generateTypes: getting packages
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:7, Apid:0] Adding work item to queue
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] engine: Created & initialized instance
[4/24/2015 3:30:41 PM] [Pid:5322, Tid:1, Apid:0] Output: 
[4/24/2015 3:30:41 PM] [Pid:5269, Tid:1, Apid:0] initAndGenerate: finished
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] RDotNet, Version=1.5.16.30632, Culture=neutral, PublicKeyToken=null, Resolve Referenced Assembly
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] Probing locations: /home/tony/FSharpRProvider/bin
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] Found assembly, checking version! (/home/tony/FSharpRProvider/bin/RDotNet.dll)
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] ...version matches, returning!
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] RDotNet.NativeLibrary, Version=1.5.16.30632, Culture=neutral, PublicKeyToken=null, Resolve Referenced Assembly
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] Probing locations: /home/tony/FSharpRProvider/bin
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] Found assembly, checking version! (/home/tony/FSharpRProvider/bin/RDotNet.NativeLibrary.dll)
[4/24/2015 3:30:42 PM] [Pid:5252, Tid:5, Apid:0] ...version matches, returning!
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] eval(require(base))
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] evalto(function (pkgName) {
    require(pkgName, character.only=TRUE)
    pkgListing <- ls(paste("package:",pkgName,sep=""))
    lapply(
        pkgListing,
        function (pname) {
            pval <- get(pname)
            ptype <- typeof(pval)
            if (ptype == "closure") {
                list(name=pname, type=ptype, params=list(names(formals(pname))))
            } else {
                list(name=pname, type=ptype, params=NA)
            }
        }
    )
}, fsr_5297_1)
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] eval(fsr_5297_1('base'))
[4/24/2015 3:30:42 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:30:58 PM] [Pid:5252, Tid:29, Apid:0] initAndGenerate: starting
[4/24/2015 3:30:58 PM] [Pid:5252, Tid:29, Apid:0] generateTypes: getting packages
[4/24/2015 3:30:58 PM] [Pid:5297, Tid:6, Apid:0] Adding work item to queue
[4/24/2015 3:30:58 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:30:58 PM] [Pid:5297, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 3:30:58 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:30:58 PM] [Pid:5252, Tid:29, Apid:0] initAndGenerate: finished
[4/24/2015 3:31:15 PM] [Pid:5252, Tid:30, Apid:0] initAndGenerate: starting
[4/24/2015 3:31:15 PM] [Pid:5252, Tid:30, Apid:0] generateTypes: getting packages
[4/24/2015 3:31:15 PM] [Pid:5297, Tid:9, Apid:0] Adding work item to queue
[4/24/2015 3:31:15 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:31:15 PM] [Pid:5297, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 3:31:15 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:31:15 PM] [Pid:5252, Tid:30, Apid:0] initAndGenerate: finished
[4/24/2015 3:31:51 PM] [Pid:5252, Tid:30, Apid:0] initAndGenerate: starting
[4/24/2015 3:31:51 PM] [Pid:5252, Tid:30, Apid:0] generateTypes: getting packages
[4/24/2015 3:31:51 PM] [Pid:5297, Tid:10, Apid:0] Adding work item to queue
[4/24/2015 3:31:51 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got work item
[4/24/2015 3:31:51 PM] [Pid:5297, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/24/2015 3:31:51 PM] [Pid:5297, Tid:1, Apid:0] Output: 
[4/24/2015 3:31:51 PM] [Pid:5252, Tid:30, Apid:0] initAndGenerate: finished
[4/24/2015 3:32:09 PM] [Pid:5322, Tid:8, Apid:0] Posting Stop command
[4/24/2015 3:32:09 PM] [Pid:5322, Tid:1, Apid:0] server event loop: got stop command
[4/24/2015 3:32:09 PM] [Pid:5322, Tid:1, Apid:0] Event loop finished, shutting down
[4/24/2015 3:32:10 PM] [Pid:5297, Tid:5, Apid:0] Posting Stop command
[4/24/2015 3:32:10 PM] [Pid:5297, Tid:1, Apid:0] server event loop: got stop command
[4/24/2015 3:32:10 PM] [Pid:5297, Tid:1, Apid:0] Event loop finished, shutting down
tpetricek commented 9 years ago

This is odd - there is no obvious exception in the logs.

TonyAbell commented 9 years ago

I am using Paket

paket.dependencies
source https://nuget.org/api/v2
nuget FsLab

I have a basic script file

foo.fsx
#load "packages/FsLab/FsLab.fsx"
#load "packages/RProvider/RProvider.fsx"
open RProvider
open RProvider.graphics
open RProvider.grDevices
open RProvider.datasets

R.x11()

[ for x in 0.0 .. 0.1 .. 3.14 -> 
    R.sin(x).GetValue<float>() ]
|> R.plot

R.plot(R.Nile)

In /usr/lib/R/lib I copied libR.so -> libR.dylib So, RInit.fs will not fail

I am using MonoDevelop I get the following RED squiggly Parser Error: The field, constructor or member 'x11' not defined

I also get the following error in FSI

/home/tony/work/foo.fsx(16,1): error FS0039: The namespace or module 'R' is not defined

Below is the log when I load the script above in mono devlop

[4/25/2015 12:35:10 PM] [Pid:8086, Tid:8, Apid:0] Posting Stop command
[4/25/2015 12:35:10 PM] [Pid:8086, Tid:1, Apid:0] server event loop: got stop command
[4/25/2015 12:35:10 PM] [Pid:8086, Tid:1, Apid:0] Event loop finished, shutting down
[4/25/2015 12:35:10 PM] [Pid:8138, Tid:8, Apid:0] Posting Stop command
[4/25/2015 12:35:10 PM] [Pid:8138, Tid:1, Apid:0] server event loop: got stop command
[4/25/2015 12:35:10 PM] [Pid:8138, Tid:1, Apid:0] Event loop finished, shutting down
[4/25/2015 12:38:18 PM] [Pid:8209, Tid:14, Apid:0] initAndGenerate: starting
[4/25/2015 12:38:18 PM] [Pid:8209, Tid:14, Apid:0] Setting execute permission on '/home/tony/work/packages/RProvider/lib/net40/RProvider.Server.exe'
[4/25/2015 12:38:18 PM] [Pid:8209, Tid:14, Apid:0] Starting server '/home/tony/work/packages/RProvider/lib/net40/RProvider.Server.exe' with arguments 'RInteropServer_8209_82776369_1065771755 "/tmp/tmp1e362f87.tmp"' (exists=true)
[4/25/2015 12:38:18 PM] [Pid:8209, Tid:14, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_8209_82776369_1065771755"; "/tmp/tmp1e362f87.tmp"|]'
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_8209_82776369_1065771755'
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Ready for connections..
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Waiting for parent process pid=8209 (System.Diagnostics.Process (mono-sgen))
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Server started, running event loop
[4/25/2015 12:38:19 PM] [Pid:8209, Tid:14, Apid:0] Attempting to connect via IPC
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.dll)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.NativeLibrary.dll)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] server event loop: starting
[4/25/2015 12:38:19 PM] [Pid:8209, Tid:14, Apid:0] Got some server
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] setupPathVariable
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] getRLocation
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Calling 'R --print-home'
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] setupPathVariable completed
[4/25/2015 12:38:19 PM] [Pid:8209, Tid:14, Apid:0] generateTypes: getting packages
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] engine: Created & initialized instance
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40/Deedle.RProvider.Plugin.dll)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40/Deedle.dll)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40/RDotNet.FSharp.dll)
[4/25/2015 12:38:19 PM] [Pid:8230, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:38:19 PM] [Pid:8209, Tid:14, Apid:0] initAndGenerate: finished
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.dll)
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] ...version matches, returning!
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.NativeLibrary.dll)
[4/25/2015 12:38:21 PM] [Pid:8209, Tid:14, Apid:0] ...version matches, returning!
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(require(datasets))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] evalto(function (pkgName) {
    require(pkgName, character.only=TRUE)
    pkgListing <- ls(paste("package:",pkgName,sep=""))
    lapply(
        pkgListing,
        function (pname) {
            pval <- get(pname)
            ptype <- typeof(pval)
            if (ptype == "closure") {
                list(name=pname, type=ptype, params=list(names(formals(pname))))
            } else {
                list(name=pname, type=ptype, params=NA)
            }
        }
    )
}, fsr_8230_1)
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(fsr_8230_1('datasets'))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(require(grDevices))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(fsr_8230_1('grDevices'))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(require(graphics))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(fsr_8230_1('graphics'))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(require(base))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] eval(fsr_8230_1('base'))
[4/25/2015 12:38:21 PM] [Pid:8230, Tid:1, Apid:0] Output: 
[4/25/2015 12:38:22 PM] [Pid:8209, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:38:22 PM] [Pid:8209, Tid:1, Apid:0] Assembly not found!
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] initAndGenerate: starting
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] Setting execute permission on '/home/tony/work/packages/RProvider/lib/net40/RProvider.Server.exe'
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] Starting server '/home/tony/work/packages/RProvider/lib/net40/RProvider.Server.exe' with arguments 'RInteropServer_8242_83068730_633270406 "/tmp/tmp253e516f.tmp"' (exists=true)
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] get64bitMonoExecutable - Home: '/home/tony'
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Starting 'RProvider.Server' with arguments '[|"RInteropServer_8242_83068730_633270406"; "/tmp/tmp253e516f.tmp"|]'
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Registering RInteropServer at channel 'RInteropServer_8242_83068730_633270406'
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Ready for connections..
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Waiting for parent process pid=8242 (System.Diagnostics.Process (mono-sgen))
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Server started, running event loop
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] Attempting to connect via IPC
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.dll)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40/RDotNet.NativeLibrary.dll)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] server event loop: starting
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] setupPathVariable
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] getRLocation
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Calling 'R --print-home'
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] Got some server
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] R --print-home returned: /usr/lib/R

[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] setupPathVariable: path='/usr/lib/R/lib', home='/usr/lib/R'
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] setupPathVariable completed
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] generateTypes: getting packages
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] eval(.packages(all.available=T))
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] engine: Creating and initializing instance (sizeof<IntPtr>=8)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] engine: Created & initialized instance
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Output: 
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40/Deedle.RProvider.Plugin.dll)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40/Deedle.dll)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Probing locations: /home/tony/work/packages/RProvider/lib/net40/../../../Deedle/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Deedle.RPlugin/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Charting/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Core/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../FSharp.Data/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../Foogle.Charts/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../MathNet.Numerics.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40;/home/tony/work/packages/RProvider/lib/net40/../../../RProvider/lib/net40
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] Found assembly, checking version! (/home/tony/work/packages/RProvider/lib/net40/../../../R.NET.Community.FSharp/lib/net40/RDotNet.FSharp.dll)
[4/25/2015 12:43:11 PM] [Pid:8271, Tid:1, Apid:0] ...version matches, returning!
[4/25/2015 12:43:11 PM] [Pid:8242, Tid:1, Apid:0] initAndGenerate: finished
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] eval(require(datasets))
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] Output: 
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:7, Apid:0] Adding work item to queue
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] server event loop: got work item
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] evalto(function (pkgName) {
    require(pkgName, character.only=TRUE)
    pkgListing <- ls(paste("package:",pkgName,sep=""))
    lapply(
        pkgListing,
        function (pname) {
            pval <- get(pname)
            ptype <- typeof(pval)
            if (ptype == "closure") {
                list(name=pname, type=ptype, params=list(names(formals(pname))))
            } else {
                list(name=pname, type=ptype, params=NA)
            }
        }
    )
}, fsr_8271_1)
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] Output: 
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] eval(fsr_8271_1('datasets'))
[4/25/2015 12:43:13 PM] [Pid:8271, Tid:1, Apid:0] Output: 
TonyAbell commented 9 years ago

I was noticing some error about Assembly not found, so I updated the logging and its was looking for Sharpen which is odd.

[4/27/2015 11:02:51 AM] [Pid:12245, Tid:1, Apid:0] Probing locations: /home/tony/FSharpRProvider/bin
[4/27/2015 11:02:51 AM] [Pid:12245, Tid:1, Apid:0] Assembly not found!: Sharpen, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[4/27/2015 11:02:51 AM] [Pid:12245, Tid:5, Apid:0] initAndGenerate: starting
tpetricek commented 9 years ago

R provider installs assembly resolve handler, and so all assembly loads go through that... so it might be reporting things that are not really relevant (just happen later once it loads). But I still have no idea what is going wrong here... looks like I'll need a Linux VM!

jiridanek commented 9 years ago

I did the following to setup the provider on Arch Linux:

_1. Add the assembly to my project using NuGet (inside monodevelop) _2. Put MONO64=/usr/bin/mono into ~/.rprovider.conf

at this point I was getting a

"no R engine at /usr/lib64/R/lib" message in the autocompletion dialog in monodevelop

_3. Create a symlink from /usr/lib64/R/lib/libR.dylib to /usr/lib64/R/lib/libR.so (as root with ln -s)

now I was getting a "object reference not set to an instance of an object" in the autocomplete dialog.

I was able to run the following sample program at this point, even though monodevelop was underlining \``base```andc` as unrecognized

open RProvider
open RProvider.``base``

let v = R.c(1,2,3)
printfn "%A" v

_4. I closed monodevelop and opened it again (with the RPROVIDER_LOG set, wanting to read the log) and the autocomplete started working. I then checked that running monodevelop without the variable set was also fine.

_5. Profit.

As far as I can tell, the only obvious bug I can see is at https://github.com/BlueMountainCapital/FSharpRProvider/blob/e6777971afcb07205f84f600af9755c399c8f27c/src/RProvider/RInit.fs#L96 when provider expects to find libR.dynlib on both Linux and Mac, yet the Linux naming convention is libR.so.

tpetricek commented 9 years ago

The fix from @jirkadanek is released in v1.1.14. It would be good if more people could try this on Linux (I did all my testing on Mac), but for now, it looks like there is at least some evidence that this works :-).