Re: [Rd] dyn.load loads libraries/symbols at high addresses.

2023-02-23 Thread Tomas Kalibera
On 2/22/23 23:05, Vanessa McHale wrote: Hello all, I am trying to write an interface for BQN and R However, even | dyn.load("/usr/local/lib/libcbqn.so"); .Call("bqn_init")| immediately fails on the BQN side, viz. |Failed to allocate memory for JIT 200 time

[Rd] dyn.load loads libraries/symbols at high addresses.

2023-02-22 Thread Vanessa McHale
Hello all, I am trying to write an interface for BQN and R However, even | dyn.load("/usr/local/lib/libcbqn.so"); .Call("bqn_init")| immediately fails on the BQN side, viz. |Failed to allocate memory for JIT 200 times; stopping trying|| ||CBQN interpreter ent

Re: [Rd] dyn.load inside a package in R >= 3.0

2013-05-02 Thread Adrian Mejia
#x27;t find it? What would be a less ugly hack for accomplishing this? Thanks Adrian -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Sunday, April 28, 2013 10:27 AM To: Adrian Mejia Cc: r-devel@r-project.org Subject: Re: [Rd] dyn.load inside a package in

Re: [Rd] dyn.load inside a package in R >= 3.0

2013-04-28 Thread Uwe Ligges
On 24.04.2013 19:55, Adrian Mejia wrote: Hello, I am trying to port a package that was built for R 2.15 over to R 3.0. This package has an Initialize method that uses dyn.load to load a dll that was built separately, and then uses .C() to make calls on the functions in that dll. This worked

[Rd] dyn.load inside a package in R >= 3.0

2013-04-25 Thread Adrian Mejia
Hello, I am trying to port a package that was built for R 2.15 over to R 3.0. This package has an Initialize method that uses dyn.load to load a dll that was built separately, and then uses .C() to make calls on the functions in that dll. This worked fine in 2.15, however, I see that now for 3.0

Re: [Rd] dyn.load() strange behavior

2010-05-22 Thread Dominick Samperi
Thanks for taking the time to look at this Uwe. Turns out the problem was caused by the fact that foo.so was built with incorrect linker options (not pointing to bar.so), so there were undefined symbols. Why it worked at all is a puzzle. 2010/5/22 Uwe Ligges > - Does bar really dyn.load its shar

Re: [Rd] dyn.load() strange behavior

2010-05-22 Thread Uwe Ligges
- Does bar really dyn.load its shared library on load? - Have you told package foo (in the DESCRIPTION) it is LinkingTo: bar ? Uwe Ligges On 21.05.2010 22:35, Dominick Samperi wrote: Hello, I am observing the following strange behavior when I try to load a shared library using dyn.load() und

[Rd] dyn.load() strange behavior

2010-05-21 Thread Dominick Samperi
Hello, I am observing the following strange behavior when I try to load a shared library using dyn.load() under Linux... The library foo.so refers to a symbol in another package bar (with shared library bar.so), I get: dyn.load('foo.so') # error message because I forgot to load bar library(bar)

[Rd] dyn.load (PR#9364)

2007-02-22 Thread Christophe . Jean
Hi, I have exactly the same problem with R 2.4.1 on an Intel MacBook with Mac OS X 10.4.8. Please find below the output of the test. Christophe --- > source("/Users/Christophe/Desktop/Rdynunload/run.R") WARNING: ignoring environment value of R_HOME gcc-4.0 -arch i386 -I/Library/Frameworks/R.f

Re: [Rd] dyn.load and function calls without 'PACKAGE' argument

2006-12-08 Thread Paul Gilbert
Jeff You might look at the package padi (and also dsepadi) in the dseplus bundle in the devel area of CRAN. This provides an R to Fame link, and I have tried to do it in a generic way that can potentially interface to other time series data bases. It also handles endian issues, if your servers

Re: [Rd] dyn.load and function calls without 'PACKAGE' argument

2006-12-08 Thread Jeffrey J. Hallman
Duncan Temple Lang <[EMAIL PROTECTED]> wrote: dtl> [EMAIL PROTECTED] wrote: >> dyn.load("/opt/fame/timeiq/lib/linux_x86/libjchli.so", local = F) >> library.dynam("fame", package = "fame") >> The code in fame.so uses functions found in libjchli.so, making the >> 'local = F' argument in dy

Re: [Rd] dyn.load and function calls without 'PACKAGE' argument

2006-12-08 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > I'm writing a package that interfaces to the FAME database, via a > library of compiled C routines accessible through a Linux .so file. My > .onLoad() function loads the .so like this: > > dyn.load("/opt/fame/timeiq/lib/l

[Rd] dyn.load and function calls without 'PACKAGE' argument

2006-12-08 Thread jhallman
I'm writing a package that interfaces to the FAME database, via a library of compiled C routines accessible through a Linux .so file. My .onLoad() function loads the .so like this: dyn.load("/opt/fame/timeiq/lib/linux_x86/libjchli.so", local = F) and after that I also load my own fame.so via li

Re: [Rd] dyn.load

2006-11-22 Thread Tom McCallum
To answer my own question - you can use DllMain with Rwin_fpset() to get around this error message. Am still struggling though as it crashes when it tries to call a function in the wrapped DLL - any ideas on how to debug this? Hope this is of help to some one Tom On Tue, 21 Nov 2006 17:30:

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Great. So now we know that Johnatha is running on a PPC. Unfortunately, this isn't included in the details of the OS in the bug report. [EMAIL PROTECTED] wrote: > here is the output > > > > source("run.R") > gcc-4.0 -arch ppc -I/Library/Framework

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread stefano iacus
here is the output > source("run.R") gcc-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/ppc -I/usr/local/ include-fPIC -g -O2 -std=gnu99 -c code.c -o code.o gcc-4.0 -arch ppc -dynamiclib -Wl,-macosx_version_min -Wl,1

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread stefano . iacus
I'll test your script. Simon also made the same remark. Maybe in 10.4 this problem is solved. But apparently, if I load a package and then try to detach it, R still keeps open the .so file for that package. Is this expected for a successful unload (given that I never had experience of a succes

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread stefano iacus
I'll test your script. Simon also made the same remark. Maybe in 10.4 this problem is solved. But apparently, if I load a package and then try to detach it, R still keeps open the .so file for that package. Is this expected for a successful unload (given that I never had experience of a succes

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread stefano . iacus
here is the output > source("run.R") gcc-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/ppc -I/usr/local/ include-fPIC -g -O2 -std=gnu99 -c code.c -o code.o gcc-4.0 -arch ppc -dynamiclib -Wl,-macosx_version_min -Wl,1

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread duncan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was just testing this myself on various machines. And it behaves on Linux, Windows and also on my Intel Mac (OS X 10.4.8). Stefano, is this restriction on OS X still in effect? (Unfortunately I can't test this on any of my Power PC macs just at the

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was just testing this myself on various machines. And it behaves on Linux, Windows and also on my Intel Mac (OS X 10.4.8). Stefano, is this restriction on OS X still in effect? (Unfortunately I can't test this on any of my Power PC macs just at the

Re: [Rd] dyn.load (PR#9364)

2006-11-15 Thread stefano iacus
In OS X you cannot "unload" dynamically linked code. This is a known "feature" of OS X :( This is not an R bug. stefano On 15/nov/06, at 15:27, [EMAIL PROTECTED] wrote: > Full_Name: Jonathan Tuke > Version: 2.4.0 > OS: Mac OS X 10.4.8 > Submission from: (NULL) (203.173.46.189) > > > I am writi

[Rd] dyn.load (PR#9364)

2006-11-14 Thread tuke
Full_Name: Jonathan Tuke Version: 2.4.0 OS: Mac OS X 10.4.8 Submission from: (NULL) (203.173.46.189) I am writing C code to implement in R. I am using R CMD SHLIB and then dyn.load("file.so"). The function I then call with .C("function"). Since I installed the latest R version, I have found that

Re: [Rd] dyn.load error -- undefined symbol: ...

2005-09-11 Thread Duncan Temple Lang
You should tell us what operating system you are working on. If it is a Unix variant, you can use the command ldd: ldd interface.so and see if and where it finds all the libraries against which you link. (otool -L on Mac OS X will give you similar information.) Then make certain that th

[Rd] dyn.load error -- undefined symbol: ...

2005-09-11 Thread nwew
Dear R-developers, I am working on an C interface to some c functions. I compiled the c file using R CMD SHLIB without any compilation errors. All libs used are added to the LD_LIBRARY_PATH. However dyn.load("interface.so") produces undefined symbol: N_VNew_Serial; which is defined in one of t

Re: [Rd] dyn.load in linux: missing libraries?

2005-07-06 Thread Uwe Ligges
Tyler Smith wrote: > ah, that's better. For an immediate fix I just changed .dll to .so, and No, change it to .Platform$dynlib.ext or do as already recommended: use library.dynam() Uwe Ligges > it appears to work perfectly. I will read through Writing R Extensions > to make sure I unders

Re: [Rd] dyn.load in linux: missing libraries?

2005-07-06 Thread Tyler Smith
ah, that's better. For an immediate fix I just changed .dll to .so, and it appears to work perfectly. I will read through Writing R Extensions to make sure I understand what I'm doing! Thanks! Tyler Peter Dalgaard wrote: >Tyler Smith <[EMAIL PROTECTED]> writes: > > > >>Hi, >> >>I've just ab

Re: [Rd] dyn.load in linux: missing libraries?

2005-07-06 Thread Peter Dalgaard
Tyler Smith <[EMAIL PROTECTED]> writes: > Hi, > > I've just about got myself transferred from windowsXP to Linux (Mepis > 3.3.1-1). I've got R 2.1.1, emacs, and ess running from the debian > repositories. Of course, there is a hitch. I have a bit of C code in one > of my personal functions. I

[Rd] dyn.load in linux: missing libraries?

2005-07-05 Thread Tyler Smith
Hi, I've just about got myself transferred from windowsXP to Linux (Mepis 3.3.1-1). I've got R 2.1.1, emacs, and ess running from the debian repositories. Of course, there is a hitch. I have a bit of C code in one of my personal functions. I have, apparently without problem, been able to compi